$npx skillfedfor your agent

mamba-ssm

Mamba state-space model

With conditionsPyPI Artificial IntelligenceReleased May 202698.5K downloads / mopermissive licenseSource build

Decision gist · record as of 2026-08-14

sdist only — mamba_ssm-2.3.2.post1.tar.gz · builds from source
v2.3.2.post1 · released 2026-05-09 · Python >=3.9 · 10 runtime deps: torch, tilelang, apache-tvm-ffi, quack-kernels, triton, ninja, einops, transformers

Yes, if you have GPU infrastructure (NVIDIA, CUDA 11.6+, Linux) and are researching or deploying sequence models where Transformer alternatives are worth exploring. The active maintenance, zero known vulnerabilities, and permissive license support this. No, if you lack GPU access, need CPU-only inference, or require a simpler install path—the high dependency friction and platform specificity make it unsuitable for casual experimentation or resource-constrained environments.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Linux, NVIDIA GPU, PyTorch 1.12+, CUDA 11.6+, and --no-build-isolation flag to avoid CPU-only PyTorch being installed during build.
  • Installation requires high friction: ten runtime dependencies including torch, triton, and specialized kernels (quack-kernels, tilelang, apache-tvm-ffi), plus mandatory compilation flags and NVIDIA GPU with CUDA 11.6+.
  • The package is actively maintained (last commit 2026-07-22, 97 days since latest release) but the build process is complex and platform-specific.

License · maintenance · safety

permissive license (permissive) — Apache License 2.0 is permissive and allows commercial use, modification, and distribution with minimal restrictions. You must include license and copyright notices in derivative works, but no patent retaliation clause applies.

last release 2026-05-09 (97 days) · last repo commit 2026-07-22 · 18,738 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 98,525 downloads/mo, #13,076 on PyPI

Verify before relying

pip install torch
pip install mamba-ssm --no-build-isolation

import torch
from mamba_ssm import Mamba

x = torch.randn(2, 64, 16).to("cuda")
model = Mamba(d_model=16, d_state=16, d_conv=4, expand=2).to("cuda")
y = model(x)
  • Whether pretrained model downloads (mamba-130m through mamba-2.8b) are automatically cached or require manual setup.
  • Performance comparison to Transformers on specific tasks beyond the paper's evaluation set.
  • AMD GPU support status and any additional prerequisites beyond those listed.
  • Whether Mamba-3 requires source installation for all use cases or if PyPI packages support it.
Same gist for agents: .md · .json

What it is and what it does

Mamba-ssm provides PyTorch implementations of Mamba state-space model architectures designed to match or exceed Transformer performance on language modeling while maintaining linear or near-linear time complexity. The package exposes multiple abstraction levels: the core selective SSM layer, the Mamba block (wrapping selective SSM), and complete language model backbones with repeating Mamba blocks. It includes three architecture variants—Mamba, Mamba-2, and Mamba-3—each with different parameter efficiency and design principles, along with pretrained models trained on the Pile dataset at scales from 130M to 2.8B parameters.

The package is built for GPU-accelerated inference and training on NVIDIA hardware, with hardware-aware optimizations inspired by FlashAttention. It requires ten runtime dependencies spanning PyTorch, Triton, specialized kernel libraries (quack-kernels, tilelang, apache-tvm-ffi), and standard ML tools (transformers, einops, packaging). Installation demands careful attention to build isolation and CUDA version compatibility, making it primarily suitable for researchers and practitioners already working in GPU-accelerated deep learning environments.

Use it for

  • Replace Transformer blocks in language models when linear-time scaling is critical for long sequences.
  • Benchmark state-space models against Transformer baselines using pretrained Mamba models on standard NLP tasks.
  • Integrate Mamba blocks into custom sequence models where selective state-space mechanisms offer efficiency gains.
  • Fine-tune pretrained Mamba models (130M–2.8B parameters) on downstream language tasks via Hugging Face.
  • Experiment with Mamba-3's MIMO and structured state-space duality for research on sequence modeling architectures.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you have GPU infrastructure (NVIDIA, CUDA 11.6+, Linux) and are researching or deploying sequence models where Transformer alternatives are worth exploring.

The active maintenance, zero known vulnerabilities, and permissive license support this. No, if you lack GPU access, need CPU-only inference, or require a simpler install path—the high dependency friction and platform specificity make it unsuitable for casual experimentation or resource-constrained environments.

Install

mamba-ssm on PyPI

Before you install

Installation requires high friction: ten runtime dependencies including torch, triton, and specialized kernels (quack-kernels, tilelang, apache-tvm-ffi), plus mandatory compilation flags and NVIDIA GPU with CUDA 11.6+. The package is actively maintained (last commit 2026-07-22, 97 days since latest release) but the build process is complex and platform-specific.

Requires Linux, NVIDIA GPU, PyTorch 1.12+, CUDA 11.6+, and --no-build-isolation flag to avoid CPU-only PyTorch being installed during build.

License in practice

Apache License 2.0 is permissive and allows commercial use, modification, and distribution with minimal restrictions. You must include license and copyright notices in derivative works, but no patent retaliation clause applies.

Quickstart

pip install torch
pip install mamba-ssm --no-build-isolation

import torch
from mamba_ssm import Mamba

x = torch.randn(2, 64, 16).to("cuda")
model = Mamba(d_model=16, d_state=16, d_conv=4, expand=2).to("cuda")
y = model(x)

Verify before relying

  • Whether pretrained model downloads (mamba-130m through mamba-2.8b) are automatically cached or require manual setup.
  • Performance comparison to Transformers on specific tasks beyond the paper's evaluation set.
  • AMD GPU support status and any additional prerequisites beyond those listed.
  • Whether Mamba-3 requires source installation for all use cases or if PyPI packages support it.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.9
Install frictionHigh. Source build required
Runtime dependencies
10 packages
torchtilelangapache-tvm-ffiquack-kernelstritonninjaeinopstransformerspackagingsetuptools
MaintenanceActively maintained 97 days since the last release
Last repo commit
First released
Downloads98,525 / month, #13,076 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: OSI Approved :: Apache Software LicenseOperating System :: UnixProgramming Language :: Python :: 3

Evidence: mamba_ssm-2.3.2.post1.tar.gz

Tags

Capabilities
state space model pytorchmamba sequence modelinglinear time sequence modeltransformer alternative cudaselective state spacelanguage model backboneefficient sequence architecture
Topics
state-space-modelsgpu-requiredlanguage-models
PyPI keywords
cudapytorchstate-space model

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “state space model pytorch”

  • mamba-ssmMamba-ssm implements state-space model architectures (Mamba, Mamba-2,…
  • fla-coreProvides hardware-efficient implementations of linear attention,…
  • open-clip-torchOpenCLIP provides open-source implementations of CLIP (Contrastive…

Give your agent the search over MCP, or paste the wish link into any chat.

More Artificial Intelligence packages

litellm With conditions
PyPI · Artificial Intelligence · released Aug 2026

LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.

Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.

MITcompiled wheel
682.8Mdownloads / mo
huggingface-hub Worth it
PyPI · Artificial Intelligence · released Aug 2026

Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.

Install it if you work with Hugging Face Hub models or datasets.

Apache-2.0pure Python · 3.10.0+
442.4Mdownloads / mo
langchain Worth it
PyPI · Python Modules · released Aug 2026

LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.

MITpure Python
315.4Mdownloads / mo
hf-xet With conditions
PyPI · Artificial Intelligence · released Aug 2026

hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.

Apache-2.0compiled wheel · 3.8+
258.4Mdownloads / mo
tokenizers Worth it
PyPI · Artificial Intelligence · released Apr 2026

Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.

Apache-2.0compiled wheel · 3.10+
222.9Mdownloads / mo
transformers Worth it
PyPI · Artificial Intelligence · released Aug 2026

Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.

Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.

permissive licensepure Python · 3.10.0+
186.6Mdownloads / mo

See also CoLT5-attention · axial-positional-embedding · nfoursid · local-attention · flash-attn · spacy-transformers · vit-pytorch · fla-core · lm-eval