Back to LLMs Mind Map
中文·English
LLMsID: ssm-hybrid

SSM & Hybrid Architectures

SSM/线性注意力混合
🎯Core Definition
SSM (State Space Model) models sequences with a linear recurrence: ht=Aht1+Bxth_t = A h_{t-1} + B x_t, yt=Chty_t = C h_t, with fixed state size independent of sequence length; Mamba adds input-dependent selective scanning (using Δt\Delta_t to gate what enters and leaves the state), reaching O(n)O(n); linear attention (RWKV) replaces QKTQ K^T with a kernelized form, equivalently collapsing into constant-size state recurrence; hybrid architectures (e.g. Jamba) stack full attention layers and SSM layers alternately.
💡Use Cases
million-token long context and high-throughput inference; Jamba-1.5 398B (MoE, 52B active) serves 256K context — by 2026 hybrids are the mainstream route for long context, and comparing SSM vs attention complexity and memory is a frequent interview topic.
Key Problems Solved
attention's O(n2)O(n^2) time/memory grows quadratically with sequence length; SSM keeps per-token memory constant (state d×md \times m) and trains via parallel scan; but a fixed-size state cannot precisely recall history, so pure SSMs underperform on memory/retrieval tasks — hybrids add a few attention layers to restore exact retrieval and approach full-attention quality at lower cost.
🎯5 High-Frequency Exam Points
1
SSM recurrence? How is the state updated, and what does fixed state size imply?
2
What is Mamba's selective mechanism, and why must B, C, Δt\Delta_t depend on the input?
3
Why do hybrids like Jamba keep attention layers? What role does each component play?
4
How does RWKV/linear attention's recurrence correspond to standard attention?
5
Why are SSMs fast to train and cheap at inference (parallel scan + constant state)?
Updated 2026-08-12
🎯
Test Your Knowledge: Practice Questions for "SSM & Hybrid Architectures"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice
Previous CardMulti-head Latent AttentionNext CardPositional Encoding RoPE/ALiBi

🔗 More LLMs Knowledge Cards

Agent & Tool CallingAlignment Tax & Preference DataScaled Dot-Product AttentionAttention Variants MHA/MQA/GQA