paper-with-me

Papers

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

2024-05-08 · 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.

📄 PDF Abstract BibTeX arXiv:2405.05254

Code (1)

microsoft/unilm/blob/master/YOCO/README.md 공식 구현 pytorch

Tasks

DecoderGPURetrieval

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Dropout Dropout is a regularization technique for neural networks that drops a unit (along with connections) at training time with a specified probability $p$ (a common value is…
Label Smoothing Label Smoothing is a regularization technique that introduces noise for the labels. This accounts for the fact that datasets may have mistakes in them, so maximizing the…
Residual Connection 설명 없음
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Position-Wise Feed-Forward Layer 설명 없음
Absolute Position Encodings Absolute Position Encodings are a type of position embeddings for [Transformer-based models] where positional encodings are…
Linear Layer A Linear Layer is a projection $\mathbf{XW + b}$.

Similar Papers 제목 키워드 기반

ICaRus: Identical Cache Reuse for Efficient Multi Model Inference

2026-02-27 · Sunghyeon Woo, Jaeeun Kil, Hoseung Kim, Minsub Kim 외 arxiv

Multi model inference has recently emerged as a prominent paradigm, particularly in the development of agentic AI systems. However, in such scenarios, each model must maintain its own Key-Value (KV) cache for the identic…

Block-Based Double Decoders

2026-05-11 · Asher Labovich, Benjamin Bradley, Vanessa Alexander, Chaitanya Harsha arxiv

Encoder-decoder models offer substantial inference-time savings over decoder-only models, but their pretraining objectives suffer from sparse supervision and dynamic sequence lengths, keeping them out of practice at scal…

Efficient Encoder-Decoder Transformer Decoding for Decomposable Tasks

2024-03-19 · Bo-Ru Lu, Nikita Haduong, Chien-Yu Lin, Hao Cheng 외

Transformer-based NLP models are powerful but have high computational costs that limit deployment. Finetuned encoder-decoder models are popular in specialized domains and can outperform larger more generalized decoder-on…

DecoderDialogue State TrackingQuestion Answering

Subjective Depth and Timescale Transformers: Learning Where and When to Compute

2025-11-26 · Frederico Wieser, Martin Benfeghoul, Haitham Bou Ammar, Jun Wang 외 arxiv

The rigid, uniform allocation of computation in standard Transformer (TF) architectures can limit their efficiency and scalability, particularly for large-scale models and long sequences. Addressing this, we introduce Su…

Beyond Decoder-only: Large Language Models Can be Good Encoders for Machine Translation

2025-03-09 · Yingfeng Luo, Tong Zheng, Yongyu Mu, Bei Li 외

The field of neural machine translation (NMT) has changed with the advent of large language models (LLMs). Much of the recent emphasis in natural language processing (NLP) has been on modeling machine translation and man…

DecoderMachine TranslationNMTTranslation