Skip to content

DFlashDraftModelArgs crashes on Qwen3.6-35B-A3B DFlash draft (rope_theta/block_size missing in Qwen3.6-style config) #51

Description

@alitrack

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions