When a Mixture-of-Experts (MoE) model does not fit in GPU memory, batch-1 decoding is dominated by copying expert weights from host memory. Cache-aware routing reduces these copies by biasing the router toward resident experts, but combined with asynchronous prefetching it makes the model's outputs depend on transfer timing, so a harness that does not simulate that timing no longer evaluates the deployed model. We propose prefetch-steered routing (PSR): routing conditions on a deterministic logical cache, into which at most n experts predicted by the next layer's router are inserted per layer and token; physical copies affect only latency. On OLMoE-1B-7B with 50% and 25% of experts resident on an RTX 4090, PSR decodes 2.2-2.3x faster than exact routing with LRU and 25-30% faster than the Cache-Prior operating point, with mean benchmark differences of +0.1 and +0.5 points (95% lower bounds -0.8 and -0.3). In greedy generation its lead over Cache-Prior depends on the workload and reverses on HumanEval at 50% residency. On Moonlight-16B-A3B, PSR is 1.9x faster than exact routing with LRU at 37.5% residency and, at the latency of Cache-Prior, significantly better on three of eight benchmarks. On Qwen3.6-35B-A3B, where copies are cheap relative to computation, PSR keeps its advantage over Cache-Prior on the likelihood benchmarks but not its speed. Distillation-trained gates did not help. Speculative decoding with block-level expert selection was slower than PSR with a 1B autoregressive drafter on OLMoE, but with a block drafter on Qwen3.6 it was 2.1-2.9x faster than any autoregressive configuration with at most its GPU memory on the 64 prompts we timed.
Figures & tables
prefetch copies in flight
1
2
4
C=32 , λ=0.2 , cross-layer prefetch of 8
physical cache
8.755 (0.041)
8.674 (0.054)
8.627 (0.048)
logical cache
8.509 (0.000)
8.509 (0.000)
8.509 (0.000)
C=16 , λ=0.25 , cross-layer prefetch of 8
physical cache
9.097 (0.013)
9.015 (0.013)
8.864 (0.027)
logical cache
8.587 (0.000)
8.587 (0.000)
8.587 (0.000)
Table 1: Perplexity (12 windows) of Cache-Prior routing with A eviction and cross-layer prefetch of 8 when only the number of prefetch copies in flight changes; mean of 3 runs, with the range across runs in parentheses. Physical cache: routing sees the experts whose copies have been issued (the scheduler also prefetches by token prior). Logical cache: routing sees the logical cache of PSR (unbounded insertion). With routing on the physical cache, outputs depend on the scheduler parameter and vary between runs; with the logical cache they do not.
C=32 (50%)
C=16 (25%)
config
sg%
ms
p99
copies (stall)
sg%
ms
p99
copies (stall)
all experts resident (C=64)
0.0
6.8
7
0.0 (0.0)
(same)
exact routing, LRU
0.0
24.7
52
30.5 (30.5)
0.0
42.5
69
61.4 (61.4)
exact routing, A eviction
0.0
22.9
48
27.5 (27.5)
0.0
41.4
68
59.2 (59.2)
exact routing, best cache + prefetch †
0.0
20.5
43
30.7 (16.9)
0.0
37.8
63
62.5 (42.6)
exact routing, logical prefetch ( n=8 )
0.0
20.9
44
31.6 (16.7)
0.0
39.0
64
65.2 (43.8)
Table 2: Engine latency on OLMoE-1B-7B, RTX 4090. sg% = selfgen excess perplexity (KL diagnostic, lower is closer to exact routing). ms = mean per-token latency, p99 = 99th percentile, copies = expert copies per token; in parentheses, demand copies, issued only when the layer needs the expert. Prefetch copies that are still in flight when needed also delay the layer ( Figure 4 ). † Routing or caching depends on transfer timing; for exact routing this affects latency only. PSR rows use A eviction (except the row marked LRU) and cross-layer prefetch with a budget of n new insertions per layer and token.
Figure 1: Latency vs. divergence from exact routing (selfgen excess, a KL diagnostic) for λ∈{0.1,0.15,0.2,0.25,0.3} (labels on Cache-Prior and n=1 curves). PSR with a budget of one insertion per layer and token is the fastest configuration at every divergence level its λ sweep covers; unbounded prefetch is closest to exact but slow. Quality claims rest on the benchmarks of Figure 3 .
Figure 2: Distribution of per-token decode latency at 50% (top) and 25% (bottom) residency: fraction of tokens slower than x (log scale), over all tokens of the 3 timing repetitions.
C
config
ms
MMLU
ARC-C
HellaS.
GSM8K
BBH
IFE-P
IFE-I
HumanE.
MBPP
mean
–
exact routing
24.7/42.5
52.4
49.0
60.6
33.2
36.0
41.2
52.3
32.9
28.8
–
32
CP λ 0.2
14.3
− 0.3
− 0.5
− 0.9
+0.3
− 0.6
− 2.2
+0.5
+3.0
+0.2
− 0.13
32
CP λ 0.3
11.1
− 1.1
− 2.3 †
− 2.4
+0.1
− 2.9 †
− 2.4
− 1.8
− 1.8
− 0.6
− 1.69
32
PSR λ 0.2 n 1
12.0
− 0.7 †
+0.1
− 0.2
+1.3
− 0.2
− 0.7
− 0.4
+0.6
− 0.4
− 0.04
32
PSR λ 0.3 n 1
10.7
− 0.8 †
− 0.5
− 0.4 †
+0.2
− 0.9
− 2.4
− 2.5
+5.5 †
− 0.8
− 0.03
32
spec. exec.
20.0
− 1.3
+1.5
− 0.9
− 0.7
− 1.9 †
− 2.0
− 0.2
+1.2
+1.0
− 0.39
Table 3: Benchmark scores relative to exact routing (points; paired over identical questions; bold : significant after Holm’s correction over the table’s 90 tests; † : p<0.05 before correction only). The first row gives absolute scores of exact routing. ms is engine latency at the configuration’s residency. IFE-P/IFE-I = IFEval strict prompt/instruction accuracy. Mean = average over the eight tasks with IFE-P. Speculative execution’s outputs do not depend on residency; its two rows share one benchmark run.
C
PSR (ms)
vs. (ms)
MMLU
ARC-C
HellaS.
GSM8K
BBH
IFE-P
IFE-I
HumanE.
MBPP
mean
iso-latency
32
PSR λ 0.3 n 1 (10.7)
CP λ 0.3 (11.1)
+0.3
+1.8
+2.0
+0.1
+2.0 †
0.0
− 0.7
+7.3 †
− 0.2
+1.7 ± 1.0
16
PSR λ 0.25 n 1 (19.2)
CP λ 0.3 (20.7)
+1.2
+0.3
+1.9
+3.4 †
+2.3 †
+3.5
+3.8 †
+5.5
− 0.2
+2.2 ± 1.0
vs. CP operating point
32
PSR λ 0.3 n 1 (10.7)
CP λ 0.2 (14.3)
− 0.5
0.0
+0.4 †
− 0.2
− 0.3
− 0.2
− 3.0
+2.4
− 1.0
+0.1 ± 0.9
32
PSR λ 0.2 n 1 (12.0)
CP λ 0.2 (14.3)
− 0.4
+0.6
+0.6
+1.0
+0.4
+1.5
− 0.8
− 2.4
− 0.6
+0.1 ± 0.8
Table 4: Direct paired comparisons of PSR with Cache-Prior (and speculative execution) on identical questions (points; bold : significant after Holm’s correction over the table’s 81 tests; † : p<0.05 before correction only). Mean ± 95% interval over the eight tasks. Iso-latency pairs run at about the same ms/token; the other pairs compare PSR with the Cache-Prior operating point of Table 3 ( λ=0.2 ), which is slower. A mean difference that is not significant does not show equal quality; its 95% lower bound limits how much worse PSR can be on average. Speculative execution does not depend on residency, so one benchmark run serves both C .
Figure 3: Mean benchmark difference to exact routing over eight tasks ( ± 95% interval) against decode latency, at 50% (top) and 25% (bottom) residency.
task
harness
engine
engine − harness
PSR λ 0.3 n 1 vs. CP λ 0.2
GSM8K
− 0.2
− 0.8
− 0.7 ± 3.5
IFEval-P
− 0.2
+1.7
+1.8 ± 4.3
IFEval-I
− 3.0
+0.7
+3.7 † ± 3.5
HumanEval
+2.4
− 1.8
− 4.3 ± 4.6
PSR λ 0.2 n 1 vs. CP λ 0.2
Table 5: Engine-generated benchmarks against the harness at 50% residency: paired difference between two configurations (points) in the harness and in the engine on the same questions, and the difference of the two with its 95% interval ( † : p<0.05 before Holm’s correction over the table’s 20 tests; none survives it).
TF
GSM8K
IFEval
HumanEval
config
ms
ms
p99
cp.
ms
p99
cp.
ms
p99
cp.
50% residency
exact, LRU
24.7
21.6
44.3
26.4
22.4
51.9
27.2
14.3
34.6
13.5
CP λ 0.2
14.3
10.8
23.4
5.2
12.1
29.5
7.5
8.1
14.6
1.4
PSR λ 0.3 n 1
10.7
9.5
14.0
10.9
9.9
18.3
12.0
8.4
11.2
6.9
PSR λ 0.2 n 1
12.0
10.2
19.2
12.3
10.7
22.8
13.0
8.6
13.4
7.1
Table 6: Latency in greedy free generation on 77 benchmark prompts (decode only; ms per generated token, its 99th percentile, and expert copies per token; means over 3 interleaved rounds), next to the teacher-forced latency (TF) of Table 2 . Ratio rows: PSR over Cache-Prior per task, with the 95% interval over rounds (paired on log latency), which measures run-to-run repeatability on this fixed prompt set; bold: significant after Holm’s correction over the table’s 9 ratios. Over prompts: 95% interval of the same ratio from resampling the task’s prompts, and the number of prompts on which PSR is faster per token.
Figure 4: Expert copies per token at 50% (top) and 25% (bottom) residency: demand copies, issued when the layer needs the expert (full wait); prefetch copies of executed experts that are still in flight when the layer is scheduled (partial wait) or that arrived in time; and prefetch copies whose expert was never executed. Dots: ms/token (right axis).
Figure 5: Moonlight-16B-A3B: latency vs. KL divergence from exact routing at three cache sizes. PSR uses n=1 and a pre-gate window of 4 candidates (lines), 8 or 2 (single points); labels give λ . Exact routing with logical prefetch is PSR’s prefetching without the bonus. Means over 3 interleaved rounds with 95% intervals. Off exact routing, every point on the latency–KL Pareto front is a PSR configuration.
config
ms
copies
KL
MMLU
ARC-C
HellaS.
GSM8K
BBH
IFE-P
IFE-I
HumanE.
MBPP
mean
exact, LRU
43.6
36.7
0.000
67.9
57.5
62.2
74.5
66.6
44.2
56.0
58.5
57.8
–
exact + prefetch
34.6
41.3
0.000
outputs identical to exact routing
CP-A λ 0.2 (A eviction)
25.9
13.4
0.028
− 0.6
− 0.7
− 0.3 †
+0.8
− 2.1 †
− 1.7
− 1.8
− 4.3
− 2.2
− 1.37
CP λ 0.4 (LRU)
21.5
8.0
0.072
− 1.1
− 2.0 †
− 0.8
− 1.6
− 3.7
− 5.5 †
− 5.9
− 1.2
− 0.2
− 2.03
PSR λ 0.3
21.3
16.8
0.029
− 0.6 †
− 1.7 †
− 0.4 †
+0.6
− 1.7 †
− 0.9
− 1.1
− 2.4
− 1.0
− 1.03
PSR λ 0.2
22.6
18.5
0.021
− 0.3
− 0.9
− 0.3 †
+1.8
− 1.5 †
− 0.9
− 0.6
− 1.2
− 0.6
− 0.48
Table 7: Moonlight-16B-A3B with C=24 of 64 experts resident (37.5%). ms = mean engine latency per token over 3 rounds; copies = expert copies per token; KL from exact routing. Benchmark columns as in Table 3 : the first row gives the absolute scores of exact routing, the other rows the paired difference to it ( bold : significant after Holm’s correction over the table’s 54 tests; † : p<0.05 before correction only); the last two rows compare PSR λ=0.2 directly with the two Cache-Prior configurations at about the same latency (iso-lat.) and the closest KL (sim. KL), with the mean ± 95% interval. PSR uses the A priority, n=1 and a pre-gate window of 4.
Figure 6: Qwen3.6-35B-A3B (FP8): latency vs. KL divergence from exact routing at three cache sizes of 256 experts per layer. PSR uses n=1 and a pre-gate window of 4 or 2 candidates; labels give λ . Means over 3 interleaved rounds with 95% intervals. Every cache-aware configuration runs within 3 ms of the fastest; at the fast end of the Pareto front, it includes Cache-Prior configurations.
config
ms
copies
KL
MMLU
ARC-C
HellaS.
GSM8K
IFE-P
IFE-I
HumanE.
mean
exact, LRU
30.0
53.5
0.000
83.6
54.6
63.4
95.5
83.5
88.7
58.5
–
exact + prefetch
27.8
56.2
0.000
outputs identical to exact routing
CP λ 0.2 (LRU)
23.6
8.3
0.051
− 1.3
− 1.5
− 0.8
− 0.3
− 0.4
+0.1
+3.0
− 0.21
PSR λ 0.2
24.1
16.5
0.029
− 0.4 †
− 0.4
− 0.3
− 0.7
− 2.6
− 1.6
+0.6
− 0.63
PSR vs. CP
24.1 vs. 23.6 ms
+0.8
+1.1
+0.6
− 0.4
− 2.2
− 1.7
− 2.4
− 0.4 ± 1.0
Table 8: Qwen3.6-35B-A3B (FP8) with C=64 of 256 experts resident (25%). ms = mean engine latency per token over 3 rounds; copies = expert copies per token; KL from exact routing. Benchmark columns as in Table 7 , on a reduced suite of six tasks ( Appendix A ): the first row gives the absolute scores of exact routing, the other rows the paired difference to it ( bold : significant after Holm’s correction over the table’s 21 tests; † : p<0.05 before correction only); mean over the six tasks with IFE-P. The last row compares PSR directly with Cache-Prior, with the mean ± 95% interval. Both configurations were fixed before any benchmark was run.
HumanEval
GSM8K
config
pass@1
τ
copies
ms
strict
τ
copies
ms
AR, all experts resident (exact routing)
32.9
–
0.0
6.1
33.2
–
0.0
6.5
AR-PSR λ 0.25
30.5
–
10.0
9.2
32.8
–
15.2
11.3
AR-PSR λ 0.3
34.8
–
9.8
9.1
33.4
–
14.1
10.5
SD, exact verification
31.1
6.5
29.3
27.3
33.1
4.9
59.7
53.2
SD, block selection, position weights
35.4
6.7
6.2
13.6
34.3
–
Table 9: Speculative decoding (SD) on OLMoE with P=24 experts per layer (37.5%), RTX 4090, batch 1. pass@1 and strict: full benchmarks (164 and 1319 problems) in the harness. τ = committed tokens per verification, copies = expert copies per generated token, ms = decode latency per generated token: all three from the engines on the timed subset (the first 80 HumanEval and 48 GSM8K problems). The copy ratios quoted in Section 7 use the copies of the full benchmark runs instead, which have longer accepted runs on HumanEval. AR-PSR = PSR with C=24 and n=1 . SD rows use k=16 drafts from OLMo-1B unless noted. Position weights are AcceptMoE’s; confidence + top-1 is our variant ( Section 7 ). “Copies skipped” runs the same routing without any PCIe copy and gives the compute-only time; it and k=8 were only timed. –: not measured.
GSM8K (32 prompts)
HumanEval (32 prompts)
config
ms
copies
τ
strict
ms
copies
τ
pass@1
AR C=64 , exact routing, LRU
36.3
85.0
–
78.1
36.0
82.6
–
100.0
AR C=64 , CP λ 0.2
24.8
9.2
–
75.0
24.3
6.4
–
100.0
AR C=64 , PSR λ 0.2
25.8
24.7
–
81.2
25.7
23.9
–
100.0
AR C=128 , exact routing, LRU
27.9
28.7
–
78.1
28.0
30.0
–
100.0
AR C=128 , CP λ 0.2
24.4
2.5
–
84.4
24.2
1.8
–
100.0
Table 10: Qwen3.6-35B-A3B (FP8): speculative decoding (SD) with the DFlash block drafter against AR decoding, batch 1, on the first 32 GSM8K and 32 HumanEval problems as single chat prompts (thinking disabled, greedy, at most 512 new tokens); means over 3 rounds. AR rows at C=64 (25%), C=128 (50%, the expert slots of SD) and C=148 (the largest AR capacity within SD’s peak GPU memory, drafter included); rows at C≥128 and the compute-only AR row (no copies, forced along exact routing’s continuation) come from three further rounds. SD rows: a pool of P=64 experts per layer between blocks plus 64 slots for a block’s union, k=15 . ms = decode latency per generated token; copies = expert copies per generated token; τ = committed tokens per verification; strict and pass@1 = scores of these generations (identical in every round). “Copies skipped” runs the same selection without any PCIe copy and gives the compute-only time; its outputs are not meaningful.
method
prediction
executed
routing reads
Cache-Prior
–
router+bonus
LRU state
SpecMD (bonus)
next router
router+bonus
physical
SMoE, MoE-CORE
next router
router, subst.
physical
Spec. Experts
next router ∗
predicted
none
CommitMoE
trained MLP
predicted
none
PSR
next router
router+bonus
logical
Table 11: How methods that change the executed experts use predictions and cache state. Prediction: of layer l ’s experts before layer l runs. Executed: what decides the experts that run. Routing reads: the cache state that selection depends on ( physical = filled by asynchronous copies, hence timing-dependent; logical = PSR’s cache with at most n insertions per layer and token). subst. = substitution of missed experts.
Mixture-of-Experts language models use input-dependent routing to activate a small subset of expert networks, increasing capacity without proportional compute.
Mixture-of-Experts (MoE) models have gained popularity as a means of scaling the capacity of large language models (LLMs) while maintaining sparse activations and reduced per-token compute. However, in memory-constrained inference settings, expert weights must be offloaded to CPU, creating a performance bottleneck from CPU-GPU transfers during decoding. We propose an expert prefetching scheme that leverages currently computed internal model representations to speculate future experts, enabling memory transfers to overlap with computation. Across multiple MoE architectures, we demonstrate that future experts can be reliably predicted by these internal representations. We also demonstrate that executing speculated experts generally maintains downstream task accuracy, thus preserving more effective compute-memory overlap by eliminating the need to re-fetch true router-selected experts. Integrated into an optimized inference engine, our approach achieves up to 14% reduction in time per output token (TPOT) over on-demand loading of experts from CPU memory. For MoEs where speculative execution alone yields suboptimal accuracy, we further examine lightweight estimators that improve expert prediction hit rates, thereby reducing performance degradation. Our code is released in open-source at https://github.com/axonn-ai/yalis/tree/offload_prefetch.
Mixture-of-Experts (MoE) models activate few experts per token, yet their full expert sets can exceed GPU memory and require repeated weight transfers during decoding. We formulate expert-cache management as a model-side algorithmic problem and propose cache-aware post-training that jointly adapts the MoE backbone and lightweight auxiliary routers while preserving the native inference-time Top-K rule. The update-only Temporal Router learns same-layer retention across tokens without proactive loading. The full Spatio-Temporal Router adds a Spatio Router that uses the causal predecessor's hidden state to refine the temporal cache before target-layer access. We evaluate both modes on Qwen3 and GPT-OSS across GSM8K, MATH, and CommonsenseQA. Temporal Router consistently improves hit rate and reduces expert-weight traffic over matched LM-only baselines. On Qwen3, the full mode improves adjusted hit rate by 1.15--18.03 points and reduces traffic by 4.6--53.3% relative to the strongest evaluated prefetching baseline; GPT-OSS results are competitive but task-dependent. Auxiliary-only training preserves baseline accuracy but yields modest coverage gains; joint post-training achieves substantially higher coverage. Sensitivity analyses distinguish the effects of cache capacity, refinement budget, and cache-loss weight on coverage, traffic, and quality.
Zhenhe Wu, Yaping Jin, Qinghua Xing +6
Huawei Technologies · Beihang University · Tianjin University +2
Serving a 235B-parameter Mixture-of-Experts (MoE) model on a single 8 GB GPU is bottlenecked not by compute but by memory bandwidth: decode must stream each token's active experts from whichever tier holds them, and on consumer hardware most experts sit on an SSD far slower than RAM. We quantify this bandwidth wall on Qwen3-235B (Q4_K_M, 134 GB): measured decode is 0.44 tok/s warm, matching a bytes-per-token / bandwidth model, while a batching scheme that should amortize one disk sweep instead collapses at batch 32 from paging thrash. We build llama-moe-trace, a zero-surgery router-telemetry tool, and measure routing on Qwen3-30B: adjacent-token expert reuse is 2.0x chance, 95% of traffic uses 52.5% of experts, and an LRU cache of 13.4% of experts serves 66% of requests. We then ask whether cacheability is trainable: we pre-register training of 137M MoE language models with auxiliary locality and domain router losses, under joint criteria on cache-miss reduction and perplexity. The mechanism works (misses down up to 60%; a 99% static-pin hit rate) but every configuration fails the pre-registered <=1% perplexity gate -- miss reduction and quality are tightly coupled. Concurrent StickyMoE reports the same loss as near-free on single-domain sub-25M models; on multi-domain 137M we find the tax real. Our contribution is this pre-registered, stricter-criterion, multi-domain evaluation plus edge-serving measurements. A 340M rung shows the tax does not shrink with scale (it rises slightly). We further show training-free cache-aware rerouting stacks with trained locality -- together ~80% miss reduction at <=3.4% perplexity at both sizes, far cheaper than either alone -- while domain-primed prefetching does not help. All code, traces, and the pre-registration are released.