Bug: DFlashDraftModelArgs crashes loading the Qwen3.6-35B-A3B DFlash draft (rope_theta/block_size missing in Qwen3.6-style configs)
dflash serve --model majentik/Qwen3.6-35B-A3B-TurboQuant-MLX-4bit --draft z-lab/Qwen3.6-35B-A3B-DFlash crashes at startup (this pair is in the official dflash models catalog):
TypeError: DFlashDraftModelArgs.__init__() missing 2 required positional arguments: 'rope_theta' and 'block_size'
Root cause
DFlashDraftModelArgs.from_dict (model.py) filters the draft config.json keys against the dataclass annotations and requires flat rope_theta / block_size fields. The 27B draft (which works) ships them flat:
{ "rope_theta": 10000000, "block_size": 16 }
The 35B-A3B draft uses the newer Qwen3.6 config style — no top-level rope_theta/block_size, the theta lives inside rope_parameters:
{ "rope_parameters": { "rope_theta": 10000000, "rope_type": "default" }, "max_position_embeddings": 262144, "sliding_window": 4096 }
Verified against the official repo configs (not local cache), and reproduced in isolation with the unpatched from_dict logic: 27B config loads, A3B config raises the exact TypeError above.
Suggested fix
In DFlashDraftModelArgs.from_dict, before constructing the dataclass:
if data.get("rope_theta") is None:
rp = data.get("rope_parameters") or {}
data["rope_theta"] = rp.get("rope_theta", 10000000.0)
if data.get("block_size") is None:
data["block_size"] = 16
(block_size=16 matches what the 27B draft ships.)
Also worth noting: at startup dflash tries to reach huggingface.co (no connect timeout on the retry), which hangs indefinitely when HF is unreachable — HF_HUB_OFFLINE=1 works around it when models are cached.
Bug:
DFlashDraftModelArgscrashes loading the Qwen3.6-35B-A3B DFlash draft (rope_theta/block_size missing in Qwen3.6-style configs)dflash serve --model majentik/Qwen3.6-35B-A3B-TurboQuant-MLX-4bit --draft z-lab/Qwen3.6-35B-A3B-DFlashcrashes at startup (this pair is in the officialdflash modelscatalog):Root cause
DFlashDraftModelArgs.from_dict(model.py) filters the draftconfig.jsonkeys against the dataclass annotations and requires flatrope_theta/block_sizefields. The 27B draft (which works) ships them flat:{ "rope_theta": 10000000, "block_size": 16 }The 35B-A3B draft uses the newer Qwen3.6 config style — no top-level
rope_theta/block_size, the theta lives insiderope_parameters:{ "rope_parameters": { "rope_theta": 10000000, "rope_type": "default" }, "max_position_embeddings": 262144, "sliding_window": 4096 }Verified against the official repo configs (not local cache), and reproduced in isolation with the unpatched
from_dictlogic: 27B config loads, A3B config raises the exact TypeError above.Suggested fix
In
DFlashDraftModelArgs.from_dict, before constructing the dataclass:(block_size=16 matches what the 27B draft ships.)
Also worth noting: at startup dflash tries to reach huggingface.co (no connect timeout on the retry), which hangs indefinitely when HF is unreachable —
HF_HUB_OFFLINE=1works around it when models are cached.