HyperAIHyperAI

Command Palette

Search for a command to run...

FreeToken: 帯域適応実行によるエッジネイティブMoEサービングの効率化

概要

フロンティア級のオープンウェイトモデルの入手可能性は高まっているが、そのサービングはいまだデータセンター基盤を前提とすることが多い。本論文では、パーソナルマシンを単なる小型GPUとしてではなく、統合的で弾力的な推論プラットフォームとして扱う、エッジネイティブなMoEサービングシステムFreeTokenを提案する。FreeTokenは、モデル配置とローディング、エキスパート常駐、CPU–GPU実行、エージェント状態の再利用、実行時メモリ管理を含むサービングスタック全体を、ローカルAIの二つの現実——エージェントワークロードは実行パターンを絶えず変化させること、そしてエッジハードウェアはマシンごとにバランスの異なるヘテロジニアスなリソースを露出すること——に基づいて協調設計する。固定のオフロード戦略に固執するのではなく、FreeTokenは計算とモデル状態を実際に利用可能なリソースへ継続的にマッピングする。FreeTokenは、8GBのラップトップGPUから単一のワークステーションGPUに至るハードウェア上で、20以上のMoEモデルと実用的なコーディングおよびツール利用エージェントをサポートする。さらに重要なことに、これらのマシンが実用的にサービングできる範囲を、ラップトップ上の35Bモデルから、ゲーミングデスクトップ上の284Bモデル、そして単一ワークステーションGPU上の753B GLM-5.2へと拡大する。FreeTokenはオープンウェイトを展開可能なローカルソフトウェアへと転換し、ユーザーがすでに所有するマシンをフロンティア級インテリジェンスの実用的なプラットフォームとする。

One-sentence Summary

The authors propose FreeToken, an edge-native Mixture-of-Experts serving system that co-designs model loading, expert residency, CPU-GPU execution, and memory management to continuously map computation and model state onto available heterogeneous resources rather than fixed offloading, supporting over 20 MoE models and scaling from a 35B model on a laptop to the 753B GLM-5.2 on a single workstation GPU.

Key Contributions

  • FreeToken is an edge-native MoE serving system that treats a personal machine as a unified elastic inference platform across GPU, CPU, host memory, and interconnect, supporting more than 20 MoE models and real coding and tool-using agents on hardware from an 8 GB laptop GPU to a single workstation GPU.
  • The system introduces bandwidth-adaptive CPU co-execution and an elastic full-expert cache with unified prefill/decode residency, derives the CPU/GPU division from measured bandwidths as a closed-form ratio that remains device-resident inside captured CUDA graphs, and applies hierarchical-memory management to the expert pool rather than fixed offloading or host-side heuristics.
  • FreeToken enables models from 35B to 753B parameters on personal hardware, including a 284B model on a gaming desktop and the 753B GLM-5.2 on a single workstation GPU, while consistently outperforming existing edge serving systems and providing cross-request prefix reuse for multi-turn agentic sessions.

Introduction

Open-weight models such as DeepSeek-V4-Flash and GLM-5.2 are closing the capability gap with proprietary systems, but running them remains expensive because frontier models usually require datacenter GPUs or costly hosted APIs, and agentic applications increase inference demand. Mixture-of-experts models make local serving more feasible by activating only a few experts per token, but the full expert pool still exceeds consumer GPU memory, creating hard prefill, decode, and resource-management problems. Existing edge serving systems address only fragments of this problem and suffer from dense expert working sets during long prefills, cache misses without principled CPU/GPU partitioning, and fixed policies under variable consumer hardware. The authors propose FreeToken, a serving system that treats heterogeneous consumer machines as a unified inference platform and combines bandwidth-adaptive execution, semantic-aware caching, and elastic resource management to serve frontier-scale MoE models on personal hardware.

Method

The authors propose FreeToken, a system designed to optimize edge Mixture-of-Experts (MoE) serving by organizing computation around a two-level expert-memory hierarchy. In this architecture, the CPU-resident expert pool holds the complete routed-expert weights and serves as the source of truth, while non-expert weights remain resident on the GPU. The remaining GPU memory is transformed into a single elastic expert cache shared across all MoE layers. Each slot in this cache stores every tensor required to evaluate one layer-expert pair, allowing residency, lookup, and execution to operate on logical identifiers rather than tensor shards.

Refer to the framework diagram:

During the prefill stage, FreeToken addresses the bottlenecks of massive expert transfer and redundant recomputation through two dedicated mechanisms. First, the system employs full-layer double buffering to hide transfer latency behind computation. Because prefill activates nearly the entire expert set of every layer, FreeToken allocates two full-layer buffers from the global slot pool. While the GPU computes the routed experts of layer lll from one buffer, a dedicated transfer stream simultaneously loads the complete expert set of layer l+1l+1l+1 into the other. This ensures continuous background weight movement. Second, to handle agentic context edits that invalidate recurrent states, the authors introduce a semantic-aware state cache. This mechanism maintains a small pool of recurrent-state checkpoints attached to nodes of a radix prefix tree. Checkpoints are strategically placed at semantic anchors, such as special-token boundaries marking thinking segments or tool calls. When a context edit occurs, the system restores from the deepest surviving checkpoint, allowing full-attention layers to reuse their KV cache and recurrent layers to resume from the anchor, thereby re-prefilling only the new suffix.

In the decode stage, FreeToken leverages the strong temporal expert locality observed across consecutive steps. Instead of static expert placement, the system maintains a shared LRU residency space that continuously tracks the experts selected by the router. A cache hit refreshes an expert's recency, while eviction removes the least recently demanded expert, ensuring scarce GPU memory tracks the current working set.

To handle cache misses that inevitably occur due to cold starts or capacity limits, FreeToken implements a bandwidth-adaptive execution strategy governed by the qq^\starq policy. This mechanism dynamically divides the mmm missing experts between PCIe transfer and CPU execution based on the measured pinned expert-transfer bandwidth (BPB_PBP) and host-side expert-processing bandwidth (BHB_HBH). The misses are split into a cache-fill set F\mathcal{F}F and a CPU-execution set C\mathcal{C}C. Experts in F\mathcal{F}F are transferred to the GPU cache and executed there, while experts in C\mathcal{C}C execute directly from the CPU-resident pool. The optimal split ratio qq^\starq is derived to balance the concurrent branches:

qmBPBHq^\star \approx m \frac{B_P}{B_H}qmBHBP

This formulation ensures that cache fills proceed at the full PCIe rate while the CPU utilizes the residual host bandwidth, converting it into progress without suspending cache updates. The CPU and GPU compute their respective partial sums and merge them to preserve the exact MoE output.

Beneath these phases, an elastic expert-memory lifecycle treats GPU cache capacity as a runtime-adjustable resource. FreeToken allows runtime cache reconfiguration, enabling the system to rebuild the GPU expert cache for a revised VRAM budget at any scheduler safe point without restarting the engine. Furthermore, fast engine bootstrap is achieved by reading expert weights directly into their final host layout and pinning memory only after filling, eliminating the need for a warm-up phase.

From an implementation perspective, the authors ensure that all routing-dependent control remains strictly on the GPU to avoid costly device synchronization. For each MoE layer, a single-pass kernel deduplicates routed experts, classifies them against the residency table, derives the fetch count qqq, and selects eviction victims. This dynamic control is represented as data inside a statically captured CUDA graph. The CPU branch of the bandwidth-adaptive execution is also captured into the same graph, utilizing a persistent C++ worker pool pinned to physical cores. To facilitate rapid loading, the system normalizes model-specific checkpoint layouts into the FreeToken Weight (FTW) format, which stores expert weights merged into a runtime bank layout, allowing parallel direct I/O straight into exact-size host banks.

Experiment

The evaluation compares FreeToken with llama.cpp, Ollama, KTransformers, and MoE-Infinity on six edge and workstation GPUs serving large MoE models that exceed VRAM across four agentic workloads, including math reasoning and coding and email agents. The main results show that FreeToken delivers higher and more stable decode throughput and much lower tail time-to-first-token than baselines under agentic serving. Breakdown experiments attribute these gains to pipelined prefill overlap and global expert-cache locality, while cross-hardware tests show the advantage persists from an 8 GB laptop GPU to a frontier-scale model on a workstation GPU.

The measured systems span consumer and workstation GPUs, covering a wide range of PCIe transfer bandwidth and CPU-side expert kernel bandwidth. Across all listed systems, the effective CPU-side expert kernel bandwidth is higher than the host-to-device PCIe transfer bandwidth. Rented server configurations are capped and pinned to emulate edge-class hosts, and their CPU-side bandwidth lands in the same range as the real desktop and laptop systems. PCIe transfer bandwidth scales from the laptop's PCIe 4.0 x8 link through the PCIe 4.0 x16 systems to the PCIe 5.0 x16 systems. The gap between CPU-side expert kernel bandwidth and PCIe transfer bandwidth is largest on the laptop, where CPU-side bandwidth is several times higher than PCIe bandwidth. The workstation system provides the largest memory capacity and the highest CPU-side expert kernel bandwidth, well above the consumer platforms.

The evaluation covers consumer laptops, desktops, workstations, and rented server configurations that are capped to emulate edge-class hosts, spanning PCIe 4.0 x8 through PCIe 5.0 x16 links. Across all systems, the effective CPU-side expert kernel bandwidth is consistently higher than the host-to-device PCIe transfer bandwidth. The gap is largest on the laptop, where CPU-side bandwidth is several times higher than PCIe bandwidth, while the workstation provides the largest memory capacity and the highest CPU-side expert kernel bandwidth.


AIでAIを構築

アイデアからローンチまで — 無料のAIコーディング支援、すぐに使える環境、最高のGPU価格でAI開発を加速。

AI コーディング補助
すぐに使える GPU
最適な料金体系

HyperAI Newsletters

最新情報を購読する
北京時間 毎週月曜日の午前9時 に、その週の最新情報をメールでお届けします
メール配信サービスは MailChimp によって提供されています