You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DFlash draft model fails to load: rope_theta moved into rope_parameters #121
The dflash-speculative-decoding CI job fails on every PR. With the download noise removed by #119, the cause is now a clean, deterministic decode error:
[SwiftLM] ⚠️ Failed to load DFlash draft model: keyNotFound(CodingKeys(stringValue: "rope_theta"))
The download reaches 100% first, so this is not a transport problem.
Cause
z-lab/Qwen3.5-4B-DFlash's config.json has no top-level rope_theta. It uses the newer nested form:
DFlashDraftModel's configuration requires the flat key:
// Sources/DFlash/DFlashDraftModel.swift:65
case ropeTheta ="rope_theta"
and rope_theta is non-optional, so decoding throws before the model loads. Sources/SwiftLM/DeepseekV3DFlash.swift:74 declares the same key and looks likely to hit this too, though I have not confirmed it against a checkpoint.
Suggested fix
Decode rope_theta from rope_parameters.rope_theta when the flat key is absent, keeping the flat key working for older checkpoints. Something like a custom init(from:) that tries the top-level key first, then the nested one, then falls back to the existing default.
The wider transformers ecosystem has been migrating rope settings into rope_parameters, so other configurations reading rope_theta, rope_scaling, or rope_type flatly are worth auditing at the same time.
Impact
dflash-speculative-decoding cannot pass until this is fixed. It is independent of #120 (Gemma 4 KV-shared layers), which blocks the three integration_matrix jobs — together they account for all four persistently red checks.
Environment: SwiftLM main after #119, macOS 26.5.2, M5 Pro.
Activity
chore: advance mlx-swift-lm to include the Gemma 4 KV-shared fix
chore: bump mlx-swift-lm for the non-indexed weights fix (#118) (#122)
fix: decode rope_theta from nested rope_parameters (#121) (#124)