---
title: "Bamba: Inference-Efficient Hybrid Mamba2 Model"
description: "Bamba-9B is a hybrid Mamba2 language model from IBM, Princeton, CMU and UIUC, trained on 2.2T tokens of fully open data."
url: "https://swe.quest/articles/bamba-inference-efficient-hybrid-mamba2-model-f1478e8a124ba6bc"
canonical: "https://huggingface.co/blog/bamba"
source: "Hugging Face"
published: "2024-12-18"
difficulty: "hard"
kind: "Research"
reading_minutes: 21
tags: ["llms","inference","model-training","evals"]
---

# Bamba: Inference-Efficient Hybrid Mamba2 Model

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2024-12-18, 21 min read, Research. Original: [https://huggingface.co/blog/bamba](https://huggingface.co/blog/bamba)

## Summary

Bamba-9B is a hybrid Mamba2 language model from IBM, Princeton, CMU and UIUC, trained on 2.2T tokens of fully open data. It interleaves full attention layers with Mamba2 layers to keep KV-cache growth small. In vLLM on an H100, it reaches about 2.5x the throughput and 2x lower latency of Llama 3.1 8B at larger batch sizes and sequence lengths. On benchmarks it trails SOTA transformers mainly on math and MMLU, which the team attributes to fewer training tokens and no benchmark-aligned annealing data, and it beats Olmo 7B trained on the same token budget. Checkpoints, training recipes, a stateful data loader and support in transformers, TRL, vLLM and llama.cpp are released.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [Inference & serving](https://swe.quest/tags/inference.md) (AI & ML)
- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [Evaluation](https://swe.quest/tags/evals.md) (AI & ML)

## Prerequisites

- transformer architecture ([easy posts on System design](https://swe.quest/tags/system-design.md?difficulty=easy))
- KV cache ([easy posts on Caching](https://swe.quest/tags/caching.md?difficulty=easy))
- state space models
- LLM benchmarks ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))

## Keywords

Bamba-9B, Mamba2, vLLM, Hugging Face transformers, llama.cpp, KV cache, Llama 3.1 8B

## Related posts

- [Welcome Falcon Mamba: The first strong attention-free 7B model](https://swe.quest/articles/welcome-falcon-mamba-the-first-strong-attention-free-7b-model-207d13ee4cb1b108.md): Hugging Face · 2024-08-12 · Medium · 8 min read · LLMs, Inference & serving, Evaluation, Model training
  Falcon Mamba 7B from TII is a pure Mamba state space language model with extra RMS normalization layers for stable training at scale.
- [Mamba-3](https://swe.quest/articles/mamba-3-6a6e43d2a6b849a6.md): Together AI · 2026-03-17 · Hard · 12 min read · LLMs, Inference & serving, Machine learning, Performance engineering, Hardware
  Mamba-3 is a state space model redesigned around inference efficiency rather than training speed.
- [Apriel-H1: The Surprising Key to Distilling Efficient Reasoning Models](https://swe.quest/articles/apriel-h1-the-surprising-key-to-distilling-efficient-reasoning-models-6fe42e5e9de282bc.md): Hugging Face · 2025-11-19 · Hard · 8 min read · Model training, LLMs, Inference & serving, Machine learning
  ServiceNow converted its 15B Apriel reasoning model into a Mamba/attention hybrid via distillation, reaching 2.1x throughput with small benchmark shifts (MATH500 up, GPQA and AIME24 slightly down) using 76.8B tokens.
- [Llama 2 is here - get it on Hugging Face](https://swe.quest/articles/llama-2-is-here-get-it-on-hugging-face-c56eec059476bd0f.md): Hugging Face · 2023-07-18 · Medium · 9 min read · LLMs, Inference & serving, Model training, Python
  Meta's Llama 2 family (7B, 13B, 70B base and RLHF-tuned chat models) is released under a commercially usable license, trained on 40% more tokens than Llama 1 with 4k context and grouped-query attention for the 70B model, and is integrated across the Hugging Face ecosystem.
- [180B Parameters, 32GB of RAM: Pushing MoE Inference to the Limit with Transformers](https://swe.quest/articles/180b-parameters-32gb-of-ram-pushing-moe-inference-to-the-limit-with-transformers-63cd3cf21432f7c3.md): Hugging Face · 2026-11-18 · Hard · 11 min read · Inference & serving, LLMs, Performance engineering, Caching, Hardware
  Streaming MoE experts from SSD through a bounded device-side slot pool lets Transformers run Qwen3.8-Flash-Next (121 GB of experts) on a 32 GB MacBook M5 at ~13.9 tok/s, within 6% of the specialized Strata engine on decode and slightly faster on prefill.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
