Frequency- and Batch-Aware Expert Cache Replacement Beyond Global LRU
Replace recency-only expert cache eviction with frequency- and batch-aware scoring so concurrent agent requests avoid cache thrashing under tight GPU memory.
Time
Compute level
Resources
What the paper used
Prerequisites
Scope
The Gap
FreeToken manages all MoE layers in one shared GPU slot pool using a single-pass GPU LRU eviction kernel, and delegates which q* of the m missing experts are admitted to the cache-fill set F directly to the replacement policy (Section 3.2 and Section 4.1).
“Instead, a single-pass kernel identifies the K least-recently-used candidate slots for eviction in one go. The miss path then simply consumes the first q ≤ K of these slots.”
Limitation
Pure LRU is vulnerable to scan-like thrashing when the active working set exceeds VRAM capacity (e.g., yielding a 39% decode miss rate on DeepSeek-V4-Flash at 11% pool capacity on an RTX 5090) and treats all misses identically instead of prioritizing experts shared across concurrent subagent tokens or exhibiting high multi-turn reuse.
Proposed Solution
Replace pure LRU in the single-pass GPU victim-selection kernel with a fixed-shape, scan-resistant policy such as S3-FIFO or two-bit LFU-LRU aging counters stored in the device-resident residency table. In addition, sort the m deduplicated missing experts by token fanout (number of tokens in the batch routing to each expert, crucial for concurrent subagents like Claude Code) and historical hit frequency so the highest-reuse q* misses enter F while single-token tail misses execute on the CPU.
Why This Matters
Expected to lower decode miss rates and improve token throughput on large-expert-pool models and multi-subagent batches without increasing VRAM footprint.
How to Get Started
How to test it: Test via trace-driven simulation and end-to-end serving that frequency- and fanout-aware fill selection reduces DeepSeek-V4-Flash decode miss rate on an RTX 5090 (11% cache capacity) by at least 5 percentage points and boosts Claude Code (W3) throughput by >=8% over global LRU; stop if extra metadata tracking adds >5 microseconds per layer to the CUDA Graph kernel.
- Extract token-level MoE routing traces from Qwen3.6-35B-A3B and DeepSeek-V4-Flash across single-turn (AIME) and concurrent-subagent (Claude Code) runs.
- Build a lightweight offline cache simulator matching FreeToken's global slot pool and q* constraint to evaluate S3-FIFO, LFU-LRU hybrid, and batch-fanout prioritization on miss rate.
- Implement the winning fixed-shape metadata structure inside FreeToken's single-pass device-side cache control kernel.
- Benchmark end-to-end decode tok/s and miss rates across cache capacities (10%-50% of expert pool) on an RTX 5090 or RTX 4060.
Suggested by AI. Adapt it to your setup.
Has This Been Done?
Studies like CECAR explore cache and expert co-aware routing, while other works examine cache replacement for LLM prefix reuse. They do not specifically implement a token-fanout-sorted replacement policy targeting missing experts alongside scan-resistant aging counters for device-resident residency tables.
- SAEM: Stage-Aware Expert Management for Memory-Efficient MoE Inference in Chain-of-Thought Reasoning · 2026 · 1 citations
- ReMoE: Boosting Expert Reuse through Router Fine-Tuning in Memory-Constrained MoE LLM Inference · 2026 · 5 citations
- CECAR: Cache & Expert Co-Aware Routing Accelerates On-Device Inference of MoE LLMs · 2026 · 0 citations
- When Fancy Eviction Fails: Rethinking Cache Replacement For LLM Prefix Reuse · 2026 · 5 citations
We searched OpenAlex and arXiv for “MoE expert cache replacement frequency batch aware LRU thrashing” and “Frequency- and Batch-Aware Expert Cache Replacement Beyond Global LRU” and an AI compared the idea with the top 10 results. A small search can miss relevant work.
Source Paper
FreeToken: Efficient Edge-Native MoE Serving with Bandwidth-Adaptive ExecutionShuo Yang, Xiaoze Fan, Melissa Pan +8 more · 2026
FreeToken is an edge-native Mixture-of-Experts (MoE) serving system that enables personal consumer hardware, from an 8 GB laptop GPU to a single workstation GPU, to interactively run 35B to 753B open-weight models on agentic workloads. It achieves 1.3-2.3x higher decode throughput and avoids multi-minute tail prefill stalls compared to llama.cpp, Ollama, KTransformers, and MoE-Infinity by orchestrating GPU VRAM, CPU compute, host memory, and PCIe bandwidth as a unified elastic platform.
Related Ideas
- Unified Co-Management of KV Cache Blocks and MoE Experts Under Memory PressureTideway: Phase-Aware Tiered Memory Management for MoE Inference on Consumer Devices🟠Medium
- Workload-Adaptive Dynamic Expert Caching for Hybrid GPU-CPU On-Device ExecutionClover-35B-A3B-Preview Technical Report🟡Fairly easy
- Graph-Compatible Dynamic Sparse Attention for End-to-End Prefix CaptureTideway: Phase-Aware Tiered Memory Management for MoE Inference on Consumer Devices🟡Fairly easy
- Boundary-Aware Sparse Token Routing for Real-Time 4K Streaming DepthDepth Pro 2: Sharp and Temporally Consistent Metric Monocular Depth🟠Medium
- Unified Adapter-Swappable Serving to Eliminate Multi-Engine OverheadWeVisForensics: Self-Evolving Agent for Omni AI-Generated Video Detection🟡Fairly easy