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
Support for SSD expert streaming is not being detected correctly. #112
print("[SwiftLM] ⚠️ Model does not support SSD expert streaming (\(profile.modelType) is not MoE). Ignoring --stream-experts flag.")
It seems this gets (wrongly) triggered when running with:
--model Qwen/Qwen3.5-397B-A17B (or an 8-bit MXFP8 quantized version thereof) --stream-experts
Resulting in:
"Model does not support SSD expert streaming (qwen3_5_moe is not MoE). Ignoring --stream-experts flag."
Along with a subsequent:
"zsh: killed ./SwiftLM....."
Running with the same --model and ./SwiftLM parameters works fine when using the latest release binary (SwiftLM b648).
Thanks for the detailed report — the log line you pasted was the key. Root cause found, fix in #114.
ModelProfiler decoded the routed-expert count from num_local_experts only, which is the Mixtral spelling. Qwen3/Qwen3.5 MoE use num_experts, and DeepSeek/GLM MoE use n_routed_experts. So your model profiled as dense, --stream-experts was dropped, lazyLoad was never set, and the full 397B was materialised into RAM — which is the zsh: killed. That is also why b648 worked: it predates the guard that added this check.
The fix reads all three spellings (plus the nested text_config form), with a model_type fallback for families we haven't seen. Tests cover one case per spelling, including a qwen3_5_moe + num_experts config matching your model.
Once it lands, could you confirm on your actual Qwen3.5-397B-A17B run? The OOM path itself is hardware-dependent and I could only verify the detection logic here.
Release b674 is out with this fix included — the first release since b648, so you can verify --stream-experts on your Qwen3.5-397B-A17B directly against the release binary. The detection now reads all three expert-count spellings plus nested text_config; if it still misdetects on your model, please reopen with the log lines (they now report exactly what was found).
Activity
solderzzc commentedon Aug 5, 2026
Thanks for the detailed report — the log line you pasted was the key. Root cause found, fix in #114.
ModelProfilerdecoded the routed-expert count fromnum_local_expertsonly, which is the Mixtral spelling. Qwen3/Qwen3.5 MoE usenum_experts, and DeepSeek/GLM MoE usen_routed_experts. So your model profiled as dense,--stream-expertswas dropped,lazyLoadwas never set, and the full 397B was materialised into RAM — which is thezsh: killed. That is also why b648 worked: it predates the guard that added this check.The fix reads all three spellings (plus the nested
text_configform), with amodel_typefallback for families we haven't seen. Tests cover one case per spelling, including aqwen3_5_moe+num_expertsconfig matching your model.Once it lands, could you confirm on your actual Qwen3.5-397B-A17B run? The OOM path itself is hardware-dependent and I could only verify the detection logic here.
fix: non-positive expert counts are placeholders, not declarations
fix: detect MoE across all expert-count config spellings (#112) (#114)
ci: build the app arm64-only so releases ship again (#123)
solderzzc commentedon Aug 7, 2026
Release b674 is out with this fix included — the first release since b648, so you can verify
--stream-expertson your Qwen3.5-397B-A17B directly against the release binary. The detection now reads all three expert-count spellings plus nestedtext_config; if it still misdetects on your model, please reopen with the log lines (they now report exactly what was found).fix: address review findings; bump submodule for the e2b regression fix
fix: review follow-ups — CLI re-download, nested expert configs, refr…
test: cover load-path defect shapes with synthetic checkpoints (#143)
test: add a MoE fixture, and fix a flaky assertion in the fixture suite
test: add a MoE fixture, and fix a flaky assertion in the fixture sui…
test: make the MoE fixture actually test nesting, and fix two harness…
chore: bump mlx-swift-lm submodule to 69346d0