arXiv(opens in a new tab)cs.LGAug 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2608.24938

ExFold: Unified Expert Folding for Training-Free MoE Prefill-Decode Acceleration

Juntong Wu, Yifei Liu, Junyi Chen, Siqi Fan, Chaoran Feng, Minghao Li, Liujie Zhang, Weihang Chen, Li Yuan

Abstract

Mixture-of-Experts (MoE) models scale capacity for strong quality while keeping per-token compute bounded through sparse expert activation. Yet low-latency MoE serving is increasingly challenging, because it spans two inference phases with fundamentally different bottlenecks: prefill is dominated by token-wise expert computation, whereas decode is constrained by memory traffic from the batch-wise activated expert set. However, existing training-free acceleration methods optimize only a single resource proxy—either the experts each token executes or the experts a batch activates—and, either discard the excluded experts' contribution or leave it only implicitly approximated. In this paper, we propose ExFold, a unified training-free expert-folding framework for jointly accelerating MoE prefill and decode. ExFold casts both prefill and decode as one budgeted output-approximation problem: execute only a phase-specific constrained expert set while projecting the contribution of budget-excluded experts onto retained experts using calibrated scalar projectors. Motivated by the observation that many expert outputs are directionally aligned but differ in magnitude, ExFold calibrates a pairwise scalar-projector matrix on unlabeled data and uses it at inference time to fold excluded expert contributions into retained experts. Under this view, prefill acceleration becomes token-level Top-K folding, and decode acceleration becomes batch-level expert-pool folding. The two phases differ only in how retained experts are selected, while excluded contributions are recovered by one shared folding mechanism. We implement ExFold as a plug-and-play plugin in vLLM, with a lightweight expert-folding CUDA kernel, delivering up to 1.41×1.41 \times TTFT and 2.45×2.45 \times TPOT speedups while retaining about 99% of the original average quality. Code of ExFold can be seen in https://github.com/Time-Rune/ExFold-MoE.

Introduction

Mixture-of-Experts (MoE) scales model parameters by orders of magnitude while keeping the compute budget bounded by activating only a sparse subset of parameters per token (Fedus, Zoph, and Shazeer 2022; Jiang, Bressand et al. 2024). This property has made MoE the mainstream design of choice for many recent large models seeking higher capability (Jiang, Bressand et al. 2024; Qwen Team 2025; Z.ai 2025). At the same time, it places stringent demands

Figure

Figure 1: MoE prefill and decode have different bottlenecks.

(a) Prefill acceleration

Figure

(b) Decode acceleration

Figure 2: Quality-speed trade-offs for ExFold prefill and decode acceleration.

on low-latency serving (Chen et al. 2026, 2025b; Du et al. 2026) in production: both the prefill latency (time-to-first-token, TTFT) and the decode latency (time-per-output-token, TPOT) matter, and the two exhibit distinct computational characteristics. As shown in Fig. 1, prefill is dominated by token-level expert computation, whereas decode is dominated by batch-level expert memory traffic.

Existing training-free MoE acceleration methods fall into

∗^{*}Equal contribution.

†^{\dagger}Corresponding author.

two families, according to which of these two budgets they optimize. Token-wise expert sparsification reduces the number of experts each token executes, including Dynamic-MoE (Huang et al. 2024), MoDES (Huang et al. 2025), NAEE (Lu et al. 2024), and MC-MoE (Li et al. 2024). Expert-set consolidation instead shrinks the active expert set, through static pruning and merging such as REAP (Lasby et al. 2025), HC-SMoE (Chen et al. 2025a), and Sub-MoE (Li et al. 2025), and dynamic batch-level restriction such as Lynx (Gupta et al. 2024) and SERE (Wu et al. 2026).

Yet both families frame acceleration as a resource-reduction problem: they answer only which experts to execute, and leave the harder question unaddressed—what becomes of the experts they cut. Their treatment of the excluded contribution is, at best, incidental. Pruning and skipping discard it outright (Lu et al. 2024). Static merging bakes it into a single, permanently compressed model that can no longer adapt to the per-token or per-batch budget it actually faces at inference (Li et al. 2024). Similarity-based re-routing swaps an excluded expert for a nearby one, but never calibrates how far the substitute's output strays from the contribution it replaces (Wu et al. 2026). Lost, frozen, or only implicitly approximated, the excluded expert mass is never explicitly reconstructed—so the approximation error compounds as the budget is tightest and these methods are pushed hardest.

We introduce Expert Folding, which projects every budget-excluded expert contribution onto an executed expert instead of discarding it, and build ExFold around it. This design follows two empirical observations (Figure 3): many source experts have at least one target with directionally aligned outputs, while output magnitudes differ substantially across experts. The former makes expert substitution possible; the latter explains why direct re-routing is insufficient and motivates a directed scalar projector that corrects the source-target scale mismatch. Concretely, a single frozen forward pass over unlabeled text calibrates two per-layer matrices—a scalar-projector matrix and a projection-loss matrix: at inference, the loss matrix routes each excluded expert to its minimum-loss target, and the scalar matrix folds each excluded contribution into that target's router weight.

Since folding is defined at the level of individual excluded experts, it applies unchanged in both phases. Prefill selects KpreK_{pre} dominant experts per token, and decode selects D dominant experts per batch—both reuse the same scalar matrix, loss matrix, and folding operator to recover whatever falls outside the retained set. This is the central design of ExFold: the two phases differ only in how retained experts are selected, while excluded contributions are recovered by one shared mechanism.

We implement ExFold as a plug-and-play plugin in vLLM, with a lightweight expert-folding CUDA kernel, delivering up to 1.41×1.41 \times TTFT and 2.45×2.45 \times TPOT speedups while retaining about 99% of the original average quality. Our contributions are as follows:

• Phase-aware formulation. We characterize the distinct expert budgets of prefill and decode and unify both as a single output-approximation problem under phase-specific selection constraints.

• Expert Folding. We propose a training-free folding mechanism that projects budget-excluded expert contributions onto retained experts via a directional projector and a reconstruction-loss matrix, whose scalar form is absorbed directly into the router weight.

• Evaluation. We validate near-lossless prefill, decode, and joint acceleration across multiple MoE architectures on real vLLM serving workloads.

References (38)