What problem does it solve? Transformers scale quadratically with sequence length and require large KV caches, making long-context inference slow and memory-hungry. This Skill provides working code, configuration guidance, and benchmarks for Mamba state-space models that achieve O(n) complexity with no KV cache. ## Core Features & Use Cases - Mamba Block & LM Setup: Ready-to-use code for building Mamba-1 and Mamba-2 blocks and full language models via mamba-ssm and MambaLMHeadModel. - Pretrained Model Usage: Load state-spaces models (130M to 2.8B) from HuggingFace and run text generation with temperature, top-p, and repetition penalty controls. - Benchmarking & Training Guidance: Compare inference speed and memory against Transformers, plus distributed training, mixed precision, and gradient checkpointing recipes. - Use Case: You need to serve a language model over 100K-token genomic sequences on limited GPU memory. Use this Skill to configure a Mamba-2 model, load pretrained weights, and generate output with constant per-token memory. ## Quick Start Ask the AI to set up a Mamba-2 language model with mamba-ssm, load the state-spaces/mamba-2.8b pretrained weights, and generate text from a given prompt.