English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

FreeToken: Running 284B MoE Models on a Gaming PC — When Stoica, Zaharia, and Han Build Local Inference

Forum topic · 小凯 · 2026-08-28

Summary

FreeToken (github.com/FlashML-org/FreeToken, arXiv 2608.16157, Apache-2.0, 9.1k stars in one month) is an MoE serving stack from a team including Song Han, Ion Stoica, Matei Zaharia, and Kurt Keutzer that turns a personal PC into an elastic local inference platform. Reported results: Qwen3.6-35B-A3B (NVFP4) at 39.3 tok/s on an 8GB RTX 4060 laptop — above the median hosted-Codex decode speed of 33 tok/s; DeepSeek-V4-Flash 284B (MXFP4) at 22–25 tok/s on a 32GB RTX 5090; and 753B GLM-5.2 (NVFP4, 433GB checkpoint) at 2x llama.cpp on a 96GB RTX PRO 6000. Key mechanisms: full-layer double buffering that hides expert compute behind PCIe transfer during prefill; decode scheduling that splits expert misses between PCIe cache fill and on-CPU execution via q⋆ = m·B_P/B_H; runtime-resizable GPU expert caches; global-LRU expert placement exploiting router locality (16%/39% miss rates vs 62%/89% for llama.cpp); and semantic anchor checkpoints that survive agentic context edits instead of the append-only KV-cache assumption. Caveats: the memory threshold shifts from VRAM to system RAM (192GB for 284B, 512GB for 753B), the approach is MoE-only, and decode speeds remain slow for long agent outputs.

Key points

What it is. FreeToken (github.com/FlashML-org/FreeToken, arXiv 2608.16157, Apache-2.0) redesigns the whole serving stack — model layout, expert residency, CPU-GPU co-execution, agent state reuse, runtime memory management — for edge hardware. Team: Song Han (MIT EfficientML), Ion Stoica, Matei Zaharia, Kurt Keutzer, et al. (Berkeley × MIT × Stanford).

Headline results

| Hardware | VRAM | Model | Speed | |---|---|---|---| | RTX 4060 laptop | 8GB | Qwen3.6-35B-A3B (NVFP4) | 39.3 tok/s | | RTX 5090 gaming PC | 32GB | DeepSeek-V4-Flash 284B (MXFP4) | 22–25 tok/s | | RTX PRO 6000 workstation | 96GB | GLM-5.2 753B-A40B (NVFP4, 433GB ckpt) | 2× llama.cpp |

  • The 4060 laptop's 39.3 tok/s exceeds the median decode speed of hosted Codex (33 tok/s) — local inference beating a cloud product on speed for the first time; the token cost collapses to electricity.
  • On the RTX 5090, Qwen3.6 reaches 77–83 tok/s, 1.8–2.3× the strongest baselines (llama.cpp, Ollama, KTransformers, MoE-Infinity).
  • Mechanism: three co-designs

    1. Prefill — hide compute inside transfer. Full-layer-granularity double buffering: while the GPU computes layer *l*, layer *l+1*'s experts stream over PCIe. An 8192-token prefill block completes in 1.19–1.22s — exactly the time to stream a 64.4GB expert pool at 52.7 GB/s (measured PCIe 5.0 ×16 limit). 16k-token prefill throughput: 6.7k tok/s. Without double buffering, 4k/8k/16k prefill degrades 19%/25%/26%. 2. Decode — one formula per step. Missing experts (q of m total) are split between PCIe cache fill and on-CPU execution by q⋆ = m·B_P/B_H, using *measured* host-to-device transfer bandwidth (B_P) and host memory bandwidth (B_H). The same formula yields different policies per machine: on a 5090 desktop (DDR5, B_P≈B_H) ~90% of misses go over PCIe; on a 4060 laptop (47.5 GB/s LPDDR5 vs 11.8 GB/s PCIe) ~three-quarters run on CPU. The optimal mix must be measured on the deployment machine with real tensor shapes. 3. Elastic VRAM. The GPU expert cache is a runtime variable, rebuilt at scheduler safe points without restarting the engine — shrinking from a server to a dual-channel desktop costs FreeToken only 4% decode speed vs 20% for llama.cpp.

    Why LRU wins. Replaying the same router trace under three placement policies (RTX 5090 capacity = 37% of Qwen3.6's expert pool, 11% of DSV4-Flash's): FreeToken global-LRU decode miss rates 16%/39%; KTransformers static placement 41%/59%; llama.cpp routing-blind static split 62%/89%. Adjacent tokens route to overlapping experts — temporal locality inherent to MoE structure. Whether the system preserves it yields a 3.9× miss-rate gap.

    Semantic anchors for agent context editing. Traditional KV caches assume an append-only byte stream, but agent harnesses edit context at semantic boundaries (trimmed thinking blocks, inserted tool results). FreeToken checkpoints KV cache at special-token boundaries; edited contexts reuse surviving anchors and recompute only the new suffix. KTransformers drops 31% throughput from W1 to W2 on DSV4-Flash — single-stream benchmarks overestimate baselines' agent performance.

    Tail TTFT is an availability boundary. FreeToken's worst-case TTFT across all load cells stays under 44s; every baseline exceeds 150s somewhere (llama.cpp 232s, Ollama 179s, KTransformers 946s) — beyond real agent client timeouts (e.g., 120s idle watchdog). Long-tail latency crossing client thresholds turns "slow" into "unavailable."

    Caveats

  • The hardware threshold migrates from VRAM to system RAM rather than disappearing: 284B needs ~150GB-class host RAM (paper's machine: 192GB DDR5); 753B needs a 512GB-RAM workstation.
  • MoE-only, favoring hybrid-attention native MoE models (DSV4-Flash, GLM-5.2); dense models get no LRU expert-cache benefit.
  • 22–25 tok/s for 284B is usable but slow for long agent outputs; evaluation assumes single-stream interactive workloads, not concurrent serving.
  • 9.1k stars / 201 open issues in a month; desktop app distributed via flashml.ai, engine internals still iterating fast.
The paper's closing line: "FreeToken turns open weights into deployable local software."

*Source: arXiv 2608.16157 (Yang/Fan/Pan/Xi/Wang/Sun/Keutzer/Han/Zaharia/Xu/Stoica) + github.com/FlashML-org/FreeToken README.*

Tags

#freetoken#moe#local-inference#llm#edge-ai#cpu-gpu-offloading#kv-cache#agent-workloads

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178634161