Hybrid Attention and State Space Models › Summary
Michael BrenndoerferNovember 17, 20261 min read
Language AI HandbookAll chapters - A full-context attention layer retains keys and values indexed by position. A Mamba-1-style layer carries a fixed-shape recurrent state and convolution buffer. The hybrid keeps direct attention to retained positions at selected depths.
- In the scalar example, different histories gave the same final recurrent state and current input. A causal attention layer produced different outputs because its earlier keys and values differed.
- The 4+28 hybrid's key-value cache equals its recurrent and convolution state at 560 tokens and first exceeds it at 561. The equal-depth stack comparison crosses at 80 tokens.
- Prefill arithmetic and decode-state capacity need separate estimates. Actual runtime performance also depends on the hardware, kernel implementations, and workload.
- Jamba's 1:7 attention-to-Mamba ratio came from experiments. Read every ratio with its denominator, and identify the training or serving conditions before drawing a comparison.
Comments
Add to the conversation
A question, a correction, or an example from your own work.
No comments yet. Be the first to share your thoughts!