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.
原文 · 译文未通过检查适用对象:学习与科研。自动收录 · 待核查。
原作者说明节选
从固定版本的 SKILL.md 提取,保留原文语言。以下内容属于作者说明,本站尚未验证安装、兼容或运行结果。
查看原文
原文涵盖的主题
- 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
这里只展示节选,请以完整原文和当前要求为准。
- 来源仓库
- davila7/claude-code-templates
- 源文件
- cli-tool/components/skills/ai-research/model-architecture-mamba/SKILL.md
- 固定版本
- 21be197f100a12b8d0dd9a211cc244c8179f84d3
来源与内容状态
本条为自动发现的元数据,尚未完成人工文档核查;适用性与运行结果待核查。
原作者:davila7/claude-code-templates · 原作者仓库元数据。文档核查:未核查。最近来源检查:2026-11-09T14:01:43.232Z。
分类由名称、说明与路径规则生成,分类不代表已核实适配。
许可与权利归属
MIT。第三方内容及版权归原作者,使用条件以原文为准。
许可原文 ↗本站没有因同步、复制或用户自报成功而将资源标为运行验证通过。
限制与注意事项
- 元数据收录不代表本站已经安装、适配、实测或进行安全审查。