mlsanityData to 7 Oct 2026

Cross-layer Attention Sharing for Pre-trained Large Language Models

arXiv 2408.01890 ↗First posted 4 Aug 2024cs.CLcited by 5

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

  1. 2024Attention Score is not All You Need for Token Importance Indicator in KV Cache Reduction: Value Also Matters18 Jun
  2. 2024A Simple and Effective L2 Norm-Based Strategy for KV Cache Compression17 Jun
  3. 2024PyramidKV: Dynamic KV Cache Compression based on Pyramidal Information Funneling4 Jun
  4. 2024MiniCache: KV Cache Compression in Depth Dimension for Large Language Models23 May
  5. 2024Reducing Transformer Key-Value Cache Size with Cross-Layer Attention21 May
  6. 2024PyramidInfer: Pyramid KV Cache Compression for High-throughput LLM Inference21 May
  7. 2024Layer-Condensed KV Cache for Efficient Inference of Large Language Models17 May
  8. 2024Keyformer: KV Cache Reduction through Key Tokens Selection for Efficient Generative Inference14 Mar
  9. 2024CHAI: Clustered Head Attention for Efficient LLM Inference12 Mar
  10. 2024GEAR: An Efficient KV Cache Compression Recipe for Near-Lossless Generative Inference of LLM8 Mar
  11. 2023Model Tells You What to Discard: Adaptive KV Cache Compression for LLMs3 Oct
  12. 2023H2O: Heavy-Hitter Oracle for Efficient Generative Inference of Large Language Models24 Jun
1 more
  1. 2023Scissorhands: Exploiting the Persistence of Importance Hypothesis for LLM KV Cache Compression at Test Time26 May

Other references · 74

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2021LoRA: Low-Rank Adaptation of Large Language Modelscited by 14,084
  3. 2023LLaMA: Open and Efficient Foundation Language Modelscited by 13,958
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  5. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  6. 2021Training Verifiers to Solve Math Word Problemscited by 9,743
  7. 2020Measuring Massive Multitask Language Understandingcited by 7,768
  8. 2019HellaSwag: Can a Machine Really Finish Your Sentence?cited by 4,018
  9. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
  10. 2022OPT: Open Pre-trained Transformer Language Modelscited by 3,464
  11. 2017TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehensioncited by 2,895
  12. 2019PIQA: Reasoning about Physical Commonsense in Natural Languagecited by 2,818
38 more
  1. 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
  2. 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,551
  3. 2019BoolQ: Exploring the Surprising Difficulty of Natural Yes/No Questionscited by 2,140
  4. 2023Efficient Streaming Language Models with Attention Sinkscited by 2,115
  5. 2018Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answeringcited by 2,114
  6. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  7. 2022BLOOM: A 176B-Parameter Open-Access Multilingual Language Modelcited by 1,968
  8. 2020Reformer: The Efficient Transformercited by 1,658
  9. 2014FitNets: Hints for Thin Deep Netscited by 1,619
  10. 2020Rethinking Attention with Performerscited by 1,584
  11. 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
  12. 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,442
  13. 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,311
  14. 2019TinyBERT: Distilling BERT for Natural Language Understandingcited by 1,153
  15. 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,093
  16. 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
  17. 2016The LAMBADA dataset: Word prediction requiring a broad discourse contextcited by 960
  18. 2024Gemma: Open Models Based on Gemini Research and Technologycited by 889
  19. 2019Analyzing Multi-Head Self-Attention: Specialized Heads Do the Heavy Lifting, the Rest Can Be Prunedcited by 844
  20. 2019Are Sixteen Heads Really Better than One?cited by 803
  21. 2020Efficient Transformers: A Surveycited by 784
  22. 2018Image Transformercited by 770
  23. 2019Fast Transformer Decoding: One Write-Head is All You Needcited by 700
  24. 2018CoQA: A Conversational Question Answering Challengecited by 674
  25. 2021Perceiver IO: A General Architecture for Structured Inputs & Outputscited by 616
  26. 2017BranchyNet: Fast Inference via Early Exiting from Deep Neural Networkscited by 591
  27. 2020MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devicescited by 476
  28. 2020Efficient Content-Based Sparse Attention with Routing Transformerscited by 469
  29. 2019Reducing Transformer Depth on Demand with Structured Dropoutcited by 434
  30. 2023Sheared LLaMA: Accelerating Language Model Pre-training via Structured Pruningcited by 408
  31. 2020Movement Pruning: Adaptive Sparsity by Fine-Tuningcited by 398
  32. 2024ShortGPT: Layers in Large Language Models are More Redundant Than You Expectcited by 369
  33. 2019Q-BERT: Hessian Based Ultra Low Precision Quantization of BERTcited by 355
  34. 2018Generating Wikipedia by Summarizing Long Sequencescited by 333
  35. 2018Paraphrasing Complex Network: Network Compression via Factor Transfercited by 255
  36. 2021I-BERT: Integer-only BERT Quantizationcited by 250
  37. 2023Deja Vu: Contextual Sparsity for Efficient LLMs at Inference Timecited by 247
  38. 2024The Unreasonable Ineffectiveness of the Deeper Layerscited by 219

50 most cited of 74 All 74 (JSON)

Built on by

Cited by year

Citing papers per year: 2024: 1; 2025: 4.

5 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2024Beyond KV Caching: Shared Attention for Efficient LLMs
  2. 2026Depth-Attention: Cross-Layer Value Mixing for Language Models
  3. 2026Q Cache: Visual Attention is Valuable in Less than Half of Decode Layers for Multimodal Large Language Model
  4. 2026BOSCH: Black-Box Binary Optimization for Short-Context Attention-Head Selection in LLMs
  5. 2026Linear Predictability of Attention Heads in Large Language Models
  6. 2025GTA: Grouped-head latenT Attention
  7. 2026Hidden Decoding at Scale: Latent Computation Scaling for Large Language Models
  8. 2026You Only Index Once: Cross-Layer Sparse Attention with Shared Routing