paper-with-me

홈 › Papers

MLKV: Multi-Layer Key-Value Heads for Memory Efficient Transformer Decoding

2024-06-13 · Zayd Muhammad Kawakibi Zuhri, Muhammad Farid Adilazuarda, Ayu Purwarianti, Alham Fikri Aji

Auto-regressive inference of transformers benefit greatly from Key-Value (KV) caching, but can lead to major memory bottlenecks as model size, batch size, and sequence length grow at scale. We introduce Multi-Layer Key-Value (MLKV) sharing, a novel approach extending KV sharing across transformer layers to reduce memory usage beyond what was possible with Multi-Query Attention (MQA) and Grouped-Query Attention (GQA). Evaluations on various NLP benchmarks and inference metrics using uptrained Pythia-160M variants demonstrate that MLKV significantly reduces memory usage with minimal performance loss, reducing KV cache size down to a factor of 6x compared to MQA. These results highlight MLKV's potential for efficient deployment of transformer models at scale. We provide code at https://github.com/zaydzuhri/pythia-mlkv

📄 PDF Abstract BibTeX arXiv:2406.09297

Code (1)

zaydzuhri/pythia-mlkv 공식 구현 pytorch

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Dense Connections Dense Connections, or Fully Connected Connections, are a type of layer in a deep neural network that use a linear operation where every input is connected to every output…
Feedforward Network A Feedforward Network, or a Multilayer Perceptron (MLP), is a neural network with solely densely connected layers. This is the classic neural network architecture of the…
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$…
Multi-Query Attention 설명 없음
Grouped-query attention 설명 없음

Similar Papers 제목 키워드 기반

MLKV: Efficiently Scaling up Large Embedding Model Training with Disk-based Key-Value Storage

2025-04-02 · Yongjun He, Roger Waleffe, Zhichao Han, Johnu George 외

Many modern machine learning (ML) methods rely on embedding models to learn vector representations (embeddings) for a set of entities (embedding tables). As increasingly diverse ML applications utilize embedding models a…

Reducing Transformer Key-Value Cache Size with Cross-Layer Attention

2024-05-21 · William Brandon, Mayank Mishra, Aniruddha Nrusimha, Rameswar Panda 외

Key-value (KV) caching plays an essential role in accelerating decoding for transformer-based autoregressive large language models (LLMs). However, the amount of memory required to store the KV cache can become prohibiti…

Improving Model Representation and Reducing KV Cache via Skip Connections with First Value Heads

2025-10-19 · Zhoutong Wu, Yuan Zhang, Yiming Dong, Chenheng Zhang 외 arxiv

Transformer models have driven breakthroughs across various language tasks by their strong capability to learn rich contextual representations. Scaling them to improve representation, however, often demands substantial m…

HybridKV: Hybrid KV Cache Compression for Efficient Multimodal Large Language Model Inference

2026-04-07 · Bowen Zeng, Feiyang Ren, Jun Zhang, Xiaoling Gu 외 arxiv

Multimodal Large Language Models (MLLMs) have advanced unified reasoning over text, images, and videos, but their inference is hindered by the rapid growth of key-value (KV) caches. Each visual input expands into thousan…

Head-Aware Key-Value Compression for Efficient Autoregressive Image Generation

2026-05-20 · Guotao Liang, Baoquan Zhang, Zhiyuan Wen, Yunming Ye arxiv

Autoregressive (AR) visual generation has achieved remarkable performance but suffers from high memory usage and low throughput, as it requires caching previously generated visual tokens. Recent research has shown that r…

Image Generation