AIFEATURE

Mamba and State Space Models: How Selective SSMs Replace Self-Attention With Linear-Time Scaling

E
EffectStory 編輯部Editorial Team
Published · Updated
Mamba, a selective structured state space model introduced by Gu and Dao, makes SSM parameters functions of the input instead of fixed values, letting the model selectively propagate or forget information token by token. The design delivers 5x higher inference throughput than Transformers, roughly doubles compute and memory when sequence length doubles (versus roughly quadrupling for self-attention), and keeps improving on real data up to million-length sequences.

Why Did Transformers Need a New Sequence Architecture?

Subquadratic-time architectures — including linear attention, gated convolution and recurrent models, and structured state space models (SSMs) — were developed specifically to address Transformers' computational inefficiency on long sequencesCITE:E3. Prior to Mamba, none of these subquadratic alternatives had matched attention's performance on important modalities such as languageCITE:E3. Mamba itself is documented as a selective structured state space model designed to work around Transformers' computational inefficiency when handling long sequencesCITE:E4.

How Does Mamba's Selective State Space Parameterization Work?

Mamba's authors, Gu and Dao, let the SSM's parameters become functions of the input itself, rather than fixed valuesCITE:E1. This addresses a known weakness of earlier SSMs on discrete modalities and allows the model to selectively propagate or forget information along the sequence-length dimension depending on the current tokenCITE:E1.

How Does Mamba Compare to Transformers on Throughput, Cost, and Sequence Length?

Mamba delivers 5x higher inference throughput than Transformers while scaling linearly rather than quadratically with sequence lengthCITE:E2.

MetricMambaSelf-attention (Transformer)
Inference throughput5x higher than Transformersbaseline
Compute/memory when sequence length doublesroughly doublesroughly quadruples
Performance trend as sequence length growsimproves on real data up to million-length sequencesnot addressed in evidence

Gu and Dao report that Mamba's performance on real data continues to improve up to sequences of million-token lengthCITE:E2. PyTorch's engineering blog quantifies the underlying cost curve: doubling the input sequence length roughly doubles Mamba's compute and memory needs, whereas self-attention would quadruple themCITE:E7.

What Does Linear Scaling Mean for Processing Million-Length Sequences?

Because its compute and memory needs scale linearly rather than quadratically, Mamba has fast inference and can scale to very long sequencesCITE:E5. PyTorch's engineering team identifies scalability to long sequences as one key advantage of Mamba-style modelsCITE:E6.

What this means: The evidence traces a single chain from problem to mechanism to payoff. Transformers' computational inefficiency on long sequences motivated the search for subquadratic architectures such as SSMsCITE:E3, and Mamba's input-dependent parameterization was the specific mechanism that made a selective SSM viableCITE:E1. That mechanism shows up directly in the cost numbers — a roughly 2x-versus-4x compute ratio when sequence length doublesCITE:E7 — which compounds into a reported 5x throughput advantage and performance that keeps improving out to million-length sequencesCITE:E2. The scalability claims from Hugging Face's documentationCITE:E5 and PyTorch's engineering blogCITE:E6 describe the same underlying property — linear rather than quadratic growth — from two different vantage points.

📊 Evidence

FAQ

Why Did Transformers Need a New Sequence Architecture?

Subquadratic-time architectures — including linear attention, gated convolution and recurrent models, and structured state space models (SSMs) — were developed …

How Does Mamba's Selective State Space Parameterization Work?

Mamba's authors, Gu and Dao, let the SSM's parameters become functions of the input itself, rather than fixed valuesCITE:E1.

How Does Mamba Compare to Transformers on Throughput, Cost, and Sequence Length?

Mamba delivers 5x higher inference throughput than Transformers while scaling linearly rather than quadratically with sequence lengthCITE:E2.

What Does Linear Scaling Mean for Processing Million-Length Sequences?

Because its compute and memory needs scale linearly rather than quadratically, Mamba has fast inference and can scale to very long sequencesCITE:E5.

📎 Sources

  1. arxiv.org
  2. huggingface.co
  3. pytorch.org
Author's TakeEffectStory 編輯部

The number worth isolating is the roughly 2x-versus-4x compute ratio when sequence length doubles — that arithmetic is the actual mechanical source of the reported 5x throughput gap, not a separate marketing claim layered on top of it. Because Mamba replaces full pairwise attention with input-dependent selective state updates, its real test isn't peak throughput on short benchmarks but whether that same linear cost curve keeps holding as sequence lengths keep climbing toward the million-token range Gu and Dao measured. The concrete thing to watch next is whether independent implementations reproduce that per-doubling compute ratio, since right now it rests on the original paper and one engineering blog rather than a broader base of reported measurements.

E
EffectStory 編輯部Editorial Team

Related

BRIEF

CNA Launches Taiwan's First News MCP Tool, AskCNA, Priced at NT$200 a Month

Central News Agency (中央社) launched CNA MCP on August 31, 2026, Taiwan's first news tool built on Anthropic's Model Context Protocol (released November 2024), letting AI agents such as Claude, ChatGPT, and Grok retrieve and cite its archives in real time. The tool integrates nearly 5 million newswire stories, 3.5 million photos, and open data from about 150 government agencies, priced at NT$200 a month with an early-bird bonus-quota plan, and received funding from Google Taiwan's nDX Digital Innovation Grant Program.

EffectStory 編輯部 ·
BRIEF

Sony Music and Warner Chappell Sue Anthropic Over Alleged 'Brazen Campaign' of Copyright Theft

Sony Music Publishing and Warner Chappell, joined by other music publishers, sued Anthropic and co-founders Dario Amodei and Benjamin Mann in the U.S. District Court for the Northern District of California, alleging illegal torrenting, scraping, and downloading of copyrighted lyrics and sheet music. The publishers seek up to $150,000 per work and $25,000 per instance of stripped copyright data, a total that could reach several billion dollars. The filing follows Anthropic's earlier $1.5 billion settlement in the Bartz case.

EffectStory 編輯部 ·
BRIEF

Why Anthropic Turned to Nscale and Lambda for $45B and $35B GPU Compute Deals

Anthropic has assembled compute capacity across at least four NVIDIA-linked providers: a $35 billion contract with Lambda tied to a Hut 8-built Texas data center, a $45 billion, six-year deal with Nscale for a West Virginia campus running NVIDIA Vera Rubin systems, a $10 billion contract with startup Volta in Norway, and a reported (unconfirmed) tenancy at Riot Platforms' Rockdale, Texas site. NVIDIA sits inside nearly every arrangement — as investor, lessor, or chip supplier.

EffectStory 編輯部 ·