Converting Transformer into hybrid attention models has become one of the mainstream paths for LLM inference optimization — keep a few full-attention layers, replace the rest with linear attention, and you can save a lot of memory and compute in long-context scenarios. But "which layers should retain full attention" has long relied on manual tuning or fixed patterns: place one full layer every few layers, or sort by layerwise score and pick the top N, both rough and easy to step on mines. ByteDance Seed team's new FlashMorph (arXiv:2606.30562, GitHub open-sourced) formally models this problem as a budget-constrained subset optimization problem. The specific approach is in three steps: first give each full-attention layer a parallel linear-attention branch, constructing a "morphable model"; then freeze the main model weights and jointly optimize layerwise gates on synthesized long-context retrieval data, with a linearization regularization encouraging the model to take the linear path as much as possible; finally, under a preset full-attention budget, discretize the gates, then go through standard logits distillation + long-context fine-tuning. On the effect side, FlashMorph uses only 20M layer-selection tokens to achieve strong performance on Needle-in-a-Haystack, with layer-selection overhead significantly lower than existing methods; inference-side prefill and decode efficiency also clearly beats the full-attention baseline, with less memory. GitHub has 9 stars, Hugging Face Daily has 37 votes, indicating the community is endorsing this "turning mysticism into optimization" path. Worthy of discussion: behind this is hybrid attention moving from "framework feature" to "tool chain" — once layer selection is automated, the inference-architecture customization of various models has a reproducible batch path, which is a boon for the open-source ecosystem and long-context Agent applications.