Skip to content
Score 71 ptsAI Products5 min read
Markdown

SGLang Merges Paged Experts: Run MoE Models Beyond Single-GPU VRAM

With --enable-paged-experts, expert weights are paged to host memory or NVMe, letting a 16 GB GPU run a 167 GB model

SGLang Merges Paged Experts: Run MoE Models Beyond Single-GPU VRAM
SGLang Merges Paged Experts: Run MoE Models Beyond Single-GPU VRAMSource Cover
Share
Table of Contents (3)
  1. 01How Paged Experts Works: Treating Expert Weights as a Page Cache for GPU VRAM
  2. 02Measured Performance: Running a 167 GB Model on a 16 GB GPU
  3. 03What It Means for Running Large MoE Models on Consumer GPUs
  4. Industry Impact & Strategic Takeaways
  5. Frequently Asked Questions

Key Takeaways (TL;DR)

  • 01Paged Experts is now in the SGLang main branch; enabling --enable-paged-experts lets MoE models that exceed single-GPU VRAM run inference.
  • 02On a 16 GB RTX 5070 Ti, Qwen3-Next-80B-A3B NVFP4 (48 GB) decodes at 116 tok/s, and DeepSeek-V4-Flash (167 GB) reaches 13.0 tok/s via NVMe.
  • 03The mechanism treats expert weights as a pageable cache, copying them to the GPU over PCIe on demand without changing model outputs; paged and unpaged layers produce bit-identical outputs.

The SGLang team has merged Paged Experts into the main branch. With --enable-paged-experts, only a subset of a MoE model's expert weights reside on the GPU, while the rest live in host memory or NVMe; computation still happens on the GPU. On a 16 GB RTX 5070 Ti, Qwen3-Next-80B-A3B NVFP4 decodes at 116 tok/s, and DeepSeek-V4-Flash reaches 13.0 tok/s.

01

How Paged Experts Works: Treating Expert Weights as a Page Cache for GPU VRAM

The SGLang team announced that Paged Experts has been merged into the SGLang main branch and can be enabled with the --enable-paged-experts flag. The mechanism is designed for mixture-of-experts (MoE) models: each MoE layer keeps only K experts in GPU VRAM, while all experts are simultaneously stored in pinned host RAM. Before layer computation, the GPU compares the experts selected by the router against the resident experts and copies any missing ones over PCIe into least-recently-used (LRU) slots; the entire process runs inside the CUDA graph of the decoding step.

The design borrows from virtual memory: experts are fixed-size weight blocks, and a token either reads one in full or not at all, making them naturally suited to being paging units. A miss is a page fault, and paging only determines where experts sit when the GPU reads them—it never changes which experts participate in computation. Unlike an operating system, the GPU handles page faults itself, and all computation happens on the GPU; the CPU does not participate in the math. When host memory is insufficient, the same approach can extend further to an NVMe drive tier.

With 91 of Qwen3-30B-A3B's 128 experts resident on the GPU, only 0.8% of routed experts miss.
  • Each MoE layer keeps K experts on the GPU, with a full copy of all experts stored in pinned host memory.
  • PCIe copies of missing experts and LRU replacement are performed within the CUDA graph of the decoding step.
  • Paging does not change model outputs; paged and unpaged layers produce bit-identical outputs.

The VRAM Trade-off: Balancing KV Cache Against Expert Residency

Paged Experts turns the VRAM occupied by experts into a tradable resource: freed VRAM can go toward KV cache for longer contexts, more concurrent requests, or larger, higher-precision checkpoints. Take Qwen3-30B GPTQ: with a 10,240-token KV cache and 91 experts resident, it decodes at 241.5 tok/s; with the model's full 40,960-token context and 62 experts resident, 218.3 tok/s; and with four 16,384-token requests and 44 experts resident, 183.1 tok/s. SGLang automatically selects the K value based on the VRAM remaining after allocating the KV cache requested by the user.

The mechanism requires keeping one host-memory copy per expert: 13.9 GiB for Qwen3-30B GPTQ, 40.5 GiB for Qwen3-Next-80B NVFP4, or an NVMe drive for storage. This means users must trade off host-memory capacity against decoding speed, but they are no longer constrained by single-GPU VRAM capacity.

02

Measured Performance: Running a 167 GB Model on a 16 GB GPU

The test setup included a desktop (RTX 5070 Ti 16 GB, PCIe 5.0, 62 GB RAM, PCIe 5.0 NVMe) and a laptop (RTX 4070 Laptop 8 GB, 54 GB RAM, WSL2 environment, PCIe 4.0 x8). On the desktop, Qwen3-30B-A3B GPTQ-Int4 (17 GB) with 91/128 experts resident decoded at 241.5 tok/s; gpt-oss-20b MXFP4 (14 GB) with 28/32 experts resident, 173.5 tok/s; Qwen3-Next-80B-A3B NVFP4 (48 GB) with 99/512 experts resident, 116.2 tok/s; and Qwen3-30B-A3B FP8 (31 GB) with 44/128 experts resident, 113.0 tok/s.

Using the NVMe tier, DeepSeek-V4-Flash-0731 (167 GB) kept 8/256 experts resident on a 16 GB GPU and decoded at 13.0 tok/s; Qwen3.8-Flash-Next-FP8 (186 GB) kept 10/512 experts resident and decoded at 14.9 tok/s. On the laptop, Qwen3-Next-80B-A3B NVFP4 kept 17/512 experts resident and decoded at 16.2 tok/s. GSM8K accuracy validation showed 0.938 for Qwen3-30B GPTQ, 0.951 for the FP8 version, 0.954 for Qwen3-Next, 0.950 for gpt-oss-20b, 0.98 for DeepSeek-V4-Flash, and 0.965 for Qwen3.8.

Fully resident, gpt-oss-20b decodes at 179.4 tok/s; after paging with 31/32 experts resident, it decodes at 176.8 tok/s—only 1.5% slower.
  • On a 16 GB RTX 5070 Ti, Qwen3-Next-80B-A3B NVFP4 decodes at 116.2 tok/s.
  • DeepSeek-V4-Flash (167 GB) decodes at 13.0 tok/s on a 16 GB GPU via NVMe.
  • Paged and unpaged layers produce bit-identical outputs, and GSM8K accuracy is unaffected.

Why It Works: Token Locality and the Shift in the Compute Bottleneck

Paged Experts' effectiveness rests on two observations: each token reads only a few experts per layer, and consecutive tokens tend to revisit the same experts. With 91 of 128 experts resident, only 0.8% of routed experts are not on the GPU when a token reaches a layer. Moreover, in the decoding step, all operations except expert copying are already at the speed limit of reading weights from the GPU, so the PCIe copy overhead introduced by paging is largely offset by locality.

The mechanism does not change what the model computes—only where experts reside. For models that could already be fully resident in VRAM, Paged Experts can also be used to cap the number of resident experts, freeing VRAM for longer contexts or more concurrent requests at the cost of a slight drop in decoding speed.

03

What It Means for Running Large MoE Models on Consumer GPUs

Paged Experts enables consumer GPUs to run MoE models that previously could not be loaded due to insufficient VRAM. On a 16 GB GPU, for example, the 4-bit version of Qwen3-30B-A3B needs 17 GB, the FP8 version needs 31 GB, and Qwen3-Next-80B-A3B NVFP4 needs about 48 GB—all exceeding single-GPU VRAM. By paging expert weights to host memory or NVMe, these models can run inference on consumer hardware, though decoding speed drops with model size and storage tier.

The approach requires users to have sufficient host memory or high-speed NVMe storage and to trade off decoding speed against context length. For developers and researchers in the Asia-Pacific region, this means they can experiment with large-scale MoE models without a multi-GPU server, lowering the hardware barrier—but production environments still need to evaluate whether throughput and latency meet their requirements.

SGLang automatically selects the number of resident experts K based on the user's requested KV cache, with no manual tuning required.
  • A consumer 16 GB GPU can run MoE models from 48 GB to 167 GB.
  • Sufficient host memory (e.g., 40.5 GiB for Qwen3-Next-80B) or an NVMe drive is required.
  • Decoding speed varies with the proportion of resident experts and the storage tier, so trade-offs must be made per use case.

Impact

Industry Impact & Strategic Takeaways

Paged Experts lowers the VRAM barrier to MoE model inference, enabling consumer GPUs and single-GPU workstations to run models that exceed VRAM capacity—particularly useful for small and midsize teams and researchers in the Asia-Pacific region. The mechanism turns VRAM allocation into an adjustable trade-off and could drive more localized deployments and experimentation, but decoding speed and host-memory requirements remain key constraints for real-world deployment.

Frequently Asked Questions

How do I enable Paged Experts?

+

Add the --enable-paged-experts flag to the SGLang launch command. SGLang will automatically select the number of experts to keep resident on the GPU based on KV cache allocation.

Does Paged Experts change model outputs?

+

No. Paging only changes where experts reside, not which experts participate in computation. Paged and unpaged layers produce bit-identical outputs, and GSM8K accuracy validation confirms results are unaffected.

How much host memory is needed to run a model that exceeds VRAM?

+

You need one host-memory copy per expert—for example, 13.9 GiB for Qwen3-30B GPTQ and 40.5 GiB for Qwen3-Next-80B NVFP4. If host memory is insufficient, an NVMe drive can be used as an extension tier.

Primary Source & Attribution

LMSYS Blog

Paged Experts: Serving MoE Models Larger Than Your GPU in SGLang

Related Deep Dives