Skip to content

State-space sequence model with linear-time scaling, covering Mamba-1 and Mamba-2 for long-context inference.

CCM score
55 of 100
skills.sh installs
1.1K
GitHub stars
14.9K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers building Mamba blocks, full language models with generation, and loading pretrained checkpoints from 130M to 2.8B parameters
  • Includes side-by-side configurations for Mamba-1 (d_state=16) and Mamba-2 (d_state=128, multi-head with headdim and ngroups)
  • Documents the install path (mamba-ssm, causal-conv1d), CUDA 11.6+ and NVIDIA GPU requirements, and VRAM needs per model size
  • Designed for memory-constrained or long-sequence workloads where the quadratic cost and KV cache of Transformers are a bottleneck

Install

$ npx -y skills add orchestra-research/ai-research-skills --skill mamba-architecture -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Mamba - Selective State Space Models

Quick start

Mamba is a state-space model architecture achieving O(n) linear complexity for sequence modeling.

Installation:

# Install causal-conv1d (optional, for efficiency)
pip install causal-conv1d>=1.4.0

# Install Mamba
pip install mamba-ssm
# Or both together
pip install mamba-ssm[causal-conv1d]

Prerequisites: Linux, NVIDIA GPU, PyTorch 1.12+, CUDA 11.6+

Basic usage (Mamba block):

import torch
from mamba_ssm import Mamba

batch, length, dim = 2, 64, 16
x = torch.randn(batch, length, dim).to("cuda")

model = Mamba(
    d_model=dim,      # Model dimension
    d_state=16,       # SSM state dimension
    d_conv=4,         # Conv1d kernel size
    expand=2          # Expansion factor
).to("cuda")

y = model(x)  # O(n) complexity!
assert y.shape == x.shape

Common workflows

Workflow 1: Language model with Mamba-2

Complete LM with generation:

from mamba_ssm.models.mixer_seq_simple import MambaLMHeadModel
from mamba_ssm.models.config_mamba import MambaConfig
import torch

Details

Repository
github.com/orchestra-research/ai-research-skills
Categories
AI Agents & LLM Apps, Data Science & Analytics
First seen
Jun 3, 2026

Questions

What does the mamba-architecture skill do?

The mamba-architecture skill guides an agent through the Mamba state-space model, which runs in O(n) linear complexity instead of the O(n²) of Transformers. It covers Mamba-1 with d_state=16 and Mamba-2 with d_state=128 and multi-head structure, plus pretrained models from 130M to 2.8B parameters on HuggingFace.

How do I install the mamba-architecture skill?

Run npx -y skills add orchestra-research/ai-research-skills --skill mamba-architecture -y in your project. Once installed, the mamba-architecture skill lets the agent write Mamba blocks, load pretrained Mamba models, and benchmark them against Transformers.

What does the mamba-architecture skill need to run?

The mamba-architecture skill needs Linux, an NVIDIA GPU, PyTorch 1.12+ and CUDA 11.6+, plus the mamba-ssm, causal-conv1d, torch and transformers packages. VRAM needs range from 2GB for the 130M model to 28GB for the 2.8B model in FP16.

Who should use the mamba-architecture skill?

The mamba-architecture skill suits developers building long-sequence or streaming applications, especially where memory is tight and no KV cache is wanted. It is also useful for anyone comparing linear-time sequence models against Transformers for inference speed.

Where does the mamba-architecture skill sit in its category?

The mamba-architecture skill is listed in the AI Agents & LLM Apps category on Claude Marketplaces, alongside microsoft-foundry, azure-ai and several google-agents-cli skills. Its focus on a state-space architecture for long contexts sets it apart from those agent-building tools.

More from orchestra-research/ai-research-skills

All 92

Similar to Mamba Architecture

More AI Agents & LLM Apps