Zubnet AIसीखेंWiki › Mamba
Models

Mamba

Mamba Architecture
Transformer के alternative के रूप में designed एक selective state space model (SSM) architecture। Albert Gu और Tri Dao द्वारा created, Mamba sequence length में linear scaling के साथ competitive language modeling performance achieve करता है (Transformer की quadratic attention cost के विपरीत)। ये sequences को एक compressed hidden state maintain करके process करता है जो selectively update होता है — important information preserve होती है, irrelevant information decay होती है।

यह क्यों matter करता है

Mamba Transformer dominance के लिए सबसे credible challenge represent करता है। अगर ये (या इसके descendants) linear-time sequence processing with Transformer-quality results के promise पर deliver करें, implications enormous हैं: बहुत longer context windows, faster inference, lower costs। “Selective” वाला part key है — earlier SSMs के विपरीत, Mamba अपनी state transitions को input-dependent बनाता है, जो उसे attention match करने वाली expressiveness देता है।

Deep Dive

Classical state space models maintain a fixed-size hidden state that gets updated at each timestep via learned matrices A (state transition), B (input projection), and C (output projection). Mamba's innovation is making B and C input-dependent — the model learns to selectively focus on or ignore different parts of the input based on content, not just position. This selectivity is what earlier SSMs lacked and what prevented them from matching Transformer performance on language tasks.

The Hardware Story

Mamba's other contribution is a hardware-aware implementation. The selective scan operation is rewritten to minimize memory transfers between GPU HBM and SRAM, using kernel fusion and recomputation to avoid materializing the full state expansion in memory. This engineering makes the theoretical linear complexity translate to actual wall-clock speedups, not just asymptotic improvements that get eaten by constant factors.

Mamba-2 and Hybrids

Mamba-2 simplified the architecture by showing that the selective state space model can be viewed as a structured form of attention, unifying the SSM and Transformer perspectives mathematically. This led to hybrid architectures (like Jamba from AI21, Zamba from Zyphra) that interleave Mamba layers with attention layers, getting the efficiency of SSMs for most of the sequence processing while using attention for the tasks where global token interaction is essential. The debate isn't "SSM vs. Transformer" anymore — it's about finding the optimal mix.

संबंधित अवधारणाएँ

← सभी Terms
← Machine सीखेंing Masked Language Modeling →