Attention Editing: A Versatile Framework for Cross-Architecture Attention Conversion
Not on the map. Why?
Abstract (arXiv)
Key-Value (KV) cache memory and bandwidth increasingly dominate large language model inference cost in long-context and long-generation regimes. Architectures such as multi-head latent attention (MLA) and hybrid sliding-window attention (SWA) can alleviate this bound, but integrating them into existing models remains difficult. Prior methods impose fine-grained structural requirements on both source and target attention modules, which cannot meet the feasible requirement in practical deployment. We present Attention Editing, a practical framework for converting already-trained large language models (LLMs) with new attention architectures without re-pretraining from scratch. Attention editing replaces the original attention with a learnable target module and trains it using progressive distillation, consisting of (1) layer-wise teacher-forced optimization with intermediate activation supervision to prevent cold-start error accumulation, and (2) model-level distillation on next-token distributions, optionally regularized by weak feature matching. We instantiate the framework on two different target--MLA and GateSWA, a gated hybrid SWA design, and apply it to Qwen3-8B and Qwen3-30B-A3B. The resulting models maintain competitive performance while delivering substantial efficiency improvements, demonstrating that large-scale attention conversion is both feasible and robust. Notably, experiments are conducted on an Ascend 910B clusters, offering a practical training case study on domestic hardware.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 45 of its 50 references that are in the map. First posted on arXiv 7 Apr 2026.
Builds on
45 of 50 references.
References · 45
- 2017Attention Is All You Needcited by 60,361
- 2022Training language models to follow instructions with human feedbackcited by 15,971
- 2015Distilling the Knowledge in a Neural Networkcited by 10,324
- 2021Training Verifiers to Solve Math Word Problemscited by 10,109
- 2025Qwen3 Technical Reportcited by 8,820
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
- 2020Measuring Massive Multitask Language Understandingcited by 7,963
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,944
- 2018Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challengecited by 4,886
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,718
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,182
- 2020Longformer: The Long-Document Transformercited by 3,413
33 more
- 2022Locating and Editing Factual Associations in GPTcited by 2,691
- 2023Efficient Streaming Language Models with Attention Sinkscited by 2,186
- 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 2,022
- 2014FitNets: Hints for Thin Deep Netscited by 1,653
- 2020Rethinking Attention with Performerscited by 1,601
- 2025gpt-oss-120b & gpt-oss-20b Model Cardcited by 1,386
- 2023GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpointscited by 1,346
- 2020Transformer Feed-Forward Layers Are Key-Value Memoriescited by 1,336
- 2024The FineWeb Datasets: Decanting the Web for the Finest Text Data at Scalecited by 1,160
- 2023SGLang: Efficient Execution of Structured Language Model Programscited by 1,141
- 2024DeepSeek-V2: A Strong, Economical, and Efficient Mixture-of-Experts Language Modelcited by 1,135
- 2023On-Policy Distillation of Language Models: Learning from Self-Generated Mistakescited by 939
- 2023RWKV: Reinventing RNNs for the Transformer Eracited by 827
- 2019Fast Transformer Decoding: One Write-Head is All You Needcited by 717
- 2023C-Eval: A Multi-Level Multi-Discipline Chinese Evaluation Suite for Foundation Modelscited by 708
- 2021Knowledge Neurons in Pretrained Transformerscited by 601
- 2026GLM-5: from Vibe Coding to Agentic Engineeringcited by 587
- 2025Kimi K2: Open Agentic Intelligencecited by 567
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 532
- 2024StarCoder 2 and The Stack v2: The Next Generationcited by 502
- 2024DataComp-LM: In search of the next generation of training sets for language modelscited by 398
- 2025Gated Attention for Large Language Models: Non-linearity, Sparsity, and Attention-Sink-Freecited by 283
- 2024When Attention Sink Emerges in Language Models: An Empirical Viewcited by 208
- 2025Kimi Linear: An Expressive, Efficient Attention Architecturecited by 196
- 2026MiMo-V2-Flash Technical Reportcited by 191
- 2024Nemotron-CC: Transforming Common Crawl into a Refined Long-Horizon Pretraining Datasetcited by 160
- 2025Llama-Nemotron: Efficient Reasoning Modelscited by 158
- 2025MegaMath: Pushing the Limits of Open Math Corporacited by 51
- 2024What does the Knowledge Neuron Thesis Have to do with Knowledge?cited by 49
- 2026Step 3.5 Flash: Open Frontier-Level Intelligence with 11B Active Parameterscited by 36
- 2025Towards Economical Inference: Enabling DeepSeek's Multi-Head Latent Attention in Any Transformer-based LLMscited by 27
- 2025TransMLA: Multi-Head Latent Attention Is All You Needcited by 23
- 2024Puzzle: Distillation-Based NAS for Inference-Optimized LLMscited by 17
Built on by
Citing papers per year: 2026: 2.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2026Sliding-window beats linear attention
- 2024Cross-layer Attention Sharing for Pre-trained Large Language Models
- 2025Contextual Attention Modulation: Towards Efficient Multi-Task Adaptation in Large Language Models
- 2024Beyond KV Caching: Shared Attention for Efficient LLMs
- 2026BOSCH: Black-Box Binary Optimization for Short-Context Attention-Head Selection in LLMs
- 2025GTA: Grouped-head latenT Attention
- 2025Training-free Context-adaptive Attention for Efficient Long Context Modeling
- 2023TransNormerLLM: A Faster and Better Large Language Model with Improved TransNormer