On-Policy Morphing into Hybrid Attention Models

Disen Lan, Xuanda Wang, Jianbin Zheng, Huafeng Kuang, Wei Tang +1 more
11/18/2026
cs.CL

No confident code implementation found for this paper.

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{lan2026onpolicy,
  title  = {On-Policy Morphing into Hybrid Attention Models},
  author = {Disen Lan and Xuanda Wang and Jianbin Zheng and Huafeng Kuang and Wei Tang and Yu Cheng},
  year   = {2026},
  eprint = {2611.24809},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.24809v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2611.24809.svg)](https://codeofpaper.com/paper/2611.24809)

Discussion