On‑policy layer selection speeds long‑context models
FlashMorph2 shatters the long‑standing bottleneck where hybrid attention models either stall on very long sequences or sacrifice quality for speed. By eliminating hidden‑state drift, it delivers uniform acceleration that scales from a few hundred million to several billion parameters. Hybrid attention has always required a careful choice of which layers keep full attention under a compute budget,…
FlashMorph2 breaks through the long-standing obstacle limiting hybrid attention models' ability to handle extremely long sequences while maintaining high quality. By eliminating hidden-state drift, it achieves consistent speed improvements across a wide range of model sizes, from a few hundred million to several billion parameters.
Hybrid attention traditionally necessitates a delicate balance of which layers maintain full attention within strict compute constraints. However, the original FlashMorph method faced two main issues when transitioning to a discrete architecture: continuous branch interpolation and the use of teacher-forced hidden states, which caused hidden-state divergence and hampered both speed and final accuracy.
FlashMorph2 resolves these issues by conducting layer selection in just 0.72-3.57 GPU hours for 0.6B-8B models, demonstrating that on-policy evaluation and joint weight adaptation can be efficiently scaled. The method evaluates sampled discrete hybrid architectures end-to-end using their own hidden states and then backpropagates through the selection scores, allowing the entire pipeline to complete within a few GPU hours even at the largest model sizes.
Accuracy also improves with FlashMorph2, increasing average scores by 2.42 points on RULER, 1.08 on LongBench, and 0.76 on recall-intensive tasks compared to FlashMorph. These gains are observed across all tested Qwen3 variants, suggesting that the joint optimization benefits a wide range of long-context evaluations and is not merely an overfit to a single benchmark.
While the research only focuses on Qwen3 variants and linear-attention backbones, the findings raise questions about the applicability of the on-policy scheme to sparse-attention or multimodal transformers. Additionally, the extra weight-adaptation phase adds training overhead that may be challenging for teams without access to dedicated compute resources, potentially impacting the trade-off when scaling beyond 8 billion parameters.
If these results hold across broader architectures, production pipelines currently utilizing off-policy layer-selection steps should transition to FlashMorph2's on-policy joint optimization for a ready-to-deploy hybrid model that processes thousands of tokens faster without sacrificing downstream performance.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to