STAPLE: Static Sparse Upcycling of
Pretrained Checkpoints via Embedding Modules

Ranajoy Sadhukhan†, Euijin Hong†, Sheng Cao, Zechun Liu§, Shuowei Jin‡, Sha Li‡, Changlong Yu‡, Xin Liu‡, Qin Lu‡, Zhenyu Shi‡, Priyanka Nigam‡, Beidi Chen†
† Carnegie Mellon University · D. E. Shaw Research · § Meta AI · ‡ Amazon Research
Correspondence: rsadhukh@andrew.cmu.edu
(a) Sample efficiency
MMLU accuracy versus training tokens for the dense OLMo-2 1B baseline, upcycled STEM and STAPLE. STAPLE runs above the baseline from early in training and ends near 0.51; upcycled STEM stays below the baseline throughout.
(b) Scalability
Average downstream score versus total parametric capacity. Dense: 1.074B parameters, 44.39. STAPLE L=12, r=512: 1.741B, 44.97. STAPLE L=4: 4.362B, 45.10. STAPLE L=12 full: 10.939B, 45.59. Arrows mark the two scaling axes, embedding rank and number of STAPLE layers.
(c) Comparative analysis
Radar chart of domain averages normalized to the dense baseline for Baseline, Engram, MoE (E8G1T1), STEM (L=12) and STAPLE (L=12) across commonsense, knowledge, discrete reasoning, math and code. STAPLE extends furthest on code.
(a) STAPLE improves over the dense baseline early in training, while replacement-style STEM upcycling stays below it despite additional training. (b) Average downstream performance improves as static sparse capacity grows along either axis — more embedding-augmented layers L, or a larger embedding rank r. (c) Domain averages normalized to continued dense training. The largest gain is in code, with smaller gains in mathematics, knowledge and reading comprehension.

TL;DR

STAPLE is a step toward continually scaling the capabilities of existing language models at minimal cost to serving efficiency, memory and energy footprint, and training resources.

Concretely, it is a recipe for adding static sparse memory to an already pretrained model. It builds on STEM, which replaces each FFN up-projection with a token-indexed embedding table; STAPLE instead retains the up-projections and adds zero-initialized embeddings alongside them. This carries the seed model's knowledge over intact and lets the embeddings learn complementary knowledge at scale, rather than relearning what the model already knows.

On OLMo-2 1B, STAPLE improves over continued dense training across math, code, discrete reasoning and knowledge-intensive tasks, with gains of +4.27 on HumanEval, +2.80 on MBPP, +2.27 on GSM8K and +1.65 on DROP. Performance grows with static capacity, and the gains persist on OLMo-2 7B. STAPLE outperforms the static sparse baselines STEM and an Engram-style model, and achieves a higher average score than an MoE upcycling baseline while decoding 2× faster with less than half its GPU model memory and energy per token.

Billions of parameters added late in training cost almost nothing to run: with the tables offloaded to host memory, STAPLE stays within 1.5% of dense decode throughput and 3% of dense training throughput, with only the embeddings of the ~5% most frequent tokens cached on the GPU for inference.

Because every row is addressed by a token id, the added memory is also interpretable and editable: swapping a single embedding row (e.g. maximum for minimum) flips the model's answer, while consistent in-context evidence can still override the edit, demonstrating the model's flexibility to follow context. → Interpretability

Motivation

New Scaling Axis for Sparse Upcycling

Scaling a model usually means pretraining a bigger one from scratch. Upcycling promises something cheaper: reuse the compute already spent on a dense checkpoint and further enhance its parametric capacity. Today that almost always means Mixture-of-Experts — and MoE upcycling is caught between two failure modes.

Most MoE upcycling initializes new experts by cloning the dense FFN. That preserves the seed model at initialization, but cloned experts can remain functionally similar, so further expert scaling buys less than its parameter count suggests. Breaking this expert homogeneity — with domain-specialized branches, partial re-initialization or extra optimization stages — improves specialization at the cost of a larger training budget or additional training stages. On top of that, MoE brings a systems bill: routing, load balancing, expert fragmentation, HBM-resident expert memory and communication overhead in both training and serving.

We think a good sparse upcycling method has to satisfy three requirements at once:

◇

Sample efficiency

It must realize the performance gains of an equivalently scaled model trained from scratch, within a limited training budget.

◈

Scalability

Adding more sparse parametric memory should keep paying off, rather than saturating after the first increment.

◆

System efficiency

The added capacity must not impose serious compute, memory or communication overhead at train or serve time.

Why static, token-indexed memory

Embedding-based static sparsity expands capacity through deterministic token- or phrase-indexed lookups. Unlike cloned MoE experts, token-indexed rows receive updates from distinct token-conditioned subsets of the training data, providing a structural bias toward differentiation. And because access is predictable from the token id alone, large tables can be offloaded to host DRAM and prefetched off the critical path.

But static sparse upcycling brings its own challenges. Replacing pretrained computation with freshly initialized memory throws away features that must then be relearned. Each embedding row is only updated when its token appears, so under a limited token budget the new parameters receive highly non-uniform training signals. And even with those problems solved, it is not obvious that adding more static capacity keeps paying off. Three findings address these concerns:

  • Sparsity should complement the existing architecture. Keeping the pretrained FFN up-projection and adding static memory as a residual pathway works far better than replacing it, as STEM does. → Architecture
  • Initialize for sample-efficient adaptation. Zero-initialization preserves the seed model exactly, and a short warmup with selectively frozen pretrained components pushes the embeddings to learn complementary knowledge. → Recipe
  • Static memory scales. Average performance keeps improving as layers or embedding rank are added, while the extra memory stays largely offloaded to the CPU. → Scaling
Architecture

Add, don't replace

One design decision separates STAPLE from its predecessor, STEM: the pretrained up projection stays in the graph, and the token-indexed memory is summed into it.

All three variants share the same gated FFN skeleton and differ only in what feeds the feature stream — the second operand of the elementwise product:

$$ \begin{aligned} y^{\mathrm{dense}}_\ell &= W^d_\ell\Big( \mathrm{SiLU}(W^g_\ell x_\ell) \;\odot\; \class{eqhl}{W^u_\ell x_\ell} \Big) && \text{gated FFN of the seed model} \\[7pt] y^{\mathrm{STEM}}_\ell &= W^d_\ell\Big( \mathrm{SiLU}(W^g_\ell x_\ell) \;\odot\; \class{eqhl}{U_\ell[t]} \Big) && \text{replaces the feature stream} \\[7pt] y^{\mathrm{STAPLE}}_\ell &= W^d_\ell\Big( \mathrm{SiLU}(W^g_\ell x_\ell) \;\odot\; \class{eqhl}{\big( W^u_\ell x_\ell + U_\ell[t] \big)} \Big) && \text{adds to it} \end{aligned} $$

STEM swaps the pretrained up projection for a token-indexed lookup from a layer-local table $U_\ell \in \mathbb{R}^{V \times d_\mathrm{ff}}$, so the feature stream depends on the token id $t$ rather than the hidden state. STAPLE keeps $W^u_\ell$ and adds that lookup on top of it as a residual.

With $U_\ell$ zero-initialized, the upcycled model is exactly the seed model at step 0. Nothing is disrupted, no performance has to be recovered, and every gradient the table receives goes toward information the dense pathway does not already carry.

hidden state xℓ token id t Wgℓ x SiLU Wuℓ x Uℓ[t] · STEM table V × d_ff · zero-init · host DRAM + ⊙ Wdℓ yℓ context-dependent gating stream pretrained feature stream — kept token-indexed residual memory — added
A STAPLE layer. The gate and down projections are untouched. The pretrained up projection keeps producing its feature stream; the token-indexed STEM row is summed into it. At initialization $U_\ell = 0$, so the layer is bit-for-bit the pretrained FFN. Because the row is addressed by the token id alone — available before any hidden state is computed — the table can sit in CPU DRAM and be prefetched asynchronously.

Why replacement fails as an upcycling recipe

The replacement-style STEM layer is a strong architecture when trained from scratch, but it makes a poor upcycling target. Token-indexed embeddings only receive updates when their tokens appear, so they already get highly non-uniform training signals under a limited budget. Replacement compounds that by deleting the pretrained up projection, a dense component that already encodes useful shared computation, which the new embeddings must then relearn. It also lacks a straightforward function-preserving initialization: with the up projection gone, zero-init is not an option, and random, token-wise mean, principal-component and transformed input-embedding initializations all failed to improve long-term performance in our experiments.

Empirically, upcycled STEM stays below continued dense training even after 100B tokens (teaser (a)). With 12 embedding layers it averages 39.94 against the dense baseline's 44.39, with the largest drops on knowledge tasks and GSM8K (Results).

Recipe

Zero-init, warm up, then scale

Three ingredients turn "add an embedding table" into a method that actually beats continued dense training.

Step 1

Zero-initialize

Every STEM table starts at zero, so the upcycled model reproduces the seed checkpoint's computation graph exactly and keeps the knowledge already in its weights.

→
Step 2

Warm up on pretraining data

100B tokens drawn from a 2.5% subset of DCLM, with the augmented layers' up projections frozen. The seed model already fits this corpus, so the new tables are pushed to learn complementary signal.

→
Step 3

Mid-train on the high-quality mix

100B tokens of the Dolma 3 Dolmino mix. The STEM embeddings use a 4× larger peak learning rate than the dense parameters, and every group decays linearly to zero.

Warmup matters, but selectively. Brief exposure to the pretraining distribution consistently improves MMLU and average commonsense reasoning over direct upcycling throughout mid-training, suggesting the token-indexed tables pick up useful general-purpose memory before adapting to the mid-training mix. It gives no consistent gain on math and code — and we deliberately excluded math and code sources from the warmup mixture to control this comparison. That asymmetry is informative: the static memory stays responsive to the mid-training distribution and can learn capabilities that warmup did not emphasize.

Commonsense reasoning
Average commonsense reasoning versus training tokens for upcycled STEM, STAPLE, and STAPLE without warmup. STAPLE leads for most of training; upcycled STEM trails both STAPLE variants.
Math & code
Average of GSM8K and MBPP versus training tokens for upcycled STEM, STAPLE, and STAPLE without warmup. The two STAPLE variants track each other closely; upcycled STEM sits below them.
MMLU
MMLU accuracy versus training tokens for upcycled STEM, STAPLE, and STAPLE without warmup. STAPLE is highest throughout, STAPLE without warmup is in the middle, and upcycled STEM is lowest.
Domain-specific comparison of STEM upcycling, STAPLE and STAPLE without warmup, each with 4 STEM embedding layers. Retaining the FFN up projection matters: STAPLE consistently outperforms STEM in every domain. Warmup improves general knowledge and commonsense reasoning, while math and code reasoning are relatively unaffected by it.

Two scaling axes

We scale STAPLE along two axes: the number of embedding-augmented layers $L$ and the embedding dimension $r$. Under the same continued-training budget, going from 4 to 12 augmented layers raises the average downstream score from 45.10 to 45.59. The gains include reasoning-heavy tasks — MBPP improves by 1.80 points, HumanEval by 1.83 and DROP by 0.73 — while MMLU is essentially unchanged (51.27 vs. 51.21).

We place the tables in the early decoder layers (1–12), so that token-specific residuals are integrated into representations that every subsequent layer processes.

The second axis is the capacity of each table. Replacing the full-rank table $U_\ell \in \mathbb{R}^{V \times d_\mathrm{ff}}$ with a rank-$r$ table $U^{(r)}_\ell \in \mathbb{R}^{V \times r}$ plus a learned projection $P_\ell \in \mathbb{R}^{d_\mathrm{ff} \times r}$ gives a continuous capacity knob:

$$ y^{\mathrm{STAPLE}(r)}_\ell = W^d_\ell\Big( \mathrm{SiLU}(W^g_\ell x_\ell) \;\odot\; \big( W^u_\ell x_\ell + P_\ell\,U^{(r)}_\ell[t] \big) \Big) $$

The module has $Vr + d_\mathrm{ff}r$ parameters per layer and adds $2d_\mathrm{ff}r$ projection FLOPs per token. For OLMo-2 1B, $r=512$ shrinks the token-indexed table by $16\times$. At $L=12$ this low-rank variant reaches a 44.97 average, against 45.59 for full-rank STAPLE and 44.39 for dense continuation — so STAPLE benefits from scaling both the number of augmented layers and the capacity of each table.

Commonsense Knowledge RC Math Code
Method ARC-EARC-CHSwagWinoG MMLUDROP GSM8KMATH MBPPHEval Avg.
Dense baseline75.4247.4465.1866.2250.3041.9137.767.6828.8023.1744.39
STAPLE (L=4)76.9846.2566.0065.8251.2742.8339.357.0829.8025.6145.10
STAPLE (L=12)76.6045.9968.2763.7751.2143.5640.037.4431.6027.4445.59
STAPLE (L=12, r=512)76.1846.6766.9965.5950.4941.9139.806.2830.2025.6144.97

STAPLE scalability on OLMo-2 1B. The number of augmented layers L and the embedding dimension r are separate capacity axes; r=512 is the low-rank variant, and the other STAPLE rows use full-width embeddings. All rows use the same continued-training budget. Bold marks the best value in each column.

Results

Performance Improvement across both Knowledge and Reasoning-intensive tasks

Large parametric memory is usually associated with memorization, yet STAPLE's gains extend to reasoning-heavy tasks: code, math and discrete reasoning.

All OLMo-2 1B models start from the same checkpoint with the same budget: 100B warmup tokens plus 100B mid-training tokens on the Dolma 3 Dolmino mix. For a fair compute comparison, the dense baseline continues training on the same number of tokens under the original pretraining learning-rate schedule.

Experimental setup

  • Seed model. OLMo-2 1B, chosen because its training recipe, datasets and optimizer-state checkpoints are public. The released checkpoint has 16 decoder layers and was pretrained on 4T tokens. STAPLE variants augment the early decoder layers with 4 or 12 STEM tables, all zero-initialized.
  • Engram-style baseline. A single-stream Engram-style model on the same backbone, with memory modules at layers 2 and 7: hashed 2-gram and 3-gram memories with eight 64-dimensional heads per order, about 9.87B embedding parameters (matched to STAPLE-12L), context-conditioned key/value projections with sigmoid gating and a depthwise causal convolution. It omits Engram's multi-branch hyper-connections.
  • MoE baseline. A relatively serving-efficient MoE upcycling that replaces the FFNs in eight interleaved decoder layers with MoE layers of eight full-width experts and top-1 routing.
  • Data. Warmup uses 100B tokens sampled from a 2.5% subset of DCLM Baseline 1.0. The original pretraining corpus includes a small fraction of code and math, but those sources are left out of warmup to isolate its effect. Mid-training uses the Dolma 3 Dolmino mix of web, non-web and synthetic sources, designed to improve academic QA, math and programming.
  • Training. Dense parameters follow the OLMo-2 1B hyperparameters, with the optimizer initialized from the released optimizer states. The STEM embeddings use a 4× larger mid-training peak learning rate, and all groups decay linearly to zero. Up-projections in the augmented layers are frozen during warmup; when the warmup stage is omitted, the embedding schedule instead gets a 2% warmup ratio. The 7B runs use about 30B warmup plus 70B mid-training tokens.
  • Evaluation. ARC-Easy, WinoGrande and MMLU: 0-shot accuracy. ARC-Challenge and HellaSwag: 0-shot normalized accuracy. DROP: 3-shot F1. GSM8K: 5-shot strict exact match. MATH: 0-shot exact match. MBPP: 5-shot pass@1. HumanEval: 0-shot pass@1.
Parameter groupStepsWarmup stepsResume → end step SchedulePeak LRMin LR ratioWeight decay
Warmup
STEM / STAPLE tables50,0005000 → 50,000cosine4×10−40.61×10−4
Engram n-gram tables50,0005000 → 50,000cosine4×10−40.61×10−4
Backbone50,00001,907,359 → 2,384,186cosine4×10−40.11×10−1
MoE expert weights50,0005000 → 50,000cosine2×10−40.911×10−1
Mid-training
STEM / STAPLE tables50,00000 → 50,000linear3×10−401×10−4
Engram n-gram tables50,00000 → 50,000linear3×10−401×10−4
Backbone50,00000 → 50,000linear7.44×10−501×10−1
MoE expert weights50,00000 → 50,000linear2×10−401×10−1

All stages use sequence length 4096 and batch size 512. The backbone warmup schedule resumes the base model's pretraining cosine schedule at its final checkpoint. MoE expert weights follow the backbone schedule at a higher peak learning rate.

Commonsense Knowledge RC Math Code
Method ARC-EARC-CHSwagWinoG MMLUDROP GSM8KMATH MBPPHEval Avg.
OLMo-2 1B — baselines and architecture comparison
Dense baseline75.4247.4465.1866.2250.3041.9137.767.6828.8023.1744.39
MoE upcycling (8 experts, top-1)75.0445.7366.8264.7249.9640.7439.807.6428.0028.0544.65
Engram-style77.4047.3566.0564.0150.9841.6838.218.4429.2024.3944.77
STEM (L=12)74.3742.0660.7961.5644.3037.0026.006.9422.6023.7839.94
STAPLE (L=12)76.6045.9968.2763.7751.2143.5640.037.4431.6027.4445.59
OLMo-2 7B backbone — 30B warmup + 70B mid-training tokens
Dense baseline82.0755.9777.5274.8262.5362.7967.7911.0841.8034.7657.11
STAPLE (L=16)82.5857.7677.6274.3562.6763.5570.1312.0243.4035.9858.01

L = number of STEM embedding layers. The Engram-style baseline's added embedding memory is parameter-matched to STAPLE-12L; the replacement-style STEM and additive STAPLE models both use 12 embedding layers. Bold marks the best value within each backbone block. Evaluation settings are listed under Experimental setup above.

What stands out

  • Reasoning, not just recall. STAPLE-12L raises the ten-task average from 44.39 to 45.59 over continued dense training, and the biggest gains are on reasoning-heavy tasks: HumanEval +4.27, MBPP +2.80, GSM8K +2.27 and DROP +1.65.
  • Replacement doesn't work for upcycling. Under the same budget, STEM does not even match continued dense training (39.94 average), with notable drops on knowledge tasks and GSM8K. Retaining the pretrained model's computation graph is what makes static memory pay off.
  • Better than a parameter-matched static memory. STAPLE achieves higher domain-average math and code scores and higher DROP performance than the parameter-matched Engram-style baseline, supporting the effectiveness of its architecture and adaptation recipe.
  • Better than MoE upcycling, for less. STAPLE scores 0.94 points above the MoE baseline on average while decoding 2.04× faster with about 54% less GPU-resident model memory and 58% less energy per generated token (Efficiency).
  • It transfers up. On OLMo-2 7B, with the first 16 decoder layers augmented and a reduced budget (30B + 70B), STAPLE improves 9 of 10 tasks and lifts the average from 57.11 to 58.01 — math by 4.16% and code by 3.68% relative to the baseline. The modest MMLU gain may reflect the shorter warmup, consistent with the 1B warmup ablation.
System efficiency

Offloads embedding tables to CPU, yet matches dense training and serving cost

STAPLE substantially increases the parametric memory footprint, but every row is addressed by token id. That predictable access pattern lets the large tables stay in CPU DRAM while only the needed rows move to the GPU — the challenge is hiding that transfer behind model computation.

(a) Training throughput and GPU memory
Paired horizontal bar charts. Training throughput: dense OLMo-2 1B 117.0K tokens per second, STAPLE-4L 115.3K, STAPLE-12L 113.9K, MoE with 8 experts and 1 active 101.7K. GPU-resident fp32 weights plus AdamW state: 16.6 GiB for dense and both STAPLE variants, which additionally hold 30.6 GiB (4L) or 91.9 GiB (12L) in host DRAM, and 48.1 GiB for the MoE.
(b) Decode throughput
Bar chart of decode throughput at batch size 64: dense 35.2K tokens per second on 2.97 GB of weights, STAPLE-4L 35.1K and STAPLE-12L 34.7K on 2.97 GB plus a 1 GB cache, and MoE 17.0K on 8.61 GB. STAPLE-12L decodes 2.04 times faster than the MoE.
Training and serving efficiency of host-offloaded STAPLE. (a) Training throughput, and GPU-resident weights plus optimizer state; parameter counts include the STEM tables. STAPLE keeps its bf16 tables and fp32 AdamW moments in host DRAM (hatched), matching the dense GPU footprint, whereas the MoE baseline keeps all experts and their optimizer states on the GPU. (b) Decode throughput on one NVIDIA B200 at batch size 64 and context length 256, labeled with GPU memory for weights plus, for STAPLE, a 1 GB cache of frequently accessed rows.

Inference-time offload

Three complementary optimizations reduce retrieval overhead during serving:

⇄

Asynchronous prefetching

Transfers for upcoming requests or prefill chunks overlap with the current computation. During decode, later-layer lookups overlap with earlier-layer execution.

◱

Frequency-aware caching

Token frequencies are Zipfian, so caching 5–6% of the vocabulary gives roughly an 80% hit rate. That shrinks STAPLE-12L's GPU-resident embedding footprint from 19.73 GB to a 1 GB cache.

≡

Token deduplication

Each distinct row is transferred only once per prefill batch, cutting the prefetch workload by roughly 50%. It is skipped during decode, where the deduplication overhead exceeds the savings.

Architecture HBM model memory Linear FLOPs / token Decode B1 Decode B64 Prefill B1 Prefill B64 Energy / token (decode B64)
Dense2.97 GB weights~2.56 G1.224 ms / 8171.817 ms / 35.2K1.419 ms / 180.5K34.184 ms / 479.3K18.69 mJ
STAPLE-12L2.97 GB weights + 1 GB cache~2.56 G1.237 ms / 8091.845 ms / 34.7K1.524 ms / 168.0K34.678 ms / 472.5K18.92 mJ
STEM-12L2.57 GB weights + 1 GB cache~2.16 G1.151 ms / 8691.671 ms / 38.3K1.413 ms / 181.1K27.580 ms / 594.1K—
MoE (8 experts, top-1)8.61 GB weights, all 8 experts~2.56 G + routing1.951 ms / 5133.761 ms / 17.0K2.975 ms / 86.1K36.179 ms / 452.9K45.37 mJ

One NVIDIA B200, context length 256. Latency / throughput in ms / tok s−1. HBM memory includes resident weights and GPU caches. STAPLE-12L offloads 12 embedding tables (19.73 GB in BF16) to CPU DRAM and keeps a 1 GB GPU cache. The MoE baseline keeps all experts in HBM and incurs routing and token-reordering overhead. The serving stack uses CUDA graphs, a fused in-place KV-cache append kernel and FlashInfer for paged decode attention. Energy per generated token was measured with Zeus in a separate run on one otherwise idle B200 of a DGX B200 (dual Xeon Platinum 8570, PCIe Gen5 ×16 CPU–GPU links); three repeats per model agree within 1.5%. It was not measured for STEM-12L.

With 19.73 GB of learned tables offloaded, STAPLE-12L's decode throughput stays within 1.0% of dense at batch size 1 and 1.5% at batch size 64. Relative to the MoE baseline, STAPLE uses about 54% less HBM model memory and improves decode throughput by 2.04× at batch size 64 and 58% at batch size 1.

Beyond latency, energy per generated token captures the benefits of weight reuse across the batch, efficient dense kernels, and less background energy from shorter execution. In our throughput-oriented decoding evaluation (batch size 64), STAPLE-12L's measured energy per token is 18.92 mJ, about 1.2% above dense (18.69 mJ) and 58.3% below the MoE baseline (45.37 mJ). The CPU side adds very little: activity-based estimates put STAPLE's additional host-memory and PCIe transfer energy below 0.2% of the measured energy, and the CPU launch thread at roughly 1% for all three models, which leaves the comparison essentially unchanged.

Training-time offload

Training also needs gradients and optimizer states, which makes keeping the full tables on the GPU costly. But each step only touches the distinct token ids in its batch, $U = |\mathrm{uniq}(\mathcal{B})|$, rather than the full vocabulary $V$. With non-uniform token frequencies, typically $U \ll V$, and $U$ grows sublinearly with batch size.

▤

Materialize only touched rows

The full STEM tables and fp32 AdamW states stay in CPU DRAM; each step brings only the active $U \times d_\mathrm{ff}$ rows to the GPU. That compact buffer is the autograd leaf, so backward never allocates a dense $V \times d_\mathrm{ff}$ gradient, and a row-restricted AdamW updates only the accessed rows. We observe no degradation in end-to-end downstream task performance when training with these sparse optimizer updates.

⇉

Overlap with backbone compute

Host gathers, host-to-device and device-to-host transfers, and optimizer work all overlap with backbone computation. Host work scales with $U$ while transformer compute scales with total tokens, so overlap gets easier at larger batches. Gradient staging is double-buffered, and next-step gathers are issued in forward consumption order.

⊞

Host-memory placement

Sustaining host bandwidth takes care: table allocations are interleaved across NUMA memory controllers and optionally backed by huge pages, and the OpenMP worker pool idles passively so it does not compete with the GPU-launch thread.

The result: STAPLE-12L trains within 3% of dense throughput (113.9K vs. 117.0K tokens/s) with 91.9 GiB of tables and optimizer moments in host DRAM. Its GPU-resident weights and optimizer state match the dense model, and the compact row buffers add only about 3% peak HBM. The MoE baseline trains 13% slower (101.7K tokens/s) and needs 2.9× the GPU memory for weights and optimizer state.

Analysis

Is the model actually using the memory?

Two checks: are the learned embeddings different from the dense pathway, and does removing them hurt?

Density plots of cosine similarity between mean token-wise up-projection output and STEM embeddings at layers 1, 6 and 12, all concentrated near zero.
The embeddings are near-orthogonal to the dense stream. Pairwise cosine similarity between the mean token-wise up-projection output and the learned STEM embedding, at layers 1, 6 and 12 of STAPLE with 12 STEM tables. Medians of +0.025, +0.003 and −0.087 — the memory is not re-deriving what $W^u_\ell$ already computes.

Low cosine similarity says the two feature streams occupy different directions, but geometry alone does not show the memory is useful. So we test the model's dependence on it directly: we remove the last 4, last 8 or all 12 embedding tables from a trained STAPLE-12L checkpoint at evaluation time, without retraining.

The ten-benchmark average falls from 45.59 to 41.28, 36.94 and 32.17. The model clearly relies on its learned static memory after mid-training. (The fully ablated model is not the original dense seed, since the remaining weights have co-adapted with the memory.)

The dependence is sharpest on math and code. Removing all tables lowers GSM8K, MBPP and HumanEval by 31.08, 27.40 and 23.17 points, compared with 7.34 on ARC-Challenge and 7.08 on MMLU. Removing only the last four already costs 17.59 points on GSM8K, 8.40 on MBPP and 8.54 on HumanEval. The deeper tables contribute most to generation-heavy math and programming, while knowledge-intensive tasks lean on the bottom-most layers.

Line chart of score retained relative to the full model as 0, 4, 8 and 12 embedding tables are removed, starting from the topmost. ARC-Challenge and MMLU stay above 80 percent; GSM8K, MBPP and HumanEval fall below 25 percent; the ten-task average falls to about 70 percent.
Removing embedding tables. Benchmark-score retention after removing the last 4, 8 or all 12 tables from trained STAPLE-12L.
Interpretability

Static memory meets contextual reasoning

The removal ablations show that STAPLE relies on its memory, but not how that memory affects individual predictions. Swapping one token's embedding row — and nothing else — lets us find out.

Following STEM, we probe the memory with causal interventions. Each row of $U_\ell$ is selected only by the input token id, so substituting one token's row for another's changes the memory contribution without changing the input text: any change in the output is attributable to the embeddings. At the same time, STAPLE scales $U_\ell[t]$ by the context-dependent gate $\mathrm{SiLU}(W^g_\ell x_\ell)$, so the context may counteract a conflicting memory signal.

We test this on two tasks: finding the maximum of five numbers, and writing Python code that finds the maximum of an array. In both, we replace the STEM embedding for maximum with the one for minimum, and vary the number of correct demonstrations in the prompt.

Surface token maximum
Swapped-in row minimum
Changed one STEM embedding row — prompt text and dense weights untouched
(a) Order statistics
Heatmap of probability over the five sorted numbers 12, 29, 47, 56 and 83 against the number of in-context demonstrations, with the maximum embedding swapped for minimum. With no demonstrations 0.93 goes to 12, the minimum; with four, 0.97 goes to 83, the maximum. A line shows the expected rank of the answer rising as demonstrations are added.
(b) Code generation
Probability that the generated loop compares with less-than versus the number of worked examples in the prompt. With the word rewritten to min it stays between about 0.97 and 0.70; with the STEM row swapped to min it falls from 0.40 to about 0.11; the unmodified baseline stays near zero.
Controlled embedding interventions, with the STEM embedding for maximum swapped for that of minimum. (a) Probability over the five sorted candidates (heatmap) and expected answer rank (line) as correct demonstrations are added. (b) Probability that the generated maximum-finding loop compares with < under the same swap, alongside the unmodified model and the instruction rewritten to minimum.

Order statistics. Without demonstrations, the swap overrides the instruction: the model assigns 0.93 probability to the minimum. Each demonstration shifts probability toward larger answers, and with four the model assigns 0.97 to the maximum.

Code generation. The swap also changes the generated algorithm, since comparing with < rather than > turns the loop into a minimum finder. The probability of < is 0.40 without demonstrations and falls to 0.11 with four. For reference, the unmodified model almost never uses <, while rewriting the instruction to minimum makes it the most likely choice at every demonstration count.

In both tasks the static embeddings causally change the output — from the selected answer to the program's logic — yet consistent context progressively overrides them. That is what we would expect if the context-dependent gate controls how much the token-indexed memory contributes.

Tracing a numerical edit through a GSM8K solution

The same mechanism carries through multi-step reasoning. On a GSM8K item the unmodified model solves correctly (four-shot chain-of-thought), we remap the STEM row for the token 60 to the row for 120. The input text and dense weights are unchanged, and the remapping applies wherever that token id occurs, including in the model's own continuation.

GSM8K test item 10 — original question A new program had 60 downloads in the first month. The number of downloads in the second month was three times as many as the downloads in the first month, but then reduced by 30% in the third month. How many downloads did the program have total over the three months?
(a) Original model and question366

In the first month, the program had 60 downloads.

In the second month, the program had 60 x 3 = ⟨⟨60*3=180⟩⟩ 180 downloads.

In the third month, the program had 180 - (180 x 0.3) = 180 - 54 = ⟨⟨180-54=126⟩⟩ 126 downloads.

So the program had a total of 60 + 180 + 126 = ⟨⟨60+180+126=366⟩⟩ 366 downloads over the three months.

#### 366

(b) STEM row 60 ↦ 120, same question732

In the first month, the program had 120 downloads.

In the second month, the program had 120 x 3 = 360 downloads.

In the third month, the program had 360 - (360 x 0.3) = 360 - 108 = 252 downloads.

So the program had a total of 120 + 360 + 252 = ⟨⟨120+360+252=732⟩⟩ 732 downloads over the three months.

#### 732

(c) Question rewritten 60 → 120, original memory732

In the first month, the program had 120 downloads.

In the second month, the program had 120 x 3 = ⟨⟨120*3=360⟩⟩ 360 downloads.

In the third month, the program had 360 - (360 x 0.3) = ⟨⟨360-108=252⟩⟩ 252 downloads.

So the program had a total of 120 + 360 + 252 = ⟨⟨120+360+252=732⟩⟩ 732 downloads over the three months.

#### 732

A token-indexed memory intervention propagates through a GSM8K solution. Full output for the original model, the STEM row update, and the rewritten-question control. Highlights mark the critical numerical changes. With the question unchanged, the row update produces the same intermediate quantities and final answer as explicitly replacing 60 with 120 in the question.

The row update changes the monthly quantities from 60, 180 and 126 to 120, 360 and 252, and the total from 366 to 732. Agreement with the rewritten-question control suggests the edit changes the effective numerical premise that every later step computes from. This is a single example linking a token-addressable memory edit to coherent downstream reasoning; it does not establish general edit reliability or an isolated fact representation. And because the remapping applies to every occurrence of the token, it does not separate prompt-processing effects from feedback through generated tokens.

Conclusion

STAPLE is a simple, sample-efficient method for continually expanding the parametric capacity of a pretrained dense model during mid-training. The key idea is to preserve the pretrained model's learned knowledge and complement it with scalable memory.

STAPLE shows that the system-efficient scaling of static sparsity translates into practical performance gains even in the upcycling setting. Despite introducing a large number of new parameters, it remains highly token-efficient and provides consistent gains as memory scale grows, notably on reasoning-heavy tasks. Compared with a serving-efficient MoE upcycling baseline, STAPLE achieves a higher average score while training faster and decoding 2× faster with a much smaller GPU memory footprint. Its token-indexed memory is also interpretable and editable: targeted interventions on individual rows change model behavior, while consistent contextual evidence can still override them, demonstrating the model's flexibility to follow context.

An exciting direction for future work is whether jointly scaling static memory with MoE can push the performance–efficiency frontier further.

Citation

@misc{sadhukhan2026staplestaticsparseupcycling,
      title={STAPLE: Static Sparse Upcycling of Pretrained Checkpoints via Embedding Modules},
      author={Ranajoy Sadhukhan and Euijin Hong and Sheng Cao and Zechun Liu and
              Shuowei Jin and Sha Li and Changlong Yu and Xin Liu and Qin Lu and
              Zhenyu Shi and Priyanka Nigam and Beidi Chen},
      year={2026},
      eprint={2610.12599},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/2610.12599},
}