Skip to content

fix(ssd): Qwen3.6 --stream-experts works again (b769 crash), first-run streaming, README re-measure - #192

Draft
solderzzc wants to merge 1 commit into
mainfrom
fix/ssd-streaming-release
Draft

solderzzc wants to merge 1 commit into
mainfrom
fix/ssd-streaming-release

Conversation

@solderzzc

@solderzzc solderzzc commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Draft until the mlx-swift-lm pointer includes SharpAI/mlx-swift-lm#71. It currently points at the #69 merge (e7df2ae). #71 fixes the --stream-experts --mtp buffer overflow, which is release-blocking. Merging to main cuts a release, so please don't merge before that bump.

Also blocked on the SwiftLM review session's fix for #189's hybrid prompt-cache path on VLM loads. In b769 every text request to a Qwen3.5 model that loads as a VLM fails with unsupportedBatchContinuation. That's fixed separately in #194, and the release should include it too.

Problem

Release b769 crashes on the first request with --stream-experts on Qwen3.5/3.6 MoE:

Fatal error: [broadcast_shapes] Shapes (263,8,8,2048) and (263,8,1) cannot be broadcast.

The mlx-swift-lm upstream sync that came in with #167 broke the SSD path in three ways: a double unsort, evals inside compiled decode traces, and a concurrent loader that loaded every expert into memory. The README's Qwen3.6 SSD numbers came from before that sync and were never re-measured afterwards.

Changes

Verification (Mac mini M6, 32 GB, median of 3, 1 run at 40.8K, needle checked in every run)

Prompt GPU prefill / decode GPU peak SSD prefill / decode SSD peak
548 714 / 47.0 19.8 GB 256 / 13.2 5.6 GB
2.3K 968 / 45.7 20.1 GB 403 / 13.0 5.6 GB
9.8K 858 / 43.4 20.4 GB 401 / 12.7 5.6 GB
40.8K 615 / 36.1 21.5 GB 336 / 12.0 5.8 GB

Before the sync (old README): SSD 321 / 402 / 403 / 340 prefill, 13.2 / 13.1 / 12.9 / 11.9 decode, 6.0–7.7 GB. The only remaining gap is prefill at ~550 tokens. On b769: crash. Swap growth was 0 in every run.

The first-run path wasn't exercised end to end (it needs a model that isn't cached yet). It builds, and the cached path is unchanged: modelDirectory resolves and the new block is skipped.

AI usage: written by Claude Code (Claude Opus 5.5) in the M6 benchmarking session, with the repo owner's approval to open this PR. The #71 bugs and the first-run gap were found by the SwiftLM review session.

🤖 Generated with Claude Code

- Bump mlx-swift-lm to include SharpAI/mlx-swift-lm#69 (SSD path crashes and
  eager weight load after the upstream sync). #71 follows before merge.
- --stream-experts on a model that isn't downloaded yet now fetches it before
  planning, so streaming is activated for that load instead of the loader
  loading every expert.
- README: re-measure the Qwen3.6-35B-A3B table on the fixed build and flag that
  b769 --stream-experts crashes on Qwen3.5/3.6. The earlier SSD numbers were
  from before the sync.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant