Jamba

Also known as: AI21 Jamba

On this page 7

Jamba is a family of large language models from AI21 Labs built on a hybrid architecture that interleaves Transformer attention with Mamba layers and adds mixture-of-experts routing. Among AI models & assistants, it is notable as the first production-grade hybrid SSM-Transformer model, released in March 2024 and designed for context windows of 256,000 tokens at a lower memory cost than a pure Transformer of similar quality.

The name is often written as AI21 Jamba to separate it from unrelated products. Later releases, including Jamba 1.5 Mini and Jamba 1.5 Large, target enterprise tasks such as long-document question answering, summarization and retrieval-augmented generation.

How the Jamba hybrid architecture works

Jamba combines three building blocks so that each covers a weakness of the others. Attention layers give precise token-to-token recall, Mamba layers process sequences in linear time with a fixed-size state, and mixture-of-experts layers add capacity without activating every parameter for each token.

The original design groups layers into Jamba blocks of eight layers, with roughly one attention layer for every seven Mamba layers. Mixture-of-experts replaces the dense feed-forward network in every second layer, using 16 experts with two selected per token. Because only a few layers use attention, the key-value cache stays small, which is the main reason long contexts fit on fewer GPUs.

The table below shows the role of each component.

ComponentRoleCost behavior
Attention layerExact recall and in-context copyingQuadratic compute, growing KV cache
Mamba layerSelective state space sequence mixingLinear compute, constant state size
Mixture-of-experts layerExtra capacity through routed expertsOnly top-2 experts run per token
NormalizationStabilizes training of Mamba layersNegligible overhead
Components of a Jamba block

AI21 reported that adding a small share of attention was necessary because pure Mamba models struggled with in-context learning and strict output formats. The hybrid recovers these abilities while keeping most of the efficiency of the state space design.

Jamba model versions and sizes

Jamba has evolved from a single research release into a family of instruction-tuned models sized for different deployment budgets. Total parameter counts are large, but active parameters are much smaller because of expert routing.

ModelTotal parametersActive parametersContext window
Jamba (v0.1)About 52BAbout 12B256K tokens
Jamba 1.5 MiniAbout 52BAbout 12B256K tokens
Jamba 1.5 LargeAbout 398BAbout 94B256K tokens
Main Jamba releases

The first release used the Apache 2.0 license and was positioned as a base model for research. The 1.5 generation and later updates are open-weight models under AI21’s own license, with commercial use subject to its terms, and are also offered through AI21’s API and major cloud platforms. Later point releases refined instruction following and grounding, and AI21 has also published small reasoning-oriented variants.

AI21 reported that the original model could fit about 140,000 tokens of context on a single 80 GB GPU, a figure that depends on precision and serving software. For Jamba 1.5 Large, the company introduced ExpertsInt8 quantization to serve the model on a single node of eight 80 GB GPUs.

How Jamba compares with other model designs

Jamba differs from models such as Llama or Mistral mainly in how it mixes information along the sequence. Dense and mixture-of-experts Transformers rely on attention in every layer, while Jamba uses attention sparingly and lets state space layers carry most of the sequence work.

DesignSequence mixingLong-context memoryMain trade-off
Dense TransformerAttention in every layerKV cache grows in every layerStrong recall, high memory cost
MoE TransformerAttention in every layerSame KV growth as denseCheaper compute, same cache issue
Pure Mamba modelState space layers onlyConstant stateWeaker exact recall
Jamba hybridMostly Mamba, some attentionSmall KV cacheMore complex serving stack
Jamba compared with other architectures

The practical advantage appears in throughput at long context lengths. AI21 reported markedly higher throughput than comparable Transformers beyond roughly 100,000 tokens, while scores on general benchmarks stayed in the range of similarly sized open models rather than above them.

When to choose Jamba

Jamba fits workloads where long inputs dominate cost, such as contracts, financial filings, call transcripts and large retrieval results passed in a single prompt. For short chat turns, its efficiency advantage is small and general capability matters more than architecture.

SituationSuitabilityReason
Long-document analysisStrong fitEfficient 256K context
Private deployment with open weightsGood fitSelf-hosting is possible
Short conversational assistantNeutralLittle gain from the hybrid design
Frontier reasoning or codingWeaker fitLarger frontier models usually lead
Decision guide for Jamba

Limitations of Jamba

The hybrid design brings engineering costs alongside its efficiency. Mamba layers need specialized kernels, and inference frameworks supported them later than standard attention, so tooling, quantization and fine-tuning support have lagged behind mainstream Transformer models.

  • A long window is not perfect recall: quality on multi-hop questions can still drop at extreme lengths.
  • Large total parameter counts still require substantial GPU memory for weights, even when active parameters are small.
  • License terms differ by version, so commercial users must check each release.

The simple explanation

Jamba is a language model that reads very long texts without needing huge amounts of memory. Most models compare every word with every earlier word. That gets expensive fast.

Jamba does that careful comparison only in a few layers. The other layers keep a short running summary as they read. It is like a reader who takes compact notes and checks the full text only now and then. The result is long reading at lower cost.

How it is used in practice

An insurance company wants to answer adjusters’ questions about claim files that often run to 150,000 tokens of reports, emails and policy wording. Splitting files into chunks for retrieval loses links between documents, so the team tests a model that can read the whole file at once.

They self-host Jamba 1.5 Mini on their own GPU servers to keep customer data internal. With the hybrid architecture, one server handles full-file prompts that would need several GPUs with a comparable pure Transformer. Adjusters ask questions such as which exclusions apply and when water damage was first reported, and the model answers with quoted passages from the file.

The team still keeps retrieval for the largest cases and asks adjusters to verify cited passages, because long-context recall is strong but not flawless.