Mamba — эффективные SSM-модели без трансформерного квадрата
★ 7.7 · ai-tooling
mamba is a Claude Code skill that implements the Mamba selective state-space model (SSM) architecture, achieving O(n) linear complexity compared to the O(n²) of Transformers. It covers both Mamba-1 (d_state=16) and Mamba-2 (d_state=128, multi-head with tensor parallelism support), and provides workflows for loading pretrained models ranging from 130M to 2.8B parameters via HuggingFace using `MambaLMHeadModel.from_pretrained`. Inference runs without a KV cache, cutting memory usage and delivering up to 5× faster generation — making it practical for streaming applications and sequences of 100K+ tokens. Benchmarking scripts for direct speed comparison against Transformers (e.g., Pythia-2.8B) are included. Prerequisites: Linux, NVIDIA GPU, PyTorch 1.12+, CUDA 11.6+; dependencies: mamba-ssm, causal-conv1d, torch, transformers.
- #state-space-models
- #mamba
- #linear-complexity
- #efficient-inference
- #long-context
- #alternative-architecture
- #hardware-optimization