Benchmarking MTP Prefetching for MoE Experts
zyxciss · reddit · 2026-07-17
In a CPU/GPU offload scenario for qwen3.6 35b a3b, the author uses the model's native MTP head to predict the next token and prefetch the likely experts in the background, effectively hiding PCIe transfer latency during the current token's computation.
Initial instrumentation on llama.cpp reveals:
- Prefetching based on the "last used expert" yields a mere 20.7% hit rate, rendering it practically useless.
- With MTP-guided prediction, the top-8 hit rate reaches 78% and top-16 hits 90%, though larger K values incur higher bandwidth overhead.
- A clear hot expert long-tail effect is observed: the top 64 experts (out of 256) account for 51% of total usage.
- The current baseline is around 35–36 tok/s, with a theoretical limit of 200 tok/s if all experts reside in VRAM, indicating the bottleneck is PCIe transfer rather than compute power.
The author seeks feedback on the viability of this approach: whether similar implementations exist, if router-only forward overhead negates the gains, and if it breaks down at larger batch sizes. They prefer forking llama.cpp over rewriting an engine entirely.
More from coding & agent
- GPT-6 Astra beats Factorio with enemies in 44 in-game hours at ~$4,500 API cost — liminal_bardo · 2026-09-11
- Treating agents like 50 First Dates: a 3-layer context system so every conversation doesn't start from zero — evielync · 2026-09-11
- SmolVM open-sources persistent computer infrastructure for agents that outlive chat sessions — aniketmaurya · 2026-09-11
- ARRM targets silent economic regressions in AI agents that functional tests miss — Beautiful_Belt_601 · 2026-09-11
- Dev builds browser 3D pizza delivery game with Claude: physics, GPS pathfinding, traffic AI — vinishkapoor · 2026-09-11
- Build X Carousel Posts from One Wide Image: A Splitter Tool Plus YouMind Skill Workflow — sujingshen · 2026-09-11