Decode-Branch Transformers: Decoupling the Primary Prefill Path from Additional Decode Computation

Liming Liu, Mingze Wang, Tuo ZhaoarXiv 2026

TL;DR

Decode-Branch Transformers decouple the compute-bound prefill phase from the memory-bandwidth-bound decode phase in large language model (LLM) inference. By introducing an auxiliary decoding branch that shares weights and a single KV cache with the primary model, it injects extra compute specifically during token generation with minimal latency overhead. This architecture consistently improves validation loss and introduces new phase-specific compute allocation strategies for Mixture-of-Experts (MoE) models.

What Problem Does This Paper Address?

LLM inference is a tale of two phases with completely different hardware bottlenecks:

  1. Prefill: The model processes the user's prompt in parallel. This phase is highly parallelizable and compute-bound (limited by the GPU's peak FLOPs).
  2. Decode: The model generates tokens sequentially, one by one. Because each step only processes a single token, it performs very little arithmetic relative to the massive amount of model weights and key-value (KV) cache entries it must fetch from memory. This phase is heavily memory-bandwidth-bound.

Standard scaling approaches (making a model deeper or wider) scale both phases together. Adding layers means loading more weights at every single decode step, which directly worsens the memory bottleneck. The authors of this paper ask a clever question: Can we add learned computation specifically to the decoding phase to improve model capability without slowing down prefill or inflating memory traffic?

Methods

The authors introduce the Decode-Branch Transformer, which splits the network into two asymmetric trajectories:

  • The Primary Path: A complete, standard causal Transformer that alone processes the prompt during prefill and writes to a single, persistent KV cache.
  • The Decode Branch: An auxiliary path that is completely omitted during the prompt prefill phase. It activates only at the final prompt position and during subsequent autoregressive decoding steps.
Prefill Phase:  [Prompt Tokens] ---> Primary Path (Writes KV Cache)
                                      X (Decode Branch is OFF)

Decode Phase:   [New Token]     ---> Primary Path (Appends KV Cache) \
                                                                      ==> Shared Weights & KV Cache
                                ---> Decode Branch (Reads Only)      /

To prevent the decode branch from increasing the dominant memory traffic during generation, the two paths share all major parameters (attention, MLP, and output matrices) and read from the exact same primary KV cache. The branch only introduces separate token embeddings and lightweight, element-wise coupling vectors ($a^\ell, b^\ell, c^\ell$) to pull intermediate representations from the primary path.

The final token prediction is determined by a mixture next-token objective, which dynamically weights the outputs of both paths based on how confident the primary path is. For Mixture-of-Experts (MoE) models, they introduce router replay, forcing the decode branch to reuse the exact experts selected by the primary path, ensuring no extra unique expert weights need to be fetched from memory.

Datasets

The architecture was evaluated using the FineWeb dataset across three distinct structural configurations:

  • NanoGPT token scaling: Controlled data-scaling setups up to 20B tokens.
  • Dense LLaMA-style scaling: Model sizes ranging from 0.12B to 1B parameters.
  • Sparse LLaMA-style MoE: Qwen-style sparse MoE configurations from 0.25B to 1B parameters.

Key Insights and Ideas

  • Exploiting Idle Cores: Because decoding is memory-bound, the GPU's tensor cores spend a lot of time idling while waiting for weights to load from High Bandwidth Memory (HBM). Decode-Branch puts these idle cores to work by running a second parallel trajectory through the same loaded weight tiles, essentially getting extra compute for "free."
  • Asymmetric Information Flow: The primary path never reads from the decode branch. This strict asymmetry ensures that prompt processing remains entirely unaffected, and the persistent KV cache footprint does not grow.
  • Independent Knobs for MoE Serving: In MoE models, the primary path can activate $k_1$ experts, while the decode branch activates $k_2$ experts. This turns prefill cost and decode cost into independent, configurable knobs. Serving systems can now dynamically trade off prompt processing speed, generation speed, and model quality based on their specific workload demands.

Key Results

  • Consistent Quality Gains: Across all token budgets and model sizes, the Decode-Branch Transformer consistently achieves lower validation loss than standard Transformer baselines.
Figure 1: NanoGPT validation loss versus training step at five matched token budgets in a single coordinate system. Color identifies the data multiplier D; solid and dashed curves denote the standard Transformer and Decode-Branch, respectively.
  • Data Scaling Efficiency: As shown in Figure 1, across five matched token budgets (where $D$ represents the data multiplier), the Decode-Branch model consistently maintains a lower validation loss trajectory compared to the standard Transformer.
  • MoE Prefill Optimization: In MoE allocation sweeps, the authors demonstrated that a configuration cutting the prefill expert arithmetic in half (reallocating that budget to the decode branch) could match or exceed the validation loss of a standard top-4 MoE baseline while drastically reducing prompt-processing costs.

Limitations and Future Work

  • Training Cost Overhead: While highly efficient during inference, the prompt-side savings do not apply during training. Because every token position acts as a potential boundary for a generation step, both paths must be evaluated across the full training sequence. This roughly doubles the training FLOPs and increases activation memory requirements.
  • Embedding Footprint: The architecture requires a second vocabulary-scale token embedding table, which slightly increases parameter and optimizer-state memory (though it does not add matrix-multiplication compute).
  • Future Work: The authors suggest exploring extensions like instantiating multiple decode branches or introducing branch-specific dense weights to further scale decoding capacity.

Summary updated

BibTeX
@misc{liu2026decode,
  author = {Liming Liu and Mingze Wang and Tuo Zhao},
  title = {{Decode-Branch Transformers: Decoupling the Primary Prefill Path from Additional Decode Computation}},
  year = {2026},
  eprint = {2608.12385},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.12385},
}
Figure