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

작성자

카테고리:

← 피드로
arXiv cs.AI · Liming Liu, Mingze Wang, Tuo Zhao · 2026-08-15 AI

[Submitted on 31 Jul 2026 (v1), last revised 17 Aug 2026 (this version, v2)]

View PDF HTML (experimental)

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.

Submission history

From: Liming Liu [view email]
[v1] Fri, 31 Jul 2026 17:18:36 UTC (117 KB)
[v2] Mon, 17 Aug 2026 17:30:40 UTC (126 KB)

원문에서 계속 ↗

추출 본문 · 출처: arxiv.org · https://arxiv.org/abs/2608.12385