WorksComputer Science
Spectral-MoE: Heterogeneous Per-Layer Expert Utilization in Dense-to-MoE Conversion
Abstract
Large language models impose substantial memory demands and arithmetic costs during inference. Dense-to-mixture-of-experts (MoE) conversion is a model optimization technique that aims to reduce these arithmetic costs. Dense-to-MoE conversion partitions pretrained feed-forward network (FFN) neurons into experts and selects a subset for each token. Leading methods fall into two categories: analytic methods produce a converted model quickly using heuristics, while learning methods produce a model much more slowly by optimizing via gradients. Both approaches, however, fix the same active expert count, or "utilization," at every layer. We introduce Spectral-MoE, which learns to allocate a utilization budget heterogeneously across layers. Its name draws a metaphor between separating a dense FFN into experts and separating a light beam into its spectrum. Spectral-MoE consists of two distinct approaches: a static approach that uses a single per-layer scalar which is shared across tokens, and a dynamic approach which emits a per-token schedule. We demonstrate that both allocators improve performance over uniform on both the analytic-based and learning-based SOTA dense-to-MoE methods. At 25% FFN utilization, dynamic allocation reduces WikiText-2 perplexity relative to uniform by 1.04, 2.96, and 2.71 points on the learned base for Llama-2-7B, Llama-3-8B, and Qwen2.5-7B, respectively. The corresponding reductions on the analytic base are 2.45, 6.26, and 2.17 points. On the learned base, dynamic allocation improves six-task mean accuracy over uniform by an average of 1.5, 4.2, and 3.6 percentage points across the three models at FFN utilizations of 12.5%, 25%, and 50%, respectively. These results establish per-layer expert utilization as a novel optimization axis in dense-to-MoE conversion.
Code
Introduction
The scaling of large language models (LLMs) has produced remarkable capabilities in natural language understanding and generation [4]. Realizing these capabilities, however, requires substantial computation and memory bandwidth, with the latter becoming increasingly problematic for performance [13]. Optimizing the transformer [35], powering nearly all LLMs, has therefore become an extensive area of research. In this domain there exist two primary axes along which compression research is performed: quantization [11, 26, 39, 20], and pruning [10, 32, 15]. A third technique, orthogonal to both quantization and pruning, called dense-to-MoE conversion has also begun to emerge [43].
Figure 1. Benchmark accuracy versus utilization. Dynamic, heterogeneous allocation (learned) extends the frontier of dense-to-MoE performance.
A dense FFN evaluates every neuron for every token. Dense-to-MoE conversion groups these neurons into experts and routes each token to a subset, retaining pretrained weights while reducing active computation. The fraction of experts active for a given token is the “utilization” and the assignment of neurons to expert groups is the neuron-to-expert “partition”. Existing methods differ in how they construct the partition and the token-to-expert router [43, 30, 29, 1, 33], but all either use a uniform per-layer allocation or a floating utilization budget. However, research on layer-dependent sensitivity to compression in quantization and pruning work (Dong et al., 2019b;a; Yin et al., 2025) motivates investigating heterogeneous per-layer allocation as a potential optimization axis in dense-to-MoE conversion.
To this end, we present Spectral-MoE, which learns per-layer allocation under a fixed utilization budget via an allocator agnostic to the base dense-to-MoE conversion method. Our contributions are as follows:
Heterogeneous per-layer allocation. We introduce the first formulation of learnable per-layer allocation under a fixed per-token budget for dense-to-MoE conversion. This adds a third optimization axis to dense-to-MoE conversion alongside expert partitioning and routing.
Static and dynamic allocator tiers. We develop a static allocator that learns one scalar per layer shared across tokens and a dynamic allocator that learns a per-token schedule. Both of these techniques are able to adhere to a user defined utilization budget.
Consistent performance gains. We evaluate both static and dynamic allocators on the two leading approaches to dense-to-MoE conversion: analytic methods that convert the model quickly using heuristics [29], and learning methods that optimize the model through slower gradient-based training [1]. Using our approach, we achieve SOTA mean accuracy at 25% utilization and outperform uniform across budgets (Figure 1).
Background and Related Work
Heterogeneous Allocation
Per-Layer Allocation. Prior work on per-layer allocation typically uses pretrained MoEs, with LTE [44] as an exception (Section 2.2). Alloc-MoE’s Alloc-L uses dynamic programming over profiled layer sensitivities [21], while LExI uses evolutionary search over per-layer output-perturbation estimates [5]. Both optimize surrogates that predict a schedule’s accuracy degradation as a sum of per-layer sensitivities. Spectral-MoE instead learns per-layer utilization directly through gradients.
Per-Token Allocation. Prior work on per-token allocation uses confidence-based routing, null experts, or budget redistribution to vary utilization across tokens. Confidence-based routing sets utilization from the concentration of routing scores [18], while AdaMoE introduces null experts to vary utilization [42]. SeqTopK and Alloc-MoE’s Alloc-T redistribute a layer’s utilization budget across tokens [37, 21]. Spectral-MoE’s dynamic allocator maps hidden states to per-token schedules that conserve a utilization budget across layers.
Dense-to-MoE Conversion
Analytic Methods. Analytic methods quickly construct neuron-to-expert partitions from heuristics. MoEfication clusters neuron input weights [43], while LLaMA-MoE-v2 uses activation and gradient importance [30]. CMoE groups neurons by their activation patterns through balanced clustering, then uses a representative neuron from each cluster to construct the router [29]. Spectral-MoE’s analytic base uses CMoE to construct the partition and router, recovers weights with LoRA as CMoE does, then trains the allocator with both frozen.
Learning Methods. Learning methods use slower gradient-based optimization. LLaMA-MoE partitions FFN neurons into experts before continued pretraining [45]. LTE jointly trains the router and model weights with an efficiency penalty and heterogeneous utilization follows from thresholding router scores [44]. DOT-MoE jointly learns the neuron-to-expert partition and token-to-expert router through differentiable relaxations [1]. Spectral-MoE learns per-layer utilization in tandem with this joint optimization, enforcing the same total utilization budget for every token.
Methods
Spectral-MoE learns per-layer allocation under a budget derived from a user-specified target utilization. This requires straight-through estimators (STE) [2] and budget-preserving allocation. We develop these components for static allocation, then extend them to a dynamic allocator that produces token-dependent schedules (Figure 2). Appendix A summarizes the notation.
Figure 2. Spectral-MoE learned-base dynamic allocator architecture. During the forward pass, the allocator uses hidden states to initialize and revise per-token schedules, layers commit budget-constrained expert counts, and the final layer consumes the remainder. During the backward pass, loss gradients pass through selections and budget commitments via STEs to train only the allocator, routers, and partition affinities.
Utilization Budget
Consider FFN layers indexed by . Each layer contains routed and always-active shared experts, for experts in total. Each expert contains neurons, giving FFN width . We enforce a minimum number of routed experts at each layer to ensure all experts are reachable. We use . For each token, the routed count is the number of routed experts selected at layer , with . The free count is the number selected above the minimum, so per-layer FFN utilization is
The user specifies a nominal FFN utilization . This determines the uniform initial routed count and total routed budget :
Here rounds to the nearest integer, with ties rounded up. The target must yield a count within the stated bounds. Both allocators enforce for every token.
With mean free count , the re-distributable budget and realized utilization satisfy
Shared experts and minimum routed counts account for expert activations per token, leaving to allocate.
Note that not all target utilizations are realizable. For Llama-2-7B, , , and , so a target of gives and . The realized utilization is (Appendix B.1). Both allocators conserve this same integer budget.
Static Per-Layer Allocation
Static allocation learns one continuous routed count per layer, shared across tokens. We initialize all counts to for a uniform allocation, but optimizer updates can violate the budget or count bounds. After each update, we therefore adjust the counts to satisfy and . Appendix B.2 details how we enforce these bounds and resolve any budget excess or deficit.
Hard Expert Selection. Let denote largest-remainder rounding with integer-bound repair, producing the forward schedule . We floor each count, then add one to the layers with the largest fractional parts. If integer clipping changes the sum, we adjust eligible counts to restore (Appendix B.2). Each router selects its top- experts per token, allowing expert identities to vary under the shared schedule.
Gradients Through Hard Selection. Let rank expert for token at layer , with zero assigned to the highest router score. Treating ranks as constants during backpropagation, we define the soft inclusion
where is the logistic sigmoid and the inclusion temperature (Appendix F). This makes soft inclusion most sensitive to for experts near the selection boundary. Soft inclusions serve only to compute count gradients and need not sum to . The forward pass selects exactly routed experts at each layer, with the integer allocation rule enforcing .
For tokens, let indicate routed selections, with when token selects expert , and let contain router softmax probabilities. With denoting stop-gradient, we add the count-gradient term to the inherited router STE [1]:
Its forward value is , while router and count gradients flow through and , respectively.
Integration with the Conversion Base. The learned-base Spectral-MoE jointly trains partition affinities, router weights, and the allocator while keeping pretrained weights frozen. The analytic-base Spectral-MoE first recovers weights with LoRA, then freezes weights, partition, and router while training the allocator. Both bases retain an always-active shared expert, selected by activation rate on the analytic base and calibrated output contribution on the learned base. The analytic base omits the router STE term in (3). Inherited scalar routing coefficients scale expert outputs and count gradients. Training also evaluates the next-ranked expert, if available, with zero forward contribution. Its soft-inclusion gradient helps assess the benefit of selecting another expert. Both learned and analytic bases use an objective which combines language-modeling cross-entropy with dense-teacher distillation. The learned base also retains router regularization and load balancing.
Dynamic Per-Layer Allocation
Dynamic allocation revises each token’s remaining schedule from the current hidden state. A schedule predicted only at the first layer cannot respond to later hidden states. A shared projection feeds an initial output head and subsequent revision heads. The final layer has no revision head because it consumes the remainder.
Allocator Architecture. Let be the residual-stream width and the number of uncommitted layers, including the current layer. The shared projection , initial head , and revision heads have shapes
where the additional input dimension of carries the log-RMS of the unnormalized FFN input. Biases are omitted. Including biases, the allocator adds 158,942 parameters for and , negligible compared to the billion-scale models being converted.
For hidden state input , define its root-mean-square (RMS) normalized form . The schedule contains logits for layers , with entry zero corresponding to the current layer. Let be a proposed revision and the accumulated correction to the initial schedule. The tanh operations bound each proposed logit revision and each logit’s accumulated deviation from the initial schedule. Square brackets concatenate features:
Concatenating the projected hidden state with the remaining schedule lets each head correct the same hidden state differently depending on the allocation already proposed. The log-RMS feature restores the scale removed by normalization. Small nonzero head weights produce uniform integer counts on initialization while preserving gradients into the shared projection.
Exact Budget Conservation. Let be the routed budget committed at earlier layers , its remainder, and the current layer’s share. After reserving experts for each uncommitted layer, we assign share of the surplus to the current layer. Let and denote the minimum and maximum feasible routed counts at the current layer, ensuring the remainder fits within later layers’ count bounds. We round and clip the continuous proposal to these bounds:
Here rounds ties to even, and clipping preserves feasibility under any tie rule.
For a feasible initial budget, the bounds ensure at every layer. At the final layer, , forcing and hence for every token.
Gradients Through the Utilization Schedule. The soft inclusion in Equation (2) supplies gradients through the continuous proposal to both schedule shares and the remaining budget. For positive surplus with fixed, the derivative with respect to schedule logit is
Here schedule index refers to layer , and is one for and zero otherwise. Increasing a later layer’s logit reduces the current layer’s surplus share, coupling allocation decisions across the remaining layers. We evaluate soft inclusion using clipped to . During backpropagation, we treat clipping as the identity, allowing gradients to reach the continuous proposal even when a bound is active.
Earlier integer commitments also affect later proposals by changing the remaining budget. To preserve this gradient path, we compute using an STE over earlier layers :
The derivative assumes positive surplus and holds the current schedule logits constant. The proposal terms cancel in the forward pass, giving and preserving the exact budget. During backpropagation, is held constant and each summand passes gradients to the proposal before rounding or clipping. Increasing the committed budget therefore reduces the current proposal at rate , allowing later selections, including the final layer’s, to influence earlier allocations.
Results
Experimental Settings
Implementation. We implement Spectral-MoE using PyTorch (Paszke et al. [28]) and Hugging Face Transformers (Wolf et al. [38]), with learned-base conversion run on four NVIDIA H100 GPUs and analytic-base conversion run on one. All converted models use 128 neurons per expert, following Bamba et al. [1], giving 86, 112, and 148 experts per layer for Llama-2-7B, Llama-3-8B, and Qwen2.5-7B, respectively. On the analytic base, we construct the partition and router following CMoE (Pei et al. [29]), recover weights with LoRA (Hu et al. [17]), then freeze the recovered weights, partition, and router while training only the allocator. On the learned base, we extend DOT-MoE’s joint partition and router optimization (Bamba et al. [1]) to train partition affinities, router weights, and allocator parameters in tandem while keeping pretrained weights frozen. We optimize trainable parameters with AdamW (Loshchilov & Hutter [23]). Appendix § 10 details the full testing and training configurations.
Models and Evaluation. We evaluate Llama-2-7B [34], Llama-3-8B [14], and Qwen2.5-7B (Qwen et al., 2025). We measure language-modeling performance using WikiText-2 test perplexity [25]. Following the canonical benchmark selection of dense-to-MoE methods [29, 1], we evaluate downstream benchmark performance using the harness provided by Gao et al. [12] on BoolQ [6], SciQ [36], PIQA [3], WinoGrande [31], ARC-Challenge [7], and HellaSwag [41].
Baselines. CMoE [29] and DOT-MoE [1] represent the current SOTA in analytic and learned conversion, respectively, while LLaMA-MoE [45] and LLaMA-MoE-v2 [30] are representative of earlier work. Given the substantial improvement of CMoE and DOT-MoE over previous work (Table 1), we build Spectral-MoE on these two methods and include the earlier methods as reference points. We were unable to locate a public implementation of DOT-MoE during our experiments. As a result, the reported uniform numbers are from our own implementation of DOT-MoE based on the details provided in the paper. Given our baseline implementation falls short of the published accuracy, we report both sets of results. Appendix C.4 describes our implementations of the conversion bases.
Benchmark Performance
Comparison with Previous Works. Table 1 compares Spectral-MoE with uniform allocation and published methods at 25% FFN utilization. On the analytic base, dynamic allocation reduces perplexity by 2.17–6.26 points and improves six-task mean accuracy by 0.2–1.3 percentage points over uniform, exceeding published CMoE mean accuracy by 3.0 points on both Llama-2-7B and Llama-3-8B. On the learned base, dynamic allocation reduces perplexity by 1.04–2.96 points and improves mean accuracy by 3.0–5.8 percentage points over uniform. It exceeds published DOT-MoE mean accuracy by 1.3 and 2.5 points on Llama-2-7B and Llama-3-8B, respectively, and matches Qwen2.5-7B at 63.3% at the reported precision. Both allocators lower perplexity across all models and bases, demonstrating robust benefits across different partition and router construction techniques.
| Method | PPL () | BoolQ [32, acc] | SciQ [0, acc] | PIQA [0, acc] | WinoG. [5, acc] | ARC-C [25, acc-n] | HellaS. [10, acc-n] | Avg. |
| Llama-2-7B | ||||||||
| Dense | 5.47 | 82.0 | 94.0 | 78.1 | 74.3 | 52.5 | 78.9 | 76.6 |
| LLaMA-MoE† | – | 37.8 | 20.0 | 49.7 | 50.1 | 25.8 | 26.2 | 34.9 |
| LLaMA-MoE-v2† | – | 51.3 | 67.0 | 56.6 | 52.9 | 25.7 | 35.1 | 48.1 |
| CMoE† | – | 55.0 | 77.5 | 57.1 | 54.1 | 27.6 | 38.8 | 51.7 |
| Spectral-MoE Analytic — Uniform | 21.86 | 59.2 | 84.0 | 59.0 | 52.8 | 26.1 | 39.1 | 53.4 |
| Spectral-MoE Analytic — Static | 20.54 | 61.7 | 85.0 | 59.6 | 56.1 | 25.0 | 39.9 | 54.6 |
| Spectral-MoE Analytic — Dynamic | 19.41 | 61.8 | 83.1 | 60.2 | 54.8 | 26.5 | 41.5 | 54.6 |
| DOT-MoE‡ | – | 66.4 | 89.6 | 67.2 | 57.9 | 34.0 | 53.9 | 61.5 |
| Spectral-MoE Learned — Uniform | 11.61 | 63.2 | 88.9 | 65.0 | 57.3 | 32.3 | 52.7 | 59.9 |
| Spectral-MoE Learned — Static | 11.50 | 64.8 | 89.8 | 65.3 | 58.4 | 33.6 | 52.8 | 60.8 |
| Spectral-MoE Learned — Dynamic | 10.57 | 67.1 | 88.8 | 68.4 | 60.5 | 35.8 | 56.5 | 62.8 |
| Llama-3-8B | ||||||||
| Dense | 6.14 | 83.2 | 96.2 | 79.6 | 77.3 | 58.3 | 82.1 | 79.4 |
| LLaMA-MoE† | – | 37.8 | 20.3 | 49.0 | 50.7 | 25.7 | 25.8 | 34.9 |
| CMoE† | – | 56.9 | 72.0 | 57.3 | 51.9 | 25.8 | 36.7 | 50.1 |
| Spectral-MoE Analytic — Uniform | 45.24 | 60.9 | 82.2 | 58.9 | 52.5 | 23.7 | 36.8 | 52.5 |
| Spectral-MoE Analytic — Static | 40.48 | 61.9 | 82.1 | 59.7 | 51.1 | 24.1 | 36.5 | 52.6 |
| Spectral-MoE Analytic — Dynamic | 38.99 | 62.3 | 82.6 | 58.5 | 52.5 | 25.3 | 37.2 | 53.1 |
| DOT-MoE‡ | – | 62.3 | 90.9 | 65.0 | 56.0 | 34.1 | 50.1 | 59.8 |
| Spectral-MoE Learned — Uniform | 19.40 | 59.1 | 87.2 | 64.5 | 58.2 | 32.3 | 49.3 | 58.5 |
| Spectral-MoE Learned — Static | 18.19 | 63.1 | 89.4 | 65.7 | 57.5 | 32.7 | 49.5 | 59.7 |
| Spectral-MoE Learned — Dynamic | 16.44 | 66.9 | 91.8 | 67.6 | 58.2 | 35.7 | 53.7 | 62.3 |
| Qwen2.5-7B | ||||||||
| Dense | 6.85 | 88.0 | 96.6 | 78.6 | 76.2 | 64.1 | 80.3 | 80.6 |
| Spectral-MoE Analytic — Uniform | 47.07 | 59.4 | 78.3 | 58.7 | 53.0 | 25.6 | 35.9 | 51.8 |
| Spectral-MoE Analytic — Static | 45.61 | 60.3 | 76.8 | 58.2 | 52.7 | 25.3 | 36.0 | 51.5 |
| Spectral-MoE Analytic — Dynamic | 44.90 | 59.4 | 77.4 | 57.8 | 53.4 | 27.6 | 36.4 | 52.0 |
| DOT-MoE‡ | – | 64.3 | 93.9 | 68.5 | 58.7 | 39.6 | 55.0 | 63.3 |
| Spectral-MoE Learned — Uniform | 16.92 | 43.7 | 89.4 | 66.9 | 58.0 | 35.4 | 51.9 | 57.6 |
| Spectral-MoE Learned — Static | 15.99 | 65.9 | 90.8 | 65.6 | 57.8 | 35.2 | 51.5 | 61.1 |
| Spectral-MoE Learned — Dynamic | 14.21 | 65.2 | 92.6 | 69.0 | 57.5 | 39.8 | 55.8 | 63.3 |
Table 1. Dense-to-MoE conversion at 25% FFN utilization. Headers give [shots, metric]. Downstream benchmarks use the evaluation harness from Gao et al. [12]. Analytic and Learned use CMoE and DOT-MoE bases, respectively. Uniform denotes our custom implementation of the bases. Uniform, static, and dynamic runs are seed matched (Appendix § 11). †: published Pei et al. [29]. ‡: published Bamba et al. [1].
Utilization Sweep. Table 2 compares Spectral-MoE’s dynamic allocator with uniform allocation on the learned base at 12.5%, 25%, and 50% FFN utilization. Perplexity and six-task mean accuracy improve for every model–budget pair, with accuracy gains averaging 1.5, 4.2, and 3.6 percentage points across models, respectively. Perplexity falls by 1.06–2.46, 1.04–2.96, and 0.91–2.55 points at
| FFN Util. | Model | Allocator | PPL (↓) | BoolQ [32, acc] | SciQ [0, acc] | PIQA [0, acc] | WinoG. [5, acc] | ARC-C [25, acc-n] | HellaS. [10, acc-n] | Avg. |
| 0.125 | Llama-2-7B | Uniform | 15.93 | 55.4 | 84.7 | 60.9 | 54.3 | 27.0 | 41.4 | 54.0 |
| 0.125 | Llama-2-7B | Dynamic | 14.87 | 60.5 | 85.2 | 60.3 | 53.0 | 26.9 | 44.6 | 55.1 |
| 0.125 | Llama-3-8B | Uniform | 27.69 | 59.9 | 84.6 | 60.8 | 52.5 | 25.9 | 39.5 | 53.9 |
| 0.125 | Llama-3-8B | Dynamic | 25.46 | 62.1 | 86.3 | 62.6 | 54.5 | 28.2 | 40.9 | 55.8 |
| 0.125 | Qwen2.5-7B | Uniform | 23.60 | 53.5 | 84.2 | 63.1 | 55.6 | 28.5 | 41.6 | 54.4 |
| 0.125 | Qwen2.5-7B | Dynamic | 21.14 | 62.0 | 85.3 | 61.8 | 54.1 | 29.2 | 43.4 | 56.0 |
| 0.25 | Llama-2-7B | Uniform | 11.61 | 63.2 | 88.9 | 65.0 | 57.3 | 32.3 | 52.7 | 59.9 |
| 0.25 | Llama-2-7B | Dynamic | 10.57 | 67.1 | 88.8 | 68.4 | 60.5 | 35.8 | 56.5 | 62.8 |
| 0.25 | Llama-3-8B | Uniform | 19.40 | 59.1 | 87.2 | 64.5 | 58.2 | 32.3 | 49.3 | 58.5 |
| 0.25 | Llama-3-8B | Dynamic | 16.44 | 66.9 | 91.8 | 67.6 | 58.2 | 35.7 | 53.7 | 62.3 |
| 0.25 | Qwen2.5-7B | Uniform | 16.92 | 43.7 | 89.4 | 66.9 | 58.0 | 35.4 | 51.9 | 57.6 |
| 0.25 | Qwen2.5-7B | Dynamic | 14.21 | 65.2 | 92.6 | 69.0 | 57.5 | 39.8 | 55.8 | 63.3 |
| 0.50 | Llama-2-7B | Uniform | 8.26 | 68.3 | 90.9 | 70.5 | 64.6 | 40.6 | 65.9 | 66.8 |
| 0.50 | Llama-2-7B | Dynamic | 7.35 | 75.7 | 92.7 | 73.6 | 65.0 | 42.9 | 69.7 | 69.9 |
| 0.50 | Llama-3-8B | Uniform | 12.20 | 71.4 | 93.5 | 71.3 | 63.1 | 41.7 | 65.2 | 67.7 |
| 0.50 | Llama-3-8B | Dynamic | 9.64 | 73.1 | 94.8 | 75.4 | 67.6 | 47.7 | 71.4 | 71.7 |
| 0.50 | Qwen2.5-7B | Uniform | 11.34 | 75.6 | 94.8 | 72.4 | 66.1 | 46.8 | 65.6 | 70.2 |
| 0.50 | Qwen2.5-7B | Dynamic | 9.12 | 79.4 | 95.4 | 75.8 | 67.1 | 54.5 | 71.0 | 73.9 |
Table 2. Spectral-MoE learned-base utilization sweep. Dynamic allocation improves perplexity and six-task mean accuracy over uniform across all tested models and utilizations. Metrics follow Table 1.
12.5%, 25%, and 50% utilization, respectively. These gains demonstrate that the benefits of dynamic allocation extend across the tested utilization range and motivate systematic utilization sweeps in future dense-to-MoE work.
Learned Heterogeneity
Perplexity Convergence. Figure 3(a) compares perplexity convergence on the learned Llama-2-7B base at 25% FFN utilization. Dynamic allocation finishes at 10.57 perplexity, versus 11.61 for uniform and 11.50 for static allocation. Static allocation is initialized at uniform (Section 3.2), but ultimately learns a nonuniform schedule. Its small final gain suggests a slightly improved allocation, although training fluctuations prevent a firm conclusion. Spectral-MoE’s dynamic allocator, however, maintains a significant lead throughout. Appendix E provides the experimental specification and per-layer profiles across models.

Figure 3. Spectral-MoE on the Llama-2-7B learned base at a nominal 25% FFN utilization. (a) WikiText-2 test perplexity. (b) Each layer’s mean utilization under dynamic allocation. The dashed line marks the uniform start (25.6%). (c) Final-step schedules of 16 sampled tokens. The two unique schedules for the token “on” showcase the allocator adapting to context.
Per-Layer Average Utilization. Figure 3(b) tracks each layer’s mean utilization during dynamic allocation training. The initially uniform schedule develops into a heterogeneous layer profile whose averages stabilize late in training. Together with the perplexity gains, this stabilization supports the assertion that Spectral-MoE learns a useful allocation. The resulting profile also offers a unique perspective on the relative importance of each layer during dense-to-MoE conversion.
Per-Token Schedule Samples. Figure 3(c) shows sampled per-token schedules from the final training step. The schedules vary substantially across tokens while preserving the same total utilization budget. Even positions sharing a token ID receive different allocations, consistent with the allocator responding to changing hidden states. Spectral-MoE’s dynamic allocator can revise each token’s remaining schedule, combining stable layer averages with context-dependent allocation. Appendix E provides the experimental specification.
Training Stability Considerations
Neuron-to-Expert Assignment Turnover During Training. Figure 4 measures changes in neuron-to-expert assignments during the dense-to-MoE conversion of a learned-base, dynamic Llama-2-7B model at 25% FFN utilization. Turnover is the fraction of routed neurons assigned to a different expert between consecutive training steps, averaged across 32 layers and excluding shared neurons.
Figure 4. Fraction of routed neurons assigned to a different expert between consecutive training steps, measured on a sample learned-base, dynamic dense-to-MoE conversion.
Turnover averages 8.92% over the final 500 steps but falls to 0.33% at the final step. The sharp drop at the end is consistent with the learning-rate decay toward zero, which eventually prevents updates to the partition affinities. Prior to the sharp drop, however, the turnover rate appears to hold relatively constant despite the decreasing learning rate. One issue sustained turnover introduces is that the router is forced to adapt to a constantly changing expert composition, potentially resulting in a partially adapted router at the end of joint training. Despite this issue, learned dense-to-MoE conversion still performs quite well.
This observation motivates us to test whether additional router optimization after freezing expert assignments boosts performance. We leave the investigation of learning the partition itself in a more stable fashion to future work.
Frozen Checkpoint Router Refitting. To limit additional token use, we refit routers by closed-form ridge regression [16]. We pass 32,768 training tokens through each frozen checkpoint from the end of joint training, recording router inputs and computing an activation-based importance proxy at each layer. We then use these inputs to fit router weights and expert biases to normalized regression labels , keeping all other parameters frozen. For token and routed expert ,
where assigns neuron to expert , is the neuron’s FFN activation, and are the mean and sample standard deviation of across routed experts.
We compare each router’s expert selections before and after refitting with the expert ranking given by . All selections use the same pre-refit hidden states and expert counts. “Overlap” is the fraction of shared selections. “Coverage” is the selected experts’ summed importance divided by the reference total. Both metrics improve for both checkpoints, but six-task mean accuracy changes by +1.0 and −0.4 percentage points for seeds and (Table 3). While the naive ridge regression router refitting yields mixed results, there may exist additional methods which improve accuracy with minimal token overhead. We leave the exploration of such approaches to future work.
| Seed | Router | Overlap | Coverage | BoolQ | SciQ | PIQA | Winog. | ARC-C | HellaS. | Avg. |
| Original | 50.11 | 87.66 | 69.5 | 89.5 | 65.8 | 57.4 | 32.0 | 56.2 | 61.74 | |
| Refit | 69.42 | 95.62 | 66.8 | 89.7 | 67.5 | 60.9 | 34.9 | 56.6 | 62.73 | |
| Original | 50.02 | 87.66 | 67.1 | 88.8 | 68.4 | 60.5 | 35.8 | 56.5 | 62.84 | |
| Refit | 69.53 | 95.66 | 65.4 | 88.4 | 67.8 | 60.8 | 35.8 | 56.6 | 62.48 |
Table 3. Router refitting on learned dynamic Llama-2-7B at 25% FFN utilization. Original and Refit denote checkpoint and ridge-regression routers. Entries are percentages; metrics follow Table 1.
Conclusion
Spectral-MoE learns per-layer expert utilization during dense-to-MoE conversion under a user-specified budget. Static allocation learns a schedule shared across tokens, while dynamic allocation revises each token’s schedule and conserves the same total budget. Dynamic allocation lowers perplexity on both conversion bases across all three models at nominal 25% utilization, with learned-base perplexity and mean-accuracy gains extending to 12.5% and 50%. It also exceeds published DOT-MoE mean accuracy on Llama-2-7B and Llama-3-8B and matches it on Qwen2.5-7B. The learned schedules combine stable layer averages with context-dependent variation while preserving the same routed budget for every token. Future work should examine whether stabilizing expert assignments improves the joint adaptation of routers and allocators.
AI Use Statement
The main use of generative AI in this work was for code generation. Specifically, we created a software specification manually and used generative AI to implement that specification. The generated code was then reviewed manually to ensure correctness. During the drafting and editing process of the manuscript generative AI was used to reword sentences, make certain paragraphs more concise, format equations, and identify related works for manual review. The authors audited all AI generated artifacts and take full responsibility for the content of this work.
Reproducibility Statement
In order to ensure the reproducibility of our work we provide detailed training parameters and evaluation procedures in appendix § 10. The project repository and implementation release status are available at https://github.com/ZacharyBroveak/Spectral-MoE.
Notation
| Symbol | Definition | Symbol | Definition |
| , | FFN layers and zero-based layer index. | , | Uncommitted layers , and the current layer’s softmax share. |
| , , | Token count, token index, and routed-expert index. | , , | Vector of schedule logits, proposed revisions, and accumulated corrections in . |
| , , | Neurons per expert, FFN width, and residual-stream width. | , , | Committed budget, remainder , and the STE for . |
| , , | Total, routed, and shared experts per layer, with . | , | Feasible integer bounds on the current commitment. |
| , | Minimum routed count and selected routed count at layer . | , , | FFN input, its RMS-normalized vector, and the allocator’s shared-projection output. |
| , | Free count and its layer mean. | , , | Matrices for the shared projection, initial output head, and revision output head. |
| , | Per-token routed budget and the uniform count . | , | FFN activation matrix and its scalar entry for token , neuron . |
| , , | User-specified utilization, realized mean, and per-layer utilization. | FFN output projection matrix. | |
| , | Scalar continuous count or proposal for layer , and the static count vector. | , | Hard neuron-to-expert partition matrix. assigns neuron to expert . |
| , | Integer count vector and largest-remainder rounding operator with bound repair. | Soft neuron-to-expert partition affinity matrix. | |
| , | Inclusion temperature and the logistic sigmoid. | , | Router weight matrix and partition transport temperature. |
| Rank of expert by token ’s router score at layer . | , | Training objective and its gradient. | |
| , , | Matrices of hard selection, soft inclusion, and router probabilities. | Student next-token distribution (Appendix C.1). | |
| Stop-gradient operation. | Activation-based expert importance (Section 4.4). | ||
| Objective gradient with respect to the static count vector (Appendix B.2). | , | Selected and reference expert sets (Section 4.4). | |
| , | Target token and preceding context within its block. | STE for hard routed selection, used for router and count gradients. | |
| Kronecker delta: one when , zero otherwise. |
Table 4. Notation used in the main text and appendices. Routed counts measure selected routed experts, whereas FFN utilization includes the shared expert. Bold italic symbols denote vectors and bold upright symbols denote matrices.
Methods Implementation Details
Real-Model Utilization Numbers
Equation 1 rounds to an integer, restricting realized utilization to multiples of . A requested utilization is exact when it is such a multiple and is otherwise rounded to the nearest realizable value. Llama-3-8B has , making all three reported tiers exact. Llama-2-7B and Qwen2.5-7B have 86 and 148 experts, respectively. They realize one and two tiers exactly, with the remaining tiers within 0.6 percentage points of the requested utilization.
Table 5 reports the geometry, realized utilization, and routed budget for every model and tier. Within each model and tier, all allocation methods hold fixed and activate the same total number of FFN neurons for every token. The per-layer average is , or 2,816 neurons on Llama-2-7B at the nominal 25% tier. Exact agreement with the requested utilization is unnecessary for comparing allocation methods, provided their realized budgets are matched.
Enforcing Bounds
Utilization Update Stability. Static training constrains the continuous counts before and after each optimizer step. Before the step, we center the count gradient, , so that the gradient is tangent to the budget hyperplane . AdamW rescales each coordinate separately, so the resulting update can still change the sum. After the step, we therefore restore the sum by projecting:
which removes drift introduced by adaptive scaling, momentum, and finite precision.
Enforcing Count Bounds. Centering the count gradient and restoring the sum does not enforce . To mitigate this, violating coordinates are clamped and the projection over the remaining free coordinates is repeated. The bounded fixed-sum set is acceptable when . This formula holds for every budget in Table 5.
| Model | Nominal | Realized | |||||
| Llama-2-7B | 32 | 86 | 11,008 | 12.5% | 10 | 12.79% | 320 |
| Llama-2-7B | 32 | 86 | 11,008 | 25% | 21 | 25.58% | 672 |
| Llama-2-7B | 32 | 86 | 11,008 | 50% | 42 | 50.00% | 1,344 |
| Llama-3-8B | 32 | 112 | 14,336 | 12.5% | 13 | 12.50% | 416 |
| Llama-3-8B | 32 | 112 | 14,336 | 25% | 27 | 25.00% | 864 |
| Llama-3-8B | 32 | 112 | 14,336 | 50% | 55 | 50.00% | 1,760 |
| Qwen2.5-7B | 28 | 148 | 18,944 | 12.5% | 18 | 12.84% | 504 |
| Qwen2.5-7B | 28 | 148 | 18,944 | 25% | 36 | 25.00% | 1,008 |
| Qwen2.5-7B | 28 | 148 | 18,944 | 50% | 73 | 50.00% | 2,044 |
Table 5. Expert geometry, the uniform routed count derived from each requested utilization, the utilization it realizes, and the conserved routed budget. All models use neurons per expert, one shared expert per layer, and .
Integer Repair. Flooring the continuous counts removes units. These units are assigned back to the layers with the largest fractional parts. This process restores and gives before bound repair. Integer clipping can change the sum, so a seeded repair adds or removes one expert at an eligible layer until the budget is restored. Such a layer exists whenever . Continuous counts persist between steps, allowing sub-integer updates to accumulate before the hard schedule changes.
Experimental Protocol
Perplexity
Protocol. We measure WikiText-2 test perplexity [25] using each model’s tokenizer and complete, nonoverlapping blocks of 2,048 tokens:
Here contains the scored next-token targets of a complete block, indexes these targets, and contains context only from that block. Preprocessing retains empty rows and special tokens, and the trailing partial block is discarded. The Llama-2-7B stream contains 341,469 tokens. Its complete blocks contain 339,968 input tokens and 339,802 scored targets. Every final perplexity in this paper is the corresponding run’s end-of-training evaluation under this protocol, while training curves and step-0 values are labeled where they appear.
Data Separation. All reported perplexities use the WikiText-2 test split.
Benchmark Evaluation
Benchmarks. Evaluation uses the harness provided by Gao et al. [12] with the settings in Table 6. The six-task mean weights tasks equally, and reported cross-model gains average the three model-specific gains equally. Averages and differences are computed from unrounded scores, then rounded for display.
| Task | Shots | Metric | Examples | Split |
| BoolQ (Clark et al., [6]) | 32 | accuracy | 3,270 | validation |
| SciQ (Welbl et al., [36]) | 0 | accuracy | 1,000 | test |
| PIQA (Bisk et al., [3]) | 0 | accuracy | 1,838 | validation |
| WinoGrande (Sakaguchi et al., [31]) | 5 | accuracy | 1,267 | validation |
| ARC-Challenge (Clark et al., [7]) | 25 | length-normalized accuracy | 1,172 | test |
| HellaSwag (Zellers et al., [41]) | 10 | length-normalized accuracy | 10,042 | validation |
Table 6. Evaluation settings, identical for every model and allocation method.
Data Separation. Training and calibration use Dolmino (OLMo et al., [27]). Evaluation uses the WikiText-2 test split and the benchmarks in Table 6.
Training Configurations
Learned Base Each learned-base run processes Dolmino tokens from one tokenized cache. Training uses bfloat16 on four H100 GPUs with sharded dense weights and a shared data seed. The runs in Table 1 use initialization seed , and Table 8 lists the others. Partition affinities and router weights use a peak learning rate of and weight decay . Allocator parameters use a separate optimizer group with zero weight decay, since decay on continuous counts would bias them toward zero routed experts.
| Allocation | Initialization | Step-0 PPL | Final PPL | Six-task avg. (%) |
| Dynamic | seed | 1115.01 | 10.72 | 62.2 |
| seed | 1279.96 | 10.59 | 61.7 | |
| seed (Table 1) | 1365.54 | 10.57 | 62.8 |
Table 8. Seed variation on the learned Llama-2-7B base at 25% utilization (). Metrics follow Table 1.
Analytic Base. The base for the analytic approach is CMoE (Pei et al., [29]). Specifically, balanced -means (Lloyd, [22]; Malinen & Franti, [24]) with a linear-assignment step is used (Jonker & Volgenant, [19]) on 16,384 Dolmino calibration tokens. The constructed Llama-2-7B model has perplexity 735.85. Following expert assignment, weight recovery trains LoRA adapters (Hu et al., [17]) of rank 8, scaling , and dropout 0.1 on all attention and MLP projections using 2,048 samples of 2,048 tokens. The final perplexity is 21.86.
The allocator then trains for 1,024 steps over the same token budget, with recovered weights, partition, and router frozen. The analytic uniform baseline is the recovered checkpoint before allocator training and therefore has zero allocator-training steps. A comprehensive list of training parameters can be seen in Table 7.
Existing Method Implementations
The analytic base uses CMoE’s published partition and router construction (Pei et al., [29]), unmodified. The learned base, however, reimplements DOT-MoE due to a lack of available public
| Learned base | Analytic base | |
| Trained tensors | , , allocator | allocator only |
| Frozen | pretrained FFN weights | weights, partition, router |
| Steps / tokens | 3,500 / 458.8M | 1,024 / 4.19M |
| Preceding stage | – | LoRA recovery, 4.19M tokens |
| , peak rate | – | |
| Static peak rate | ||
| Dynamic network peak rate | ||
| Inclusion temperature | 1.5 static, 1.0 dynamic | 1.0 |
| Transport temperature | over warmup, then flat | – |
| Optimizer | AdamW | AdamW |
| Rate schedule | warmup over the first fifth, cosine to zero | as learned |
| Evaluation / checkpoint cadence | every 10M / 50M tokens | end of run |
caption: Training configurations. The analytic static rate is set from the step count, spread over half the run, rather than from the learned base’s constant.
:::
code at the time of writing. One modification was made to the original DOT-MoE work which was the inclusion of a shared expert for the purposes of training stability.
Run-to-Run Variation
Dense-to-MoE conversion is sensitive to initialization meaning identical conversion procedures can yield different perplexities and benchmark scores across seeds. Estimating this variation across models, budgets, and allocation methods requires many repeated experiments, whose computational cost is prohibitive. Despite this cost, we did run a small number of different seeds in order to provide some indication of this variation. Table 8 reports representative statistics from the learned Llama-2-7B base training run at 25% FFN utilization.
While this table only presents a small number of seeds run on a single model with a single allocation approach, it still shows that between runs down-stream accuracy can differ significantly. We therefore match initialization seeds across the uniform, static, and dynamic arms in Table 1 to control initialization differences within each comparison.
Additional Layer Utilization Heterogeneity Experiments and Information
Detailed Experiment Information
Figure 3 uses learned Llama-2-7B conversion at 25% target utilization (), seed , and 3,500 steps (458,752,000 tokens), differing only in allocation. Panel (a) evaluates WikiText-2 test perplexity every 10M tokens, giving 46 evaluations after initialization. Panel (b) applies a centered 61-step rolling median to per-step mean counts. Panel (c) shows 16 final-step schedules. Between steps 2,501–3,000 and 3,001–3,500, no layer’s mean count changes by more than 0.63 experts.
Per-Layer Profiles Across Models
Despite the differences in methodology, static and dynamic allocation both assign more capacity to late layers on all three models (Figure 5). In this figure Static is the final schedule of the static run in Table 1 and Dynamic is the per-layer mean over the 4,096 tokens of the final batch.
Figure 5. Learned per-layer FFN utilization at 25% utilization on the three main-body models.
Inclusion Temperature Selection
Table 9 varies inclusion temperature in matched static Llama-2-7B runs initialized with 10 routed experts per layer. This data shows the temperature value can have a significant effect on the overall perplexity. This, in turn, means that selecting a suitable temperature value is imperative to the overall performance of the algorithm.
| Inclusion temperature | Final PPL |
| Uniform control | 16.30 |
| 16.57 | |
| 16.15 | |
| 15.89 |
Table 9. Inclusion temperature for learned static allocation on Llama-2-7B at ().
Temperature Selection. For an expert of rank , Equation (2) defines the soft inclusion as
Its sensitivity to peaks at the selection boundary and decreases with distance from this boundary.
To illustrate how controls the range of sensitive ranks, consider soft inclusions between 0.05 and 0.95. Since and , we have
This interval extends ranks on either side of the selection boundary. For the initialization in Table 9, the boundary lies at rank 9.5. At , , so the interval includes ranks 6 through 13. At , , leaving only ranks 9 and 10 within the interval. The interval moves with , so ranks outside it at initialization can enter the transition region during training. We select empirically, with giving the lowest perplexity among the values tested. There may be superior values for , however, we leave searching for such values for future work.
References
- [1]Udbhav Bamba, Arnav Chavan, Aryamaan Thakur, Steve Teig, and Deepak Gupta. Dot-moe: Differentiable optimal transport for moefication. 2026. URL https://arxiv.org/abs/2606.01666.
- [2]Yoshua Bengio, Nicholas Léonard, and Aaron Courville. Estimating or propagating gradients through stochastic neurons for conditional computation, 2013. URL https://arxiv.org/abs/1308.3432.
- [3]Yonatan Bisk, Rowan Zellers, Ronan Le Bras, Jianfeng Gao, and Yejin Choi. Piqa: Reasoning about physical commonsense in natural language. 2019. URL https://arxiv.org/abs/1911.11641.
- [4]Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. 2020. URL https://arxiv.org/abs/2005.14165.
- [5]Krishna Teja Chitty-Venkata, Sandeep Madireddy, Murali Emani, and Venkatram Vishwanath. Lexi: Layer-adaptive active experts for efficient moe model inference. 2025. URL https://arxiv.org/abs/2509.02753.
- [6]Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. Boolq: Exploring the surprising difficulty of natural yes/no questions. 2019. URL https://arxiv.org/abs/1905.10044.
- [7]Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the ai2 reasoning challenge. 2018. URL https://arxiv.org/abs/1803.05457.
- [10]Elias Frantar and Dan Alistarh. Sparsegpt: Massive language models can be accurately pruned in one-shot. 2023. URL https://arxiv.org/abs/2301.00774.
- [11]Elias Frantar, Saleh Ashkboos, Torsten Hoefler, and Dan Alistarh. Gptq: Accurate post-training quantization for generative pre-trained transformers. 2023. URL https://arxiv.org/abs/2210.17323.
- [12]Leo Gao, Jonathan Tow, Baber Abbasi, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Alain Le Noac’h, Haonan Li, Kyle McDonell, Niklas Muennighoff, Chris Ociepa, Jason Phang, Laria Reynolds, Hailey Schoelkopf, Aviya Skowron, Lintang Sutawika, Eric Tang, Anish Thite, Ben Wang, Kevin Wang, and Andy Zou. The language model evaluation harness, 07 2024. URL https://zenodo.org/records/12608602.
- [13]Amir Gholami, Zhewei Yao, Sehoon Kim, Coleman Hooper, Michael W. Mahoney, and Kurt Keutzer. AI and memory wall. IEEE Micro, 44(3):33–39, 2024. doi: 10.1109/MM.2024.3373763. URL https://doi.org/10.1109/MM.2024.3373763.
- [14]Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, et al. The llama 3 herd of models. 2024. URL https://arxiv.org/abs/2407.21783.
- [15]Song Han, Jeff Pool, John Tran, and William J. Dally. Learning both weights and connections for efficient neural networks. 2015. URL https://arxiv.org/abs/1506.02626.
- [16]Arthur E. Hoerl and Robert W. Kennard. Ridge regression: Biased estimation for nonorthogonal problems. Technometrics, 12(1):55–67, 1970. doi: 10.1080/00401706.1970.10488634. URL https://doi.org/10.1080/00401706.1970.10488634.
- [17]Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. LoRA: Low-rank adaptation of large language models. 2021. URL https://arxiv.org/abs/2106.09685.
- [18]Quzhe Huang, Zhenwei An, Nan Zhuang, Mingxu Tao, Chen Zhang, Yang Jin, Kun Xu, Kun Xu, Liwei Chen, Songfang Huang, and Yansong Feng. Harder tasks need more experts: Dynamic routing in moe models. 2024. URL https://arxiv.org/abs/2403.07652.
- [19]R. Jonker and A. Volgenant. A shortest augmenting path algorithm for dense and sparse linear assignment problems. Computing, 38(4):325–340, 1987. doi: 10.1007/BF02278710. URL https://doi.org/10.1007/BF02278710.
- [20]Ji Lin, Jiaming Tang, Haotian Tang, Shang Yang, Wei-Ming Chen, Wei-Chen Wang, Guangxuan Xiao, Xingyu Dang, Chuang Gan, and Song Han. Awq: Activation-aware weight quantization for llm compression and acceleration. 2026. URL https://arxiv.org/abs/2306.00978.
- [21]Baihui Liu, Kaiyuan Tian, Wei Wang, Zhaoning Zhang, Linbo Qiao, and Dongsheng Li. All-in-one: Budget-aware expert activation allocation for efficient mixture-of-experts inference. 2026. URL https://arxiv.org/abs/2604.08133.
- [22]Stuart P. Lloyd. Least squares quantization in PCM. IEEE Transactions on Information Theory, 28(2):129–137, 1982. doi: 10.1109/TIT.1982.1056489. URL https://doi.org/10.1109/TIT.1982.1056489.
- [23]Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. 2019. URL https://arxiv.org/abs/1711.05101.
- [24]Mikko I. Malinen and Pasi Fränti. Balanced K-means for clustering. In Structural, Syntactic, and Statistical Pattern Recognition, volume 8621 of Lecture Notes in Computer Science, pp. 32–41. Springer, 2014. doi: 10.1007/978-3-662-44415-3_4. URL https://doi.org/10.1007/978-3-662-44415-3_4.
- [25]Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. 2016. URL https://arxiv.org/abs/1609.07843.
- [26]Markus Nagel, Rana Ali Amjad, Mart van Baalen, Christos Louizos, and Tijmen Blankevoort. Up or down? adaptive rounding for post-training quantization. 2020. URL https://arxiv.org/abs/2004.10568.
- [27]Team OLMo, Pete Walsh, Luca Soldaini, Dirk Groeneveld, Kyle Lo, Shane Arora, Akshita Bhagia, Yuling Gu, Shengyi Huang, Matt Jordan, Nathan Lambert, Dustin Schwenk, Oyvind Tafjord, Taira Anderson, David Atkinson, Faeze Brahman, Christopher Clark, Pradeep Dasigi, Nouha Dziri, Allyson Ettinger, Michal Guerquin, David Heineman, Hamish Ivison, Pang Wei Koh, Jiacheng Liu, Saumya Malik, William Merrill, Lester James V. Miranda, Jacob Morrison, Tyler Murray, Crystal Nam, Jake Poznanski, Valentina Pyatkin, Aman Rangapur, Michael Schmitz, Sam Skjonsberg, David Wadden, Christopher Wilhelm, Michael Wilson, Luke Zettlemoyer, Ali Farhadi, Noah A. Smith, and Hannah Hajishirzi. 2 olmo 2 furious. 2025. URL https://arxiv.org/abs/2501.00656.
- [28]Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zach DeVito, Martin Raison, Aly khan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. 2019. URL https://arxiv.org/abs/1912.01703.
- [29]Zehua Pei, Hui-Ling Zhen, Lancheng Zou, Xianzhi Yu, Wulong Liu, Sinno Jialin Pan, Mingxuan Yuan, and Bei Yu. Analytical fnn-to-moe restructuring via activation pattern analysis. 2026. URL https://arxiv.org/abs/2502.04416.
- [30]Xiaoye Qu, Daize Dong, Xuyang Hu, Tong Zhu, Weigao Sun, and Yu Cheng. Llama-moe v2: Exploring sparsity of llama from perspective of mixture-of-experts with post-training. 2024. URL https://arxiv.org/abs/2411.15708. Owen, ., An Yang, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chengyuan Li, Daiyiheng Liu, Fei Huang, Haoran Wei, Huan Lin, Jian Yang, Jianhong Tu, Jianwei Zhang, Jianxin Yang, Jiaxi Yang, Jingren Zhou, Junyang Lin, Kai Dang, Keming Lu, Keqin Bao, Kexin Yang, Le Yu, Mei Li, Mingfeng Xue, Pei Zhang, Qin Zhu, Rui Men, Runji Lin, Tianhao Li, Tianyi Tang, Tingyu Xia, Xingzhang Ren, Xuancheng Ren, Yan Fan, Yang Su, Yichang Yang, Yu Wan, Yuqiong Liu, Zeyu Cui, Zhenru Zhang, and Zihan Qiu. Qwen2.5 technical report. 2025. URL https://arxiv.org/abs/2412.15115.
- [31]Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. Winogrande: An adversarial winograd schema challenge at scale. 2019. URL https://arxiv.org/abs/1907.10641.
- [32]Mingjie Sun, Zhuang Liu, Anna Bair, and J. Zico Kolter. A simple and effective pruning approach for large language models. 2024. URL https://arxiv.org/abs/2306.11695.
- [33]Filip Szatkowski, Bartosz Wójcik, Mikołaj Piórczyński, and Simone Scardapane. Exploiting activation sparsity with dense to dynamic-k mixture-of-experts conversion, 2024. URL https://arxiv.org/abs/2310.04361.
- [34]Hugo Touvron, Louis Martin, Kevin Stone, et al. Llama 2: Open foundation and fine-tuned chat models. 2023. URL https://arxiv.org/abs/2307.09288.
- [35]Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. 2023. URL https://arxiv.org/abs/1706.03762.
- [36]Johannes Welbl, Nelson F. Liu, and Matt Gardner. Crowdsourcing multiple choice science questions. 2017. URL https://arxiv.org/abs/1707.06209.
- [37]Tiansheng Wen, Yifei Wang, Aosong Feng, Long Ma, Xinyang Liu, Yifan Wang, Lixuan Guo, Bo Chen, Stefanie Jegelka, and Chenyu You. Route experts by sequence, not by token. 2026. URL https://arxiv.org/abs/2511.06494.
- [38]Thomas Wolf, Lysandre Debut, Victor Sanh, Julian Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander M. Rush. Huggingface’s transformers: State-of-the-art natural language processing. 2020. URL https://arxiv.org/abs/1910.03771.
- [39]Guangxuan Xiao, Ji Lin, Mickael Seznec, Hao Wu, Julien Demouth, and Song Han. Smoothquant: Accurate and efficient post-training quantization for large language models. 2024. URL https://arxiv.org/abs/2211.10438.
- [41]Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. Hellaswag: Can a machine really finish your sentence? 2019. URL https://arxiv.org/abs/1905.07830.
- [42]Zihao Zeng, Yibo Miao, Hongcheng Gao, Hao Zhang, and Zhijie Deng. Adamoe: Token-adaptive routing with null experts for mixture-of-experts language models. 2024. URL https://arxiv.org/abs/2406.13233.
- [43]Zhengyan Zhang, Yankai Lin, Zhiyuan Liu, Peng Li, Maosong Sun, and Jie Zhou. Moefication: Transformer feed-forward layers are mixtures of experts. 2022. URL https://arxiv.org/abs/2110.01786.
- [44]Haizhong Zheng, Xiaoyao Bai, Xueshen Liu, Z. Morley Mao, Beidi Chen, Fan Lai, and Atul Prakash. Learn to be efficient: Build structured sparsity in large language models. 2024. URL https://arxiv.org/abs/2402.06126.
- [45]Tong Zhu, Xiaoye Qu, Daize Dong, Jiacheng Ruan, Jingqi Tong, Conghui He, and Yu Cheng. Llama-moe: Building mixture-of-experts from llama with continual pre-training. 2024. URL https://arxiv.org/abs/2406.16554.



