This commit is contained in:
Awni Hannun
2025-03-13 15:19:27 -07:00
parent 37691af2b1
commit 60b6b18219
15 changed files with 16 additions and 4 deletions
+1 -2
View File
@@ -31,13 +31,12 @@ jobs:
source env/bin/activate
pip install --upgrade pip
pip install unittest-xml-reporting
cd llms/
pip install -e ".[test]"
- run:
name: Run Python tests
command: |
source env/bin/activate
python -m xmlrunner discover -v llms/tests -o test-results/
python -m xmlrunner discover -v tests -o test-results/
- store_test_results:
path: test-results
+1 -1
View File
@@ -1,3 +1,3 @@
# Copyright © 2023-2024 Apple Inc.
__version__ = "0.21.6"
__version__ = "0.22.0"
+1
View File
@@ -24,6 +24,7 @@ from pathlib import Path
import mlx.core as mx
from huggingface_hub import snapshot_download
from mlx.utils import tree_flatten
from mlx_lm import load, stream_generate
from mlx_lm.utils import load_model, load_tokenizer
+1
View File
@@ -6,6 +6,7 @@ from typing import Any, Optional
import mlx.core as mx
import mlx.nn as nn
from mlx_lm.models.base import BaseModelArgs, create_attention_mask
from .cache import KVCache, MambaCache
+2 -1
View File
@@ -6,9 +6,10 @@ import tempfile
import types
import unittest
from mlx_lm.tuner import datasets
from transformers import AutoTokenizer
from mlx_lm.tuner import datasets
HF_MODEL_PATH = "mlx-community/Qwen1.5-0.5B-Chat-4bit"
+1
View File
@@ -11,6 +11,7 @@ import mlx.core as mx
import mlx.nn as nn
import mlx.optimizers as opt
from mlx.utils import tree_flatten
from mlx_lm import lora, tuner
from mlx_lm.tuner.dora import DoRAEmbedding, DoRALinear
from mlx_lm.tuner.lora import LoRAEmbedding, LoRALinear
+1
View File
@@ -5,6 +5,7 @@ from pathlib import Path
from unittest.mock import MagicMock, patch
import mlx.core as mx
from mlx_lm.gguf import convert_to_gguf
+1
View File
@@ -4,6 +4,7 @@ import unittest
import mlx.core as mx
import mlx.nn as nn
from mlx.utils import tree_map
from mlx_lm.models import rope_utils
from mlx_lm.models.base import create_causal_mask
from mlx_lm.models.cache import KVCache, RotatingKVCache, make_prompt_cache
+1
View File
@@ -6,6 +6,7 @@ import tempfile
import unittest
import mlx.core as mx
from mlx_lm.models.cache import (
KVCache,
MambaCache,
+1
View File
@@ -1,6 +1,7 @@
import unittest
import mlx.core as mx
from mlx_lm.sample_utils import apply_min_p, apply_top_k, apply_top_p
+1
View File
@@ -6,6 +6,7 @@ import threading
import unittest
import requests
from mlx_lm.server import APIHandler
from mlx_lm.utils import load
+1
View File
@@ -4,6 +4,7 @@ import unittest
from pathlib import Path
from huggingface_hub import snapshot_download
from mlx_lm.tokenizer_utils import (
BPEStreamingDetokenizer,
NaiveStreamingDetokenizer,
+1
View File
@@ -6,6 +6,7 @@ from io import StringIO
from unittest.mock import MagicMock
import mlx.nn as nn
from mlx_lm.tuner.lora import LoRALinear
from mlx_lm.tuner.utils import print_trainable_parameters
+1
View File
@@ -7,6 +7,7 @@ import unittest
import mlx.core as mx
import mlx.nn as nn
from mlx.utils import tree_flatten
from mlx_lm import utils
HF_MODEL_PATH = "mlx-community/Qwen1.5-0.5B-Chat-4bit"
+1
View File
@@ -2,6 +2,7 @@ import unittest
from pathlib import Path
import mlx.nn as nn
from mlx_lm.models.qwen2 import Model as Qwen2Model
from mlx_lm.utils import get_model_path, load_model