How can I convert z-lab/Qwen3.8-27B-DFlash2 to fp16?

#2
by crazyi - opened
The following is the error message:  

mlx_lm.convert --hf-path /Volumes/TiPlus7100/llm/models/z-lab/Qwen3.8-27B-DFlash2 --mlx-path /Volumes/TiPlus7100/llm/models/z-lab/Qwen3.8-27B-DFlash2-fp16
--dtype float16

[INFO] Loading
Traceback (most recent call last):
File "/opt/homebrew/bin/mlx_lm.convert", line 6, in
sys.exit(main())
~~~~^^
File "/opt/homebrew/Cellar/mlx-lm/0.31.3_2/libexec/lib/python3.14/site-packages/mlx_lm/convert.py", line 259, in main
convert(**vars(args))
~~~~~~~^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/mlx-lm/0.31.3_2/libexec/lib/python3.14/site-packages/mlx_lm/convert.py", line 112, in convert
model, tokenizer, config = load(
~~~~^
hf_path,
^^^^^^^^
...<3 lines>...
lazy=True,
^^^^^^^^^^
)
^
File "/opt/homebrew/Cellar/mlx-lm/0.31.3_2/libexec/lib/python3.14/site-packages/mlx_lm/utils.py", line 491, in load
model, config = load_model(model_path, lazy, model_config=model_config)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/mlx-lm/0.31.3_2/libexec/lib/python3.14/site-packages/mlx_lm/utils.py", line 341, in load_model
model_args = model_args_class.from_dict(config)
File "/opt/homebrew/Cellar/mlx-lm/0.31.3_2/libexec/lib/python3.14/site-packages/mlx_lm/models/base.py", line 15, in from_dict
return cls(
**{
...<3 lines>...
}
)
TypeError: ModelArgs.init() missing 1 required positional argument: 'rope_theta'

Hi.

Here you go but please keep in mind that I haven't tried it by myself:

https://huggingface.co/deepsweet/Qwen3.8-27B-DFlash2-FP16

Thank you for your help, but I think the DFlash2-FP16 maybe have some issue.
Here are the benchmarks:
Benchmark Model: Qwen3.8-27B-Uncensored-oQ8e-fp16-mtp
Engine: Auto
Context: 代码(Python)

Test Config TTFT(ms) TPOT(ms) pp TPS tg TPS E2E(s) Throughput Peak Mem(GB)
pp1024/tg128 Dflash2‑fp16 5225.5 153.38 196.0 6.6 24.726 46.6 32.14
pp1024/tg128 Dflash2‑BF16 5276.3 61.08 194.1 16.5 13.051 88.3 32.25
pp1024/tg128 MTP 5153.4 51.30 198.7 19.6 11.691 98.5 35.32
pp4096/tg128 Dflash2‑fp16 20480.0 157.38 200.0 6.4 40.467 104.4 33.86
pp4096/tg128 Dflash2‑BF16 20885.3 68.05 196.1 14.8 29.550 142.9 33.91
pp4096/tg128 MTP 20242.7 54.56 202.3 18.5 27.196 155.3 36.74
pp8192/tg128 Dflash2‑fp16 41776.0 161.47 196.1 6.2 62.302 133.5 34.91
pp8192/tg128 Dflash2‑BF16 42115.4 47.48 194.5 21.2 48.168 172.7 35.04
pp8192/tg128 MTP 41449.8 51.85 197.6 19.4 48.056 173.1 37.10
pp16384/tg128 Dflash2‑fp16 87513.6 110.27 187.2 9.1 101.548 162.6 36.69
pp16384/tg128 Dflash2‑BF16 88289.0 48.97 185.6 20.6 94.543 174.6 36.98
pp16384/tg128 MTP 19565.5 35.35 837.4 28.5 24.072 685.9 36.47
pp32768/tg128 Dflash2‑fp16 192590.3 165.90 170.1 6.1 213.664 154.0 39.80
pp32768/tg128 Dflash2‑BF16 192931.8 49.27 169.8 20.5 199.189 165.1 40.40
pp32768/tg128 MTP 41194.8 35.87 795.4 28.1 45.767 718.8 36.86
pp65536/tg128 Dflash2‑fp16 453229.7 188.47 144.6 5.3 477.231 137.6 45.28
pp65536/tg128 Dflash2‑BF16 454595.1 64.03 144.2 15.7 462.818 141.9 46.50
pp65536/tg128 MTP 92047.0 40.37 712.0 25.0 97.191 675.6 37.54

Sign up or log in to comment