On-Policy Morphing into Hybrid Attention Models
Disen Lan, Xuanda Wang, Jianbin Zheng, Huafeng Kuang, Wei Tang, Yu Cheng
Abstract
Hybrid attention models combine full and linear attention to achieve a better quality--efficiency trade-off. Converting pretrained Transformers into such models requires identifying which layers should retain full attention under a prescribed budget. We identify two off-policy mismatches in FlashMorph's layer selection: (i) continuous branch interpolation and teacher-forced hidden states differ from discrete hybrid computation; and (ii) frozen model weights fail to account for parameter adaptation during subsequent recovery. We introduce FlashMorph2, an on-policy layer-selection method that (I) evaluates sampled discrete hybrid architectures end to end using their own hidden states, and (II) jointly optimizes layer-selection scores and model weights under the recovery objective to reflect post-adaptation performance. Experiments across Qwen3 model scales and linear-attention variants show that FlashMorph2 consistently outperforms existing layer-selection methods, improving average scores over FlashMorph by +2.42 points on RULER, +1.08 on LongBench, and +0.76 on recall-intensive tasks, while completing layer selection in only 0.72--3.57 GPU hours across 0.6B--8B models, demonstrating high efficiency and scalability.
Create a lesson
Related papers
LongCat Recall Sparse Attention: Co-Designing Key Organization and Retrieval for Long-Context Inference
Shared title terminology · Hao Zhang, Bin Xiao, Kefeng Zhang
Correct Precedents Induce Policy Violations in On-Device LLM Agents
Shared title terminology · Chong Tian, Yu Wang, Steve Liu et al.
PAIR-MED: Policy-reward Alternation for Iterative Refinement in Multilingual Medical Reasoning
Shared title terminology · Fan Gao, Xiaohang Xu, Lang Huang et al.
A Hybrid RAG Framework for Deceptive Review Detection: Integrating RoBERTa-LoRA, FAISS-Based Retrieval, and LLM Reasoning
Shared title terminology · Andrei Kostin, José Ángel Diaz-Garcia, Karel Gutiérrez-Batista
Zero-Dimensional Attention Topology for Linguistic Acceptability
Shared title terminology · Saeed AlMarri
RISA: Recoverable Sparse Attention for Block-Diffusion Language Models
Shared title terminology · Xinrui Zhong, Fanjiang Ye, Yuke Wang