Mamba is a sequence model architecture built on selective state space models, offering linear-time computation with sequence length rather than the quadratic scaling a Transformer's self-attention mechanism requires. Its key innovation over earlier state space models is making the state-space parameters themselves input-dependent, selectively deciding what information to retain or discard at each step based on the actual input, rather than using the same fixed dynamics for every input the way earlier structured state space models like S4 did.