Cross-layer Attention Sharing for Pre-trained Large Language Models
On the map: Efficient LLM inference and serving → KV cache optimization
Abstract (arXiv)
To enhance the efficiency of the attention mechanism within large language models (LLMs), previous works primarily compress the KV cache or group attention heads, while largely overlooking redundancy between layers. Our comprehensive analyses across various LLMs show that highly similar attention patterns persist within most layers. It's intuitive to reduce the redundancy by sharing attention weights across layers. However, further analysis reveals two challenges: (1) Directly sharing the weight matrix without carefully rearranging the attention heads proves to be ineffective; (2) Shallow layers are vulnerable to small deviations in attention weights. Driven by these insights, we introduce LISA, a lightweight substitute for self-attention in well-trained LLMs. LISA employs tiny feed-forward networks to align attention heads between adjacent layers and low-rank matrices to approximate differences in layer-wise attention weights. Evaluations encompassing 13 typical benchmarks demonstrate that LISA maintains high response quality in terms of accuracy and perplexity while reducing redundant attention calculations within 53%-84% of the total layers. Our implementations of LISA achieve a 6x compression of Q and K matrices within the attention mechanism, with maximum throughput improvements 19.5%, 32.3%, and 40.1% for LLaMA3-8B, LLaMA2-7B, and LLaMA2-13B, respectively.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Placed in KV cache optimization, one of 12 directions in Efficient LLM inference and serving. Builds on 87 of its 107 references that are in the map. First posted on arXiv 4 Aug 2024.
Builds on
87 of 107 references.
Closest ancestors · 13
Same direction, newest first
- 2024Attention Score is not All You Need for Token Importance Indicator in KV Cache Reduction: Value Also Matters18 Jun
- 2024A Simple and Effective L2 Norm-Based Strategy for KV Cache Compression17 Jun
- 2024PyramidKV: Dynamic KV Cache Compression based on Pyramidal Information Funneling4 Jun
- 2024MiniCache: KV Cache Compression in Depth Dimension for Large Language Models23 May
- 2024Reducing Transformer Key-Value Cache Size with Cross-Layer Attention21 May
- 2024PyramidInfer: Pyramid KV Cache Compression for High-throughput LLM Inference21 May
- 2024Layer-Condensed KV Cache for Efficient Inference of Large Language Models17 May
- 2024Keyformer: KV Cache Reduction through Key Tokens Selection for Efficient Generative Inference14 Mar
- 2024CHAI: Clustered Head Attention for Efficient LLM Inference12 Mar
- 2024GEAR: An Efficient KV Cache Compression Recipe for Near-Lossless Generative Inference of LLM8 Mar
- 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMs3 Oct
- 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models24 Jun
1 more
Other references · 74
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
- 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
- 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
- 2021Training Verifiers to Solve Math Word Problemscited by 9,743
- 2020Measuring Massive Multitask Language Understandingcited by 7,768
- 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,464
- 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
- 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
38 more
- 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
- 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
- 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
- 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,968
- 2020Reformer: The Efficient Transformercited by 1,658
- 2014FitNets: Hints for Thin Deep Netscited by 1,619
- 2020Rethinking Attention with Performerscited by 1,584
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
- 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,442
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,311
- 2019TinyBERT: Distilling BERT for Natural Language Understandingcited by 1,153
- 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,093
- 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
- 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 960
- 2024Gemma: Open Models Based on Gemini Research and Technologycited by 889
- 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
- 2019Are Sixteen Heads Really Better than One?cited by 803
- 2020Efficient Transformers: A Surveycited by 784
- 2018Image Transformercited by 770
- 2019Fast Transformer Decoding: One Write-Head is All You Needcited by 700
- 2018CoQA: A Conversational Question Answering Challengecited by 674
- 2021Perceiver IO: A General Architecture for Structured Inputs & Outputscited by 616
- 2017BranchyNet: Fast Inference via Early Exiting from Deep Neural Networkscited by 591
- 2020MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devicescited by 476
- 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 469
- 2019Reducing Transformer Depth on Demand with Structured Dropoutcited by 434
- 2023Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruningcited by 408
- 2020Movement Pruning: Adaptive Sparsity by Fine-Tuningcited by 398
- 2024ShortGPT: Layers in Large Language Models are More Redundant Than You Expectcited by 369
- 2019Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTcited by 355
- 2018Generating Wikipedia by Summarizing Long Sequencescited by 333
- 2018Paraphrasing Complex Network: Network Compression via Factor Transfercited by 255
- 2021I-BERT: Integer-only BERT Quantizationcited by 250
- 2023Deja Vu: Contextual Sparsity for Efficient LLMs at Inference Timecited by 247
- 2024The Unreasonable Ineffectiveness of the Deeper Layerscited by 219
50 most cited of 74 All 74 (JSON)
Built on by
Citing papers per year: 2024: 1; 2025: 4.
5 papers.
- 2024A Survey on Large Language Model Acceleration based on KV Cache Managementcited by 125
- 2025Inner Thinking Transformer: Leveraging Dynamic Depth Scaling to Foster Adaptive Internal Thinkingcited by 56
- 2025Cognitive Memory in Large Language Modelscited by 28
- 2025Round Attention: A Novel Round-Level Attention Mechanism to Accelerate LLM Inferencecited by 0
- 2025Motif 2.6B Technical Reportcited by 0
- 2025Motif 2.6B Technical Report2 Aug 2025
- 2025Cognitive Memory in Large Language Models3 Apr 2025
- 2025Round Attention: A Novel Round-Level Attention Mechanism to Accelerate LLM Inference21 Feb 2025
- 2025Inner Thinking Transformer: Leveraging Dynamic Depth Scaling to Foster Adaptive Internal Thinking19 Feb 2025
- 2024A Survey on Large Language Model Acceleration based on KV Cache Management27 Dec 2024
Similar, not cited
Close in wording, no citation either way
- 2024Beyond KV Caching: Shared Attention for Efficient LLMs
- 2026Depth-Attention: Cross-Layer Value Mixing for Language Models
- 2026Q Cache: Visual Attention is Valuable in Less than Half of Decode Layers for Multimodal Large Language Model
- 2026BOSCH: Black-Box Binary Optimization for Short-Context Attention-Head Selection in LLMs
- 2026Linear Predictability of Attention Heads in Large Language Models
- 2025GTA: Grouped-head latenT Attention
- 2026Hidden Decoding at Scale: Latent Computation Scaling for Large Language Models
- 2026You Only Index Once: Cross-Layer Sparse Attention with Shared Routing