does mlx-lm 0.31.3 support deepseekv4 already?

#1
by aimumude - opened

does mlx-lm 0.31.3 support deepseekv4 already?

Python 3.13.9 | packaged by Anaconda, Inc. | (main, Oct 21 2025, 19:11:29) [Clang 20.1.8 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.

from mlx_lm import load, generate
...
... model, tokenizer = load("mlx-community/deepseek-ai-DeepSeek-V4-Flash-8bit")
...
... prompt = "Once upon a time in"
... text = generate(model, tokenizer, prompt=prompt, verbose=True)
...

Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.13/site-packages/mlx_lm/utils.py", line 188, in _get_classes
arch = importlib.import_module(f"mlx_lm.models.{model_type}")
File "/opt/anaconda3/lib/python3.13/importlib/init.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1324, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'mlx_lm.models.deepseek_v4'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 3, in
model, tokenizer = load("mlx-community/deepseek-ai-DeepSeek-V4-Flash-8bit")
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.13/site-packages/mlx_lm/utils.py", line 491, in load
model, config = load_model(model_path, lazy, model_config=model_config)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.13/site-packages/mlx_lm/utils.py", line 334, in load_model
model_class, model_args_class = get_model_classes(config=config)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
File "/opt/anaconda3/lib/python3.13/site-packages/mlx_lm/utils.py", line 191, in _get_classes
raise ValueError(msg)
ValueError: Model type deepseek_v4 not supported.

Sign up or log in to comment