Quamba2: A Robust and Scalable Post-training Quantization Framework for Selective State Space Models
Abstract
State Space Models (SSMs) are emerging as a compelling alternative to Transformers because of their consistent memory usage and high performance. Despite this, scaling up SSMs on cloud services or limited-resource devices is challenging due to their storage requirements and computational power. To overcome this, quantizing SSMs with low bit-width data formats can reduce model size and benefit from hardware acceleration. As SSMs are prone to quantization-induced errors, recent efforts have focused on optimizing a particular model or bit-width for efficiency without sacrificing performance. However, distinct bit-width configurations are essential for different scenarios, like W4A8 for boosting large-batch decoding speed, and W4A16 for enhancing generation speed in short prompt applications for a single user. To this end, we present Quamba2, compatible with W8A8, W4A8, and W4A16 for both Mamba1 and Mamba2 backbones, addressing the growing demand for SSM deployment on various platforms. Based on the channel order preserving and activation persistence of SSMs, we propose an offline approach to quantize inputs of a linear recurrence in 8-bit by sorting and clustering for input x, combined with a per-state-group quantization for input-dependent parameters B and C. To ensure compute-invariance in the SSM output, we rearrange weights offline according to the clustering sequence. The experiments show that Quamba2-8B outperforms several state-of-the-art SSM quantization methods and delivers 1.3times and 3times speed-ups in the pre-filling and generation stages, respectively, while offering 4times memory reduction with only a 1.6% average accuracy drop. The evaluation on MMLU shows the generalizability and robustness of our framework. The code and quantized models will be released at: https://github.com/enyac-group/Quamba.
Community
Quamba2 Highlights:
๐ง Supports W4A8 / W4A16 / W4AX / W8A8 for Mamba1 and Mamba2
๐ Achieves 4 ร memory reduction and 3 ร generation speedup
โก๏ธ Enables 8B model inference on Orin Nano 8G at 13 tokens/sec
๐ฅ Outperforms W4A8KV4 Llama3-8B in both speed and quality
๐ Preprint: https://arxiv.org/pdf/2503.22879
๐ Project Page: https://hychiang.info/projects/quamba2
๐ป Code: https://github.com/enyac-group/Quamba
๐ค Models: https://huggingface.co/ut-enyac
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- Q-MambaIR: Accurate Quantized Mamba for Efficient Image Restoration (2025)
- BCQ: Block Clustered Quantization for 4-bit (W4A4) LLM Inference (2025)
- GranQ: Granular Zero-Shot Quantization with Unified Layer-Channel Awareness (2025)
- XAMBA: Enabling Efficient State Space Models on Resource-Constrained Neural Processing Units (2025)
- SplitQuantV2: Enhancing Low-Bit Quantization of LLMs Without GPUs (2025)
- Benchmarking Post-Training Quantization in LLMs: Comprehensive Taxonomy, Unified Evaluation, and Comparative Analysis (2025)
- ViM-VQ: Efficient Post-Training Vector Quantization for Visual Mamba (2025)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment:
@librarian-bot
recommend
Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper