Manuscript Offprint

arXiv:2610.18654

Kwai Summary Attention V2 Technical Report

OneRec Team, Chenglong Chu, Guohong Mu, Guowang Zhang, Hao Peng, Hui Wang, Jian Liang, Jiangxia Cao, Jiao Ou, Jiaxin Deng, Lu Ren, Muhao Wei, Ruiming Tang, Tianle Xu, Wenwu Ou, Xingmei Wang, Zhixin Ling, Zhiyuan Liang, Ziqi Wang, Chaoyi Ma, Haixiao Gao, Kuo Cai, Renpu Liu, Ruochen Yang, Wenlong Xu, Xinqi Jin, Yan Sun, Yifan Wang, Yingzhi He, Yiyu Wang, Yusen Huo, Zhaojie Liu, Zihan Zhou

OneRec Team

Summary-token architectures such as Kwai Summary Attention (KSA) compress distant context into learnable Summary token per chunk, and hybrid variants interleave these layers with full attention to retain exact access to the original text. In such hybrid KSA-Full architecture, the interleaving inserted summary tokens are served as a streaming flow role across different layers. Although effective, however, it also introduce some bottlenecks: (1) the different layers summary compression chunk must be same, therefore hard to reach a flexible KV Cache compression, e.g., different layer set different summary compression chunk window. (2) in the full-attention layers, the summary token introduced additional computation cost, but such layer ignore them and still pay quadratic prefilling, therefore unfriendly to the computation side. Motivated by them, we developed the KSA V2, which not only achieves a more flexible KV cache memory compression but also reduces the computation cost in Full attention layer. Specifically, we found that the summary tokens can serve two roles: the KV memory and sparse indexer. As KV memory, they can be further compressed without coarsening the representation passed between layers: Compressed KSA (C-KSA) pools groups of Summary KV into layer-local Meta entries, raising a larger chunk distant history compression. As sparse index, the summary token could conduct exact-access layers where to look: Sparse KSA (S-KSA) builds block-level routing keys from the Summaries and attends only to selected original-text blocks. We conduct experiments based on the 1.9B (MHA) and 4B (GQA) Hybrid KSA backbones, and we mostly adopt them by training the new compressed and sparse modules. In 1.9B (MHA) and 128K sequence scale, it reduces resident cache size by 40.4% and achieves 1.51× prefill and 1.27× decode throughput.

Figure

Figure 1 | Left: long-context and general capabilities of 1.9B C-KSA+S-KSA and the reference models reported in KSA. Right: per token inference FLOPs and cache size (1GiB = 2 30^{30} bytes).

© 2026 Kuaishou. All rights reserved

1. Introduction

Serving long contexts incurs substantial storage and computation costs. With full attention, the key-value (KV) cache grows linearly with context length, prefill attention is quadratic, and each decoding query reads the full history. Per-token KV compression (Ainslie et al., 2023; DeepSeek-AI et al., 2024) reduces storage per position but retains an entry for every token. Sparse attention (DeepSeek-AI et al., 2025; Lu et al., 2025; Yuan et al., 2025) reduces each query's read set while retaining token-level KV. Sliding-window and recurrent linear attention (Jiang et al., 2023; Yang et al., 2025) reduce both storage and computation, but do not preserve direct access to distant tokens. Hybrid architectures balance these trade-offs by interleaving compact-memory layers with full-attention layers that retain direct access to the original text.

Summary-token hybrids are a strong instance of this design. Kwai Summary Attention (KSA) (Chu et al., 2026) appends a learned Summary token after every ksk_{s} text tokens; in KSA layers, text queries read nearby chunks at full resolution and distant chunks through their Summaries. Hybrid KSA interleaves three such layers with one full-attention layer (Figure 2) and retrieves long-range information better than a same-size full-attention model.

In these hybrids, however, the Summaries are underused. They are computed and refined at every layer, yet serve only as low-resolution memory for KSA layers, leaving an inefficiency on each side. On the efficient side, compression is tied to chunk size: a KSA layer stores one entry per distant chunk, so compressing further requires larger chunks, which also coarsen the Summaries that every later layer reads and refines. The KSA report's 4B ablation shows that coarser Summary chunks can degrade retrieval performance. On the exact side, full-attention layers read every token, although most barely matter. At 128K, oracle block selection restricts the main-attention read set to about 4% of text positions, yet retains about 82% of decode attention mass and near-dense retrieval performance in a frozen Hybrid KSA (Figure 12; Table 10). What is missing is a cheap way to know where to look, and the Summaries, which describe every chunk, are never consulted.

We argue that a single summary hierarchy can play both roles. As memory, Summaries can be compressed a second time when stored, without coarsening the representation that is propagated; as an index, they can direct exact-access layers to the few original-text blocks worth reading. Efficient layers store coarse, exact layers read fine, and the Summaries connect the two.

We instantiate this idea with two drop-in layer types, which together form KSA V2. Compressed KSA (C-KSA) pools every kmk_m consecutive Summary KV entries into one layer-local Meta entry, using learned dimension-wise weights as in DeepSeek-V4 (DeepSeek-AI et al., 2026). Meta entries are never fed forward, so the Summary sequence keeps its granularity while distant-history storage shrinks by a factor of kskmk_s k_m ( 1024×1024 \times with ks=8k_s = 8 and km=128k_m = 128). Sparse KSA (S-KSA) replaces full attention: each Summary pools the tokens of each b-token block in its chunk into a routing key, a Lightning Indexer (DeepSeek-AI et al., 2025) selects the top blocks, and the main attention reads their original KV with attention sinks and a local window. Routing needs b×b \times fewer candidates than token-level indexing in DSA, and unlike CSA (DeepSeek-AI et al., 2026), the main attention never reads compressed text.

Because both layer types reuse existing Summaries, neither adds tokens nor changes the Summary layout, so both can be retrofitted into a pretrained hybrid. The adapted 1.9B model largely preserves Hybrid KSA's retrieval and general capabilities while outperforming Full on retrieval. Ablations show that C-KSA alone matches its parent and that sparse adaptation incurs a smaller retrieval loss on the compressed backbone than on the original (Section 3.3). At 128K, the model reduces resident cache size by 40.4% and achieves 1.51×1.51\times prefill and 1.27×1.27\times decode throughput relative to Hybrid KSA. Compared with Full, it reduces cache size by 73.7% and achieves 2.16×2.16\times prefill throughput (Section 3.6).

Figure

Figure 2 | Architecture overview: from Hybrid KSA to KSA V2.

The remaining cache is mostly original-text KV in the exact-access layers, and aggregation-heavy tasks such as frequent-word extraction degrade under block selection (Table 7).

The approach also retains near-parent retrieval performance on a 4B GQA backbone, supporting transfer beyond the 1.9B MHA setting.

Our contributions are threefold:

• We propose C-KSA, which compresses Summary KV at storage time into layer-local Meta entries, so that further compression of distant history no longer requires coarser Summaries.

• We propose S-KSA, which turns existing Summaries into block-level routing keys for sparse attention over selected original-text blocks.

• We provide a retrofit recipe and GPU kernels that convert a pretrained Hybrid KSA model with RULER performance comparable to its parent, and we report where the remaining cost lies and where the approach fails.

References (73)