Decode-Branch Transformers: Decoupling the Primary Prefill Path from Additional Decode Computation
Liming Liu, Mingze Wang, Tuo Zhao
Abstract
As large language models serve ever more requests, cumulative inference cost is growing relative to the one-time cost of training. In typical serving, prompt prefill runs in parallel and is compute-bound, whereas autoregressive decode is sequential and memory-traffic-bound. Conventional width or depth scaling raises both costs together, since every added layer is evaluated in both phases and enlarges the weights read at each decode step. We instead ask whether additional learned computation can be allocated to continuation prediction while preserving prompt-wide primary computation and a single KV cache. We realize this with the Decode-Branch Transformer. Its primary path alone processes the prompt and writes the KV cache; the decode branch is omitted during prefill and activated only from the final prompt position onward, adding continuation computation without writing state or affecting the primary path. The paths share attention, MLP, and output matrices, using separate token embeddings with lightweight coupling. Grouped decode reuses loaded weight tiles and the primary KV cache across both paths, so the added arithmetic does not proportionally increase dominant memory traffic or decode latency. Across matched-token comparisons, Decode-Branch achieves lower validation loss across architectures and data settings. In MoE models, the primary and branch expert fan-outs become independent knobs for trading prompt cost, decode cost, and predictive quality. We study two expert-allocation regimes, holding prefill or decode computation fixed, and expose a prefill-decode-quality trade-off enabled by phase-specific expert allocation.
Create a lesson
Related papers
Vega-Fafnir: Is Greedy Decoding the Same Decoding? Where Rounding Noise in Speculative Verification Comes From and What Removing It Costs
Shared title terminology · Mohammed Nayeem Khan, Navin Kumar R
Beyond Linear Decodability: Understanding and Improving Instruction Following in World Action Models
Shared title terminology · Bokai Ji, Jiapeng Chen, Yi Zhang et al.
LLM GerryMandering: Separating Interactions from Additive Effects in LLM Audits
Shared title terminology · George Rahul, Ronit Jalihal, Bhaskara Hanuma Vedula et al.
Decoupled Knowledge Retrieval and Compact Memory Enable Reliable Lifelong Model Editing
Shared title terminology · Yue Che, Jingze Wang, Chen Guoyi et al.
Damage-Aware Bandit Pruning for Vision and Language Transformers
Shared title terminology · Salem Ameen, Sunil Vadera
Computing with Agentic Oracles
Shared title terminology · Jie Wang