SGLang Paged Experts Serves Oversized MoE Models on a Single Consumer GPU
Summary:SGLang has merged Paged Experts into its main branch, allowing MoE checkpoints larger than a GPU's VRAM to remain fully GPU-computed. Each layer keeps K resident expert blocks in VRAM, a host-side copy in pinned RAM, and overflow storage on NVMe. Before the fused MoE kernel runs, a decision step inside the decode CUDA graph checks routed expert IDs, copies misses over PCIe into least-recently-used slots, and leaves both routing and layer computation unchanged. On an RTX 5070 Ti with 16GB of VRA
SGLang has merged Paged Experts into its main branch. The feature does not reduce a model's top-k routing or move expert computation to the CPU. Instead, it divides each layer's expert weights into fixed-size, interchangeable blocks: K hot experts remain in VRAM, a host-side copy is held in RAM, and NVMe provides a third tier when RAM capacity is insufficient. A checkpoint can therefore exceed GPU memory while the remaining VRAM is reallocated to KV Cache, longer contexts, or higher-precision weights.
Core mechanism: treating VRAM as an expert cache
For a layer with homogeneous experts, the router still scores all E experts and selects the same top-k set. Before the fused MoE kernel executes, the GPU performs the following sequence:
- Compare the routed expert IDs with the resident GPU slots.
- Execute resident experts directly from their current slots.
- Copy missing experts over PCIe into the slot occupied by the least-recently-used expert.
- Run the fused MoE kernel over the resulting slots without requiring it to know where each expert originated.
The decision, copy, and computation are incorporated into the decode step's CUDA graph, reducing per-layer Python orchestration and CPU synchronization. The CPU never executes the MoE math; a missing expert is always brought to the GPU.
At a conceptual level, the memory budget for one layer is:
VRAM = K × S_expert + W_other + KV_Cache + workspace
where S_expert is the size of one expert. Keeping the complete expert set in host memory requires approximately E × S_expert bytes of storage. The design resembles operating-system virtual memory: each expert acts as a fixed-size page, a routing miss acts like a page fault, and LRU determines which resident page is replaced. The critical difference is that paging changes only placement, not the selected experts, and the destination of every page is the GPU rather than the CPU.
This should not be confused with PagedAttention for KV Cache. Paged Experts moves model weights, while KV paging manages attention-cache blocks. They can coexist, but both compete for the same physical VRAM budget.
Why sparse routing makes expert paging viable
The enabling property is not uniformly sparse routing, but strong temporal concentration in routing decisions. Qwen3-30B-A3B has 128 experts per layer, with each token selecting eight. In GPTQ-Int4, the full expert set occupies about 13.9GiB, while the eight selected experts amount to roughly 0.87GiB.
With K set to 91, a uniform router would miss with probability 1 - 91/128, or about 28.9%. The measured routed-expert miss rate, however, was only 0.8%. For the traced workload, that implies a concentration factor of roughly 36. Consecutive tokens repeatedly return to the same popular experts, allowing a small resident set to absorb most accesses.
If m is the routed miss rate and S_expert is the size of one expert, a rough lower bound on additional bytes transferred per layer and decode step is:
transfer_bytes ≈ top_k × m × S_expert
The estimate excludes transfer overlap and pipelining, but it explains how a low miss rate can keep PCIe traffic manageable. MoE decoding is fundamentally a byte-movement problem: once expert misses are removed, the remaining path runs close to the speed limit imposed by weight and KV Cache reads. The article characterizes PCIe reads on its test platform as roughly 16 times slower than VRAM reads, making expert locality more important than small router optimizations.
LRU is a practical first choice because it exploits temporal locality. It is not guaranteed to be globally optimal under abrupt routing shifts, mixed model workloads, or long-term expert-popularity drift.
Measured performance: usable throughput for oversized models
The published measurements used an RTX 5070 Ti 16GB desktop with 62GB of RAM, PCIe 5.0 x16, and a PCIe 5.0 NVMe drive. A second system used an RTX 4070 Laptop 8GB with 54GB of RAM under WSL2 and a PCIe 4.0 x8 GPU link.
| Model and quantization | GPU | Resident experts | Decode | Short-prompt TTFT p50 | TTFT p50, roughly 1.5K tokens | |---|---|---:|---:|---:|---:| | Qwen3-30B-A3B GPTQ-Int4 | RTX 5070 Ti 16GB | 91/128 | 241.5 tok/s | 43 ms | 259 ms | | Qwen3-30B-A3B FP8 | RTX 5070 Ti 16GB | 44/128 | 113.0 tok/s | 191 ms | 398 ms | | Qwen3-Next-80B-A3B NVFP4 | RTX 5070 Ti 16GB | 99/512 | 116.2 tok/s | 191 ms | 687 ms | | DeepSeek-V4-Flash-0731 | RTX 5070 Ti 16GB, RAM and NVMe | 8/256 | 13.0 tok/s | Not reported | 8.88–8.91 s | | Qwen3-Next-80B-A3B NVFP4 | RTX 4070 Laptop 8GB, RAM and NVMe | 17/512 | 16.2–16.5 tok/s | 1.35 s | 4.56–4.72 s |
Decode figures were collected for one request after warm-up, with K selected automatically. Rows identified as RAM-tier runs retained a 10,240-token KV Cache, while disk-tier TTFT was measured only with long prompts. Consequently, 116.2 tok/s should not be interpreted as cold-start service throughput, and 13.0 tok/s does not characterize sustained NVMe behavior under random small I/O.
The memory trade-off is visible in the context tests. With Qwen3-30B GPTQ, a 10,240-token KV Cache allowed K=91 and produced 241.5 tok/s. Expanding to the full 40,960-token context reduced K to 62 and throughput to 218.3 tok/s. Running four 16,384-token requests reduced K to 44 and throughput to 183.1 tok/s. Paging preserves correctness as the KV Cache grows, but it leaves less room for hot experts and increases the probability of misses.
The mechanism can also have a small cost when full residency is possible. gpt-oss-20b reached 179.4 tok/s when fully resident on the 16GB card, compared with 176.8 tok/s when Paged Experts retained 31 of 32 experts, a gap of about 1.5%. The team also reports that paged and unpaged layers are bit-identical. GSM8K scores between 0.938 and 0.954 are best interpreted as sanity checks rather than comprehensive validation of long-context retrieval, concurrent serving, or generation quality.
Engineering trade-offs
- Host RAM becomes a hard capacity requirement. A complete expert copy must fit in pinned host memory, with additional space reserved for the OS, model-loading buffers, and KV Cache. Pinned memory improves DMA behavior but also creates page-locking and fragmentation pressure.
- NVMe extends capacity but does not remove latency. The 167GB checkpoint remains usable with RAM and NVMe, yet long-prompt TTFT approaches nine seconds because cold expert reads enter the time-to-first-token path.
- PCIe topology matters. The desktop uses PCIe 5.0 x16, while the laptop exposes PCIe 4.0 x8. Results should not be compared by GPU name alone; NUMA affinity, host-device topology, and any intermediate switching must also be checked.
- Long context and concurrency squeeze the expert cache. A larger KV Cache directly reduces K. Concurrent requests may also broaden the hot-expert set beyond what single-request routing traces predict.
- Server-scale concurrency remains underreported. Most figures demonstrate feasibility and single-request decoding. They do not establish batch scaling, cross-request cache interference, routing-distribution robustness, long-run stability, or recovery behavior.
- Fixed-size paging assumes suitable expert layouts. Layers with heterogeneous expert dimensions require more careful slot allocation and copy granularity, so the conclusions should not be generalized to every MoE architecture without validation.
Deployment guidance for developers
- Use a SGLang build containing the merged feature and enable
--enable-paged-experts. Confirm that the CUDA, driver, GPU architecture, and dependency versions match the selected SGLang commit. - Budget for a complete host-side expert copy. Add local NVMe only when the expert set cannot fit in RAM. NVMe should be treated as a capacity tier, not as DRAM with equivalent bandwidth.
- Set context and concurrency targets before tuning residency. SGLang chooses K after allocating the requested KV Cache, but operators must still preserve space for attention weights, activations, and kernel workspaces rather than maximizing K at the expense of the cache.
- Test both cold and hot paths. Record first-load TTFT, sustained decode after warm-up, PCIe and NVMe read volume, and routed miss behavior over long-running traffic.
- Validate application-level outputs. Compare logits or generations with fixed prompts and sampling settings, while checking long-context recall, tool use, structured output, and task success. GSM8K alone is insufficient.
- Benchmark against a simpler fully resident setup. If the model can fit while preserving an adequate KV Cache, full residency may be operationally simpler. Paging is most valuable when the model clearly exceeds VRAM or when context, concurrency, and precision must compete for a fixed memory budget.
Conclusion
Paged Experts changes MoE serving from a requirement that every weight remain resident in VRAM into a cache model in which the GPU keeps only hot experts and fetches the rest on demand. It preserves top-k routing, keeps expert computation on the GPU, and reuses existing fused MoE kernels. The result is a substantial expansion of the model sizes that consumer GPUs and memory-constrained private deployments can serve. In data centers with high-bandwidth interconnects, its value depends more closely on PCIe topology, routing concentration, and the balance between KV Cache and expert residency.
— END —Source: LMSYS / SGLang Blog (2026-12-02)
Tags: #SGLang #Mixture of Experts #Expert Paging #LLM Serving
Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.
Community Comments