Explore the research collection
7 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.
- Paper
Eagle and Finch: RWKV with Matrix-Valued States and Dynamic Recurrence
Eagle adds matrix-valued WKV states, head LayerNorm, SiLU gating, and drops sigmoid receptance vs RWKV-4. Finch adds data-dependent token-shift and decay via LoRA-style offsets. New RWKV World Tokenizer (65,536, trie greedy) and World v2 mix (~1.12T tokens, ~70/15/15 EN/multilingual/code). Eagle 0.46–7.5B and Finch 1.6/3.1B Apache-2.0 on HF. Eagle-7B multilingual avg 58.2 vs Mistral-7B 55.5 / Llama-2-7B 54.3; English avg 71.5 vs Mistral 75.8. Finch ~4.2× faster than FlashAttention-v2 at seq 16k. Code https://github.com/RWKV/RWKV-LM; models https://huggingface.co/RWKV.
- Model
LT2: Linear-Time Looped Transformers
LT2 loops subquadratic mixers: DPLR linear attention gets a rank-T state update; sparse windows get Tw receptive field. On FineWeb-Edu 100B tokens, 1.3B T=4: Looped Hybrid (Full+GDN) 62.89 avg zero-shot vs looped Transformer 59.27, with ~2.7–5x decode speedup; GDN+DSA matches quality with no full attention (~2.9x at 32k). Distills Ouro-1.4B into Ouro-hybrid-1.4B with ~1B tokens; competitive with 1B–4B industry models. Code https://github.com/chili-lab/LT2; checkpoint https://huggingface.co/chili-lab/Ouro-hybrid-1.4B.
- 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.
- Paper
Gated DeltaNet-2: Decoupling Erase and Write in Linear Attention
NVIDIA linear-attention layer that generalizes Gated DeltaNet and Kimi Delta Attention by replacing the tied scalar delta gate with a key-side erase gate b_t and a value-side write gate w_t, keeping channel-wise decay. Recovers KDA when both gates collapse to the same scalar and Gated DeltaNet when decay is scalar too. Derives a fast-weight view, chunkwise WY algorithm, and gate-aware backward. At 1.3B on 100B FineWeb-Edu tokens, strongest overall vs Mamba-2/GDN/KDA/Mamba-3 on LM, commonsense, and retrieval; largest gains on RULER multi-key NIAH. Recurrent real-world retrieval avg 29.88 vs KDA 28.67; hybrid 42.28 vs 40.14. Code NVlabs/GatedDeltaNet-2.
- Paper
Dynamic Linear Attention
DLA builds multi-state linear-attention memory with (i) Information-Aware Dynamic State Merging: a State Information Score opens a new state when token-level Frobenius drift exceeds tau, else merges; (ii) Capacity-Bounded Memory: a K-slot chronological cache that merges the lowest-density adjacent pair when full. Pretrains Mamba-2-780M and Gated DeltaNet-1.3B on 50B Long-Data-Collections tokens (seq 16k, K=30). Beats Log-Linear Attention on 8 commonsense, 6 in-context retrieval, RULER, and LongBench; Mamba-2+DLA matches or beats a 778M Transformer. Higher prefill throughput and lower memory than log-linear. No official code on the abs page.
- Paper
Memory Caching: RNNs with Growing Memory
Memory Caching (MC) segments the sequence, caches each segment's memory state, and aggregates online plus cached memories at retrieval. Four variants: Residual Memory, Gated Residual Memory (GRM), Memory Soup, and Sparse Selective Caching (SSC). Complexity O(NL) interpolates RNN O(L) and Transformer O(L^2). Applied to Linear Attention, SWLA, DLA, and Titans. On 760M/30B-token and 1.3B/100B-token FineWeb training, MC lifts language-modeling and commonsense averages; Titans+GRM is strongest. Closes part of the recall gap vs Transformers on NIAH, in-context retrieval, LongBench, and MQAR. No official code on the abs page.