Optimizing Local Concurrent Inference on Mac Studio
marzukia · reddit · 2026-07-18
The author continues to optimize a forked local inference engine, qMLX, aiming to replace parallelism with concurrency on a 96GB Mac Studio.
The core result: in a 20-minute test with 3 concurrent sessions, the system received 789,351 prompt tokens but only recomputed 48,996 on the GPU. About 93.8% of the tokens were retrieved directly from the on-disk KV cache, which the author says effectively slashes the prefill compute by roughly 1/16.
Two key changes enabled this:
- Implemented partial persistent storage for the Gated DeltaNet KV cache
- Developed a more rational eviction strategy
Having mostly removed the hot cache path, qMLX has evolved into an inference engine that "recovers state from SSD and processes requests serially," and the author has started using it as a local worker for a frontier orchestrator. The author believes this "concurrency without parallelism" approach finally allows him to run sub-agents on local models.
More from coding & agent
- Devin adds e2b sandboxes for remote agent execution — badphilosopher · 2026-07-22
- Hermes Agent Refactoring Proposal: Decoupling via Event Bus and Monorepo Slicing — Promptmethus · 2026-07-22
- ty now reads Pydantic config keywords and field metadata — charliermarsh · 2026-07-22
- Pensar Launches AI Security Agent to Autonomously Discover and Patch 0-Days — andriy_mulyar · 2026-07-22
- ty adds first-class Pydantic support, including strict and lax field handling — charliermarsh · 2026-07-22
- Google launches Gemini 3.5 Flash Cyber for CodeMender, with limited access for governments — GoogleAI · 2026-07-22