Skip to content

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

Merged
solderzzc merged 6 commits into
mainfrom
fix/ssd-streaming-release
Sep 26, 2026
Merged

solderzzc merged 6 commits into
mainfrom
fix/ssd-streaming-release

Conversation

@solderzzc

@solderzzc solderzzc commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Ready. mlx-swift-lm now points at the SharpAI/mlx-swift-lm#71 merge (5596071), which includes #69, #70 and #71. #194 is already in main. Merging this cuts the release with every SSD fix.

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 and b773: crash. Swap growth was 0 in every run.

Final check of this exact tree (merged with main at 537a1cc, mlx-swift-lm 5596071), run back to back with the earlier fix build: SSD 548 / 2,346 tok is 252.9 / 409.7 prefill and 13.97 / 13.88 decode tok/s at 5.7 GB. The earlier build measured 251.2 / 411.2 and 14.01 / 13.93. GPU: 47.85 / 46.8 decode. Needle ok 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

simba and others added 5 commits September 25, 2026 14:22
- 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>
Picks up the SSD persistent-buffer regrow (--stream-experts with --mtp or a
draft model), streaming scoped to the main model's directory, and the
end-to-end SSD tests (#70, #71).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@solderzzc solderzzc changed the title fix(ssd): Qwen3.6 --stream-experts works again (b769 crash), first-run streaming, README re-measure fix(ssd): Qwen3.6 --stream-experts works again (b769/b773 crash), first-run streaming, README re-measure Sep 26, 2026
@solderzzc
solderzzc marked this pull request as ready for review September 26, 2026 09:09
Review fixes for the prefetch added in this PR:
- Skip it for --info, which would otherwise download the whole model.
- Reuse an existing copy under the loader's hub root (localRepoLocation), so
  later starts don't re-list and re-HEAD every file (or re-hash them offline).
- Show download progress with ProgressTracker.
- Set the load phase first, so a bad or gated id reports model_load_failed
  instead of binary_error.
- README: the crash warning covers b773 too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@solderzzc
solderzzc merged commit 60f05ec into main Sep 26, 2026
14 checks passed
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