TL;DR
Running large Mixture-of-Experts (MoE) models on limited hardware requires offloading expert weights to the CPU, creating a massive I/O bottleneck during inference. This paper introduces an expert prefetching and speculative execution scheme that uses internal model representations to predict and fetch future experts ahead of time. By overlapping memory transfers with GPU computation and speculatively executing predicted experts, the approach speeds up inference by up to 14% with negligible impact on accuracy.
What Problem Does This Paper Address?
Mixture-of-Experts (MoE) architectures allow large language models (LLMs) to scale up to hundreds of billions of parameters without a proportional increase in computational cost. They achieve this by activating only a small subset of "experts" (feed-forward networks) for each token.
However, when deploying these massive models in resource-constrained environments (like a single GPU or consumer hardware), the expert weights cannot all fit into the GPU's high-bandwidth memory (HBM). Instead, they must be offloaded to CPU RAM and fetched on-demand. This creates a severe I/O bottleneck: for a model like Qwen3-30B-A3B on an NVIDIA A6000 GPU, CPU-to-GPU memory transfers consume a staggering 84–88% of the time per output token (TPOT).
Prior attempts at prefetching experts try to predict what is needed next, but treat mispredictions as cache misses—meaning they stop to re-fetch the correct expert from the CPU, destroying any parallel processing advantages.
Methods
The authors propose a novel expert prefetching pipeline integrated into an optimized inference engine called YALIS.
Key components include:
- Quasi-Hidden State ($q_l$): To predict which experts layer $l+1$ will need while currently processing layer $l$, the authors approximate the next layer's router input. They combine the current post-attention residual stream with an offline-computed "default vector" (the average activation behavior of experts) to counteract representation drift between layers.
- Speculative Execution: Instead of treating incorrect expert predictions as cache misses, the system boldly executes the predicted experts anyway using the predicted routing weights. This ensures that memory transfers and GPU computations always overlap perfectly.
- Neural Expert Prefetcher: For models where representations drift drastically in early layers, the authors train a lightweight, shallow feed-forward network via distillation. This neural estimator acts as a drop-in replacement to predict router logits one layer in advance.
- Hybrid Prefetching: Combining the best of both worlds, this strategy uses the neural estimator only on high-drift layers and relies on the parameter-free quasi-hidden state for the rest of the network.
Datasets
The approach was evaluated across several standard, reasoning-heavy downstream LLM benchmarks to measure the impact of speculative execution on accuracy:
- Coding: HumanEval, MBPP+
- Mathematics: GSM8k, AIME24, AIME25
- Commonsense Reasoning: StrategyQA
No new datasets were introduced. The evaluations were performed using popular open-source MoE models, including Qwen3-30B-A3B, GLM-4.7-Flash, GPT-OSS-120B, and Qwen3-235B-A22B.
Key Insights and Ideas
- Dominant Experts are Highly Predictable: Speculative execution works without tanking model accuracy because the highest-ranked experts (those contributing the most to the MoE layer's activation) have very high prediction hit rates. Mispredictions typically occur among lower-ranked experts that carry minimal routing weight and have negligible impact on the final output.
- Drift is Non-Uniform: Representation drift—the change in internal token representations from layer to layer—is highly concentrated in the earliest layers of certain models (like Qwen3). Identifying this allowed the authors to use a highly targeted hybrid approach rather than deploying heavy neural estimators across the entire network.
Key Results
- Inference Speedups: The prefetching scheme achieved a 5% to 14% reduction in TPOT compared to traditional on-demand loading. The gains were more pronounced on weaker GPUs (like the A6000 vs. A100/GH200) where compute-to-copy ratios are lower.
- Compute-Memory Overlap: Timeline traces confirm that CPU-to-GPU memory transfers were successfully hidden behind GPU computation tasks on separate CUDA streams.
- Accuracy Preservation: For GPT-OSS models, parameter-free speculative execution maintained baseline accuracy. For Qwen3-30B-A3B, the Hybrid-PF approach successfully recovered the majority of the accuracy gap caused by early-layer drift (e.g., recovering 37% of the accuracy gap on GSM8k).
Limitations and Future Work
The current study focuses entirely on CPU-to-GPU memory transfers on single-GPU setups. The authors note that a natural next step is extending this framework to even more constrained environments, such as smartphones or embedded systems, where prefetching would happen from disk (storage) to CPU memory.
Additionally, they suggest exploring "router-free inference," where a single trained neural estimator completely replaces per-layer routing to eliminate serial overhead entirely, as well as multi-layer prefetching schemes.
Summary updated