TL;DR
Serving massive Mixture-of-Experts (MoE) models on a limited GPU budget gets tricky when experts are compressed to different sizes: keeping the most "popular" experts in GPU memory wastes precious space if they are already fast to run on the CPU. RankServe solves this by valuing GPU memory like real estate, prioritizing experts by the milliseconds saved per byte relative to their cheapest fallback option. Built on vLLM with a custom runtime for mismatched matrix shapes, it cuts inference latency roughly in half compared to state-of-the-art offloading systems.
What Problem Does This Paper Address?
Mixture-of-Experts (MoE) models achieve massive scale by only activating a fraction of their "experts" (specialized sub-networks) for any given token. While this keeps computation light, memory is still a headache: you have to store the entire pool of experts somewhere. When they don't fit in GPU VRAM, systems offload excess weights to CPU RAM, shuffling them back and forth or running some math directly on the CPU.
To shrink these footprints further, recent compression techniques factorize expert weight matrices into smaller low-rank matrices. Because some experts are more sensitive to compression than others, modern methods assign heterogeneous (non-uniform) ranks across experts to preserve accuracy.
Suddenly, every expert has a different memory size, transfer time, and compute profile:
Existing offloading systems typically decide which experts get VIP access to GPU memory based on simple popularity (how often an expert is called) or pure transfer cost. With variable-rank experts, that intuition breaks down. A super-popular, tiny-rank expert might execute so cheaply on the CPU that caching it on the GPU saves almost nothing. Meanwhile, a massive expert might save lots of time per hit, but hog enough memory to evict four medium experts that would have saved more time combined. How do you pack the GPU cache and route work when no two experts cost the same?
Methods
RankServe takes a compressed MoE checkpoint with fixed, non-uniform ranks and orchestrates CPU–GPU execution on top of vLLM without altering router decisions. It introduces three main innovations over standard caching and offloading:
- Savings-Per-Byte Cache Planning: An offline profiler measures each expert’s CPU latency, GPU latency, and CPU-to-GPU transfer time across token loads. RankServe frames GPU residency as a 0–1 knapsack problem. An expert's value isn't its popularity—it's the time saved by running on the GPU compared to the cheaper of the two cache-miss paths (running on CPU vs. fetching weights to GPU), summed over expected demand and divided by the expert's byte size.
- Decoupled Online Scheduling: During decoding, routing patterns shift. RankServe updates residency priorities using a sliding window of recent history. Crucially, it separates immediate execution from cache admission. If a non-resident expert gets slammed with a huge batch of tokens right now, RankServe can fetch it into a temporary GPU buffer for fast execution without evicting higher-value long-term residents from the main cache.
- Variable-Rank GPU Runtime: Standard grouped matrix multiplication (GEMM) kernels expect uniform shapes, usually forcing systems to pad compressed experts up to the largest rank—wasting math and memory. RankServe uses Triton to pack variable-sized output tiles and reduction chunks, feeding them into CUTLASS so all heterogeneous experts execute in a single grouped launch per projection stage with zero padding.
Datasets
No new benchmarks were introduced. The authors evaluated system latency and throughput using ShareGPT prompts. To verify model quality under heterogeneous low-rank compression and activation tweaks, they measured perplexity on WikiText-2, PTB, and C4, alongside zero-shot accuracy across six reasoning tasks: OpenBookQA, ARC-Easy, WinoGrande, HellaSwag, PIQA, and MathQA.
Key Insights and Ideas
- Value GPU residency by what happens on a miss: If an expert can run quickly on the CPU when given just one or two tokens, keeping it on the GPU buys you almost nothing. Evaluating residency against the cheaper nonresident fallback prevents overvaluing experts that are expensive to transfer yet cheap to compute on the host.
- Neither rank nor frequency tells the whole story: As shown below, caching purely by rank hogs space on rarely used giants, while caching purely by frequency wastes slots on cheap lightweights. Balancing both via savings per byte tracks remarkably close to an oracle policy.
- Activation frequency $\neq$ token load: An expert triggered on every step might still only receive 1 token per step (favoring CPU execution), whereas a sporadic expert might receive 32 tokens at once (favoring weight transfer + GPU execution). Using the same underlying cost model across two timescales—history for caching, current load for miss-routing—keeps both decisions aligned.
Key Results
Evaluated on DeepSeek-MoE-16B, Mixtral-8x7B, and Qwen3-30B-A3B (using 40% RFID-MoE compression) against six baselines (including KTransformers, Fiddler, and HybriMoE) on an RTX A6000 + Threadripper platform:
- Latency Speedups: Across batch sizes 1 to 32, RankServe achieves geometric-mean speedups of 1.69–2.29$\times$ in Time to First Token (TTFT) and 1.71–2.48$\times$ in Time Per Output Token (TPOT) over the fastest baseline in each individual configuration.
- Throughput: Reaches up to 104.2 tokens/s on DeepSeek-MoE-16B and 61.5 tokens/s on Qwen3-30B-A3B at batch size 32, outperforming all baselines across almost every tested setting (trailing HybriMoE only on Mixtral at batch size 1).
- Ablation Highlights: Removing the custom variable-rank GPU runtime degrades TPOT by 49.8%, and disabling online residency feedback degrades TPOT by 47.7%, confirming that kernel efficiency and dynamic adaptation are equally vital.
Limitations and Future Work
- Simplified Planning Math: The authors note that their knapsack planning formulation uses an additive cost model. It excludes initial cache-loading overhead and does not explicitly model PCIe contention or compute/transfer overlap, making it a heuristic guide rather than an exact predictor of end-to-end latency.
- Checkpoint Assumptions & Baseline Differences: RankServe operates on pre-compressed low-rank checkpoints (and swaps SiLU activations for linear ones in certain compression schemes to aid optimization, though experiments show accuracy slightly improves), whereas the evaluated serving baselines run uncompressed/quantized representations natively supported by their runtimes.
- Hardware Bottlenecks: Moving from an RTX A6000 to a much brawnier A100 GPU yielded only moderate latency gains because both setups remained tethered to PCIe 4.0 $\times$16 transfer and CPU bottlenecks. Future directions are not explicitly discussed in the paper.
Summary updated