HeadlinesBriefing favicon HeadlinesBriefing.com

Qwen 3.5‑122B Runs Smoothly on M3 Ultra After Three Bug Fixes

Hacker News •
×

A three‑week debugging sprint on an M3 Mac Studio Ultra turned a slow, unreproducible inference stack into a near‑real‑time partner for long‑context coding. The author swapped the DS4 Flash stack for Qwen 3.5‑122B, a 122‑billion‑parameter model that fits comfortably in the Ultra’s 96 GB unified memory and matches the device’s bandwidth.

The new stack, forked from rapid‑mlx and called q MLX, introduced a hybrid attention design that blends SSM layers with dense attention. Three bugs crippled the original setup: a timestamp in the system prompt caused cache misses; an interrupt path discarded partially streamed replies, breaking history; and an unkeyed checkpoint writer bloated the disk cache, triggering eviction of valid checkpoints. Each fix restored byte‑exact cache reuse, preserved streamed tokens on interruption, and pruned junk checkpoints.

After the patches, the cache hit rate rose from 0 % to over 90 %, reducing prefill latency from several minutes to sub‑second. The model now retains 30‑57 k tokens per turn without swapping, enabling seamless pair‑programming sessions and real‑time tool‑calling.

The work demonstrates that rigorous cache management can unlock frontier models on consumer hardware, turning a powerful LLM into a practical local assistant.