model-architecture-mamba
State-space model with O(n) complexity vs Transformers' O(n²). 5× faster inference, million-token sequences, no KV cache. Selective SSM with hardware-aware design. Mamba-1 (d_state=16) and Mamba-2 (d_state=128, multi-head). Models 130M-2.8B on HuggingFace.
Original · translation is not supported for this source languageTarget: Learning & research. Automatically collected · unverified.
Excerpt from the author’s documentation
Extracted from a fixed version of SKILL.md in its original language. This is the author’s documentation; installation, compatibility and runtime results have not been verified by this site.
Read the original text
Topics in the source
- Mamba - Selective State Space Models
- Quick start
- Common workflows
- Workflow 1: Language model with Mamba-2
- Workflow 2: Use pretrained Mamba models
- Workflow 3: Mamba-1 vs Mamba-2
- Workflow 4: Benchmark vs Transformers
- When to use vs alternatives
Mamba is a state-space model architecture achieving O(n) linear complexity for sequence modeling. Installation: Prerequisites: Linux, NVIDIA GPU, PyTorch 1.12+, CUDA 11.6+ Basic usage (Mamba block): Complete LM with generation: Load from HuggingFace: Available models: state-spaces/mamba-130m state-spaces/mamba-370m state-spaces/mamba-790m state-spaces/mamba-1.4b state-spaces/mamba-2.8b Mamba-1 (smaller state): Mamba-2 (multi-head, larger state): Key differences: State size: Mamba-1 (dstate=16) vs Mamba-2 (dstate=128) Architecture: Mamba-2 has multi-head structure Normalization: Mamba-2 uses RMSNorm Distributed: Mamba-2 supports tensor parallelism Generation speed comparison: Expected results: Mamba: 5× faster inference Memory: No KV cache needed Scaling: Linear with sequence length Use Mamba when: Need long sequences (100K+ tokens) Want faster inference than Transformers Memory-constrained (no KV cache) Building streaming applications Linear scaling important Advantages: O(n) complexity: Linear vs quadratic 5× faster inference: No attention overhead No KV cache: Lower memory usage Million-token sequences: Hardware-efficient Streaming: Constant memory per token Use alternatives inst
This is an excerpt. Refer to the complete source and its current requirements.
- Source repository
- davila7/claude-code-templates
- Source file
- cli-tool/components/skills/ai-research/model-architecture-mamba/SKILL.md
- Fixed revision
- 21be197f100a12b8d0dd9a211cc244c8179f84d3
Sources and evidence
This record was collected automatically. Its documentation, suitability and runtime behavior have not been manually verified.
Author: davila7/claude-code-templates · original repository metadata. Documentation review: Not reviewed. Last source check: 2026-11-09T14:01:43.232Z.
Categories are inferred from names, descriptions and paths. They do not establish compatibility.
License and attribution
MIT. Third-party content and copyright remain with their authors. Refer to the original license and terms.
Original license ↗Synchronization, copying and user-reported success do not mark a resource as runtime-tested.
Limitations and notes
- Collecting metadata does not mean this site has installed, adapted, runtime-tested or security-reviewed the resource.