Explore the research collection
2 entries · Follow this search
- Paper
Native Hybrid Attention for Efficient Sequence Modeling
Native Hybrid Attention (NHA) unifies linear and full attention into a single softmax operation within one uniform layer design. Long-term history is compressed into fixed-size key-value memory slots updated by a linear RNN; short-term context comes from exact sliding-window tokens; one softmax over all keys and values learns per-token, per-head balancing dynamically with no extra fusion parameters. A single hyperparameter — the sliding window size — shifts each layer smoothly between pure linear attention (w=0), intra-layer hybrid, and full attention (w=N), with no structural changes; all layers share the same architecture. NHA beats Transformers and other hybrid baselines on recall-intensive and commonsense reasoning tasks, and pretrained LLMs (Llama-3, Qwen) can be structurally hybridized with NHA via lightweight finetuning (e.g., NHA-Qwen2.5-7B / NHA-Llama-3-8B trained on 10B tokens, NHA-Qwen3-30BA3B) to match accuracy with drastically lower GPU memory and inference latency.
- Thread
Speculative decoding with Gated DeltaNet: no un-reading needed
Standalone technical insight on whether speculative decoding is a problem for Gated DeltaNet. Argument: rejected drafts must be rolled back; attention just drops their KV rows, but GDN has already blended every draft into its recurrent state. However, the update can be rewritten so that only accepted drafts are committed: S_t = alpha_t S_{t-1} + v_tilde_t k_t^T, with v_tilde_t = beta_t (v_t - alpha_t S_{t-1} k_t), giving S_a = g_a S_0 + sum_{i<=a} (g_a/g_i) v_tilde_i k_i^T (g = product of alphas). Cache (v_tilde_i, k_i, g_i) per draft and fold in only what is accepted. Conclusion: GDN does not have to un-read a token; it can wait to commit it.