Lune

NeurIPS2024顶会

You Only Cache Once: Decoder-Decoder Architectures for Language Models

Yutao Sun, Li Dong, Yi Zhu, Shaohan Huang, Wenhui Wang, Shuming Ma, Quanlu Zhang, Jianyong Wang, Furu Wei

摘要

We introduce a decoder-decoder architecture, YOCO, for large language models, which only caches key-value pairs once. It consists of two components, i.e., a cross-decoder stacked upon a self-decoder. The self-decoder efficiently encodes global key-value (KV) caches that are reused by the cross-decoder via cross-attention. The overall model behaves like a decoder-only Transformer, although YOCO only caches once. The design substantially reduces GPU memory demands, yet retains global attention capability. Additionally, the computation flow enables prefilling to early exit without changing the final output, thereby significantly speeding up the prefill stage. Experimental results demonstrate that YOCO achieves favorable performance compared to Transformer in various settings of scaling up model size and number of training tokens. We also extend YOCO to 1M context length with near-perfect needle retrieval accuracy. The profiling results show that YOCO improves inference memory, prefill latency, and throughput by orders of magnitude across context lengths and model sizes. Code is available at https://aka.ms/YOCO.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 62 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Efficient Streaming Language Models with Attention Sinks 引用了 YaRN: Efficient Context Window Extension of Large Language Models
  • Efficient Streaming Language Models with Attention Sinks 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models 引用了 Efficient Streaming Language Models with Attention Sinks
  • Parallelizing Linear Transformers with the Delta Rule over Sequence Length 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Parallelizing Linear Transformers with the Delta Rule over Sequence Length 引用了 Gated Linear Attention Transformers with Hardware-Efficient Training
  • Reducing Transformer Key-Value Cache Size with Cross-Layer Attention 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Reducing Transformer Key-Value Cache Size with Cross-Layer Attention 引用了 FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPU
  • Reducing Transformer Key-Value Cache Size with Cross-Layer Attention 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • Reducing Transformer Key-Value Cache Size with Cross-Layer Attention 引用了 Gated Linear Attention Transformers with Hardware-Efficient Training
  • H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Gated Linear Attention Transformers with Hardware-Efficient Training 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation 引用了 Efficient Streaming Language Models with Attention Sinks
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation 引用了 Reducing Transformer Key-Value Cache Size with Cross-Layer Attention
  • Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level Computation 引用了 H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models
  • MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention 引用了 Transformers are RNNs: Fast Autoregressive Transformers with Linear Attention
  • MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention 引用了 Efficient Streaming Language Models with Attention Sinks
  • MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse Attention 引用了 YaRN: Efficient Context Window Extension of Large Language Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper62

  1. MInference 1.0: Accelerating Pre-filling for Long-Context LLMs via Dynamic Sparse AttentionHuiqiang Jiang, Yucheng Li, Chengruidong Zhang, Qianhui Wu 等NeurIPS 2024 · 479 次引用
  2. Parallelizing Linear Transformers with the Delta Rule over Sequence LengthSonglin Yang, Bailin Wang, Yu Zhang, Yikang Shen 等NeurIPS 2024 · 412 次引用
  3. Gated Linear Attention Transformers with Hardware-Efficient TrainingSonglin Yang, Bailin Wang, Yikang Shen, Rameswar Panda 等ICML 2024 · 390 次引用
  4. Reducing Transformer Key-Value Cache Size with Cross-Layer AttentionWilliam Brandon, Mayank Mishra, Aniruddha Nrusimha, Rameswar Panda 等NeurIPS 2024 · 150 次引用
  5. Mixture-of-Recursions: Learning Dynamic Recursive Depths for Adaptive Token-Level ComputationSangmin Bae, Yujin Kim, Reza Bayat, Sungnyun Kim 等NeurIPS 2025 · 143 次引用

它引用的 Paper15

  1. Transformers are RNNs: Fast Autoregressive Transformers with Linear AttentionAngelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, François FleuretICML 2020 · 2,665 次引用
  2. Efficient Streaming Language Models with Attention SinksGuangxuan Xiao, Yuandong Tian, Beidi Chen, Song Han 等ICLR 2024 · 1,714 次引用
  3. H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language ModelsZhenyu Zhang, Ying Sheng, Tianyi Zhou, Tianlong Chen 等NeurIPS 2023 · 1,003 次引用
  4. FlexGen: High-Throughput Generative Inference of Large Language Models with a Single GPUYing Sheng, Lianmin Zheng, Binhang Yuan, Zhuohan Li 等ICML 2023 · 683 次引用
  5. YaRN: Efficient Context Window Extension of Large Language ModelsBowen Peng, Jeffrey Quesnelle, Honglu Fan, Enrico ShippoleICLR 2024 · 508 次引用

相关 Paper

  1. Improving Model Representation and Reducing KV Cache via Skip Connections with First Value HeadsZhoutong Wu, Yuan Zhang, Yiming Dong, Chenheng Zhang 等NeurIPS 2025 · 4 次引用
  2. A Simple and Effective L_2 Norm-Based Strategy for KV Cache CompressionAlessio Devoto, Yu Zhao, Simone Scardapane, Pasquale MinerviniEMNLP 2024 · 3 次引用
  3. LazyAttention: Efficient Retrieval-Augmented Generation with Deferred Positional EncodingHaocheng Xia, Mihir Pamnani, Hanxi Fang, Supawit Chockchowwat 等ICML 2026
  4. LoCoCo: Dropping In Convolutions for Long Context CompressionRuisi Cai, Yuandong Tian, Zhangyang Wang, Beidi ChenICML 2024 · 17 次引用
  5. RefreshKV: Updating Small KV Cache During Long-form GenerationFangyuan Xu, Tanya Goyal, Eunsol ChoiACL 2025 · 6 次引用
黄昏的海面,两侧是细线勾勒的悬崖