AI21’s Jamba Reasoning 3B is a top-performing reasoning model that packs leading scores on intelligence benchmarks and highly-efficient processing into a compact 3B build.
Read the full blog post here.
Key Advantages
Fast: Optimized for efficient sequence processing
The hybrid design combines Transformer attention with Mamba (a state-space model). Mamba layers are more efficient for sequence processing, while attention layers capture complex dependencies. This mix reduces memory overhead, improves throughput, and makes the model run smoothly on laptops, GPUs, and even mobile devices, while maintainig impressive quality.
Smart: Leading intelligence scores
The model outperforms competitors, such as Gemma 3 4B, Llama 3.2 3B, and Granite 4.0 Micro, on a combined intelligence score that averages 6 standard benchmarks.
Scalable: Handles very long contexts
Unlike most compact models, Jamba Reasoning 3B supports extremely long contexts. Mamba layers allow the model to process inputs without storing massive attention caches, so it scales to 256K tokens while keeping inference practical. This makes it suitable for edge deployment as well as datacenter workloads.
Model Details
Number of Parameters: 3B
Number of Layers: 28 (26 Mamba, 2 Attention)
Number of Attention Heads: 20 MQA (20 for Q, 1 for KV)
Vocabulary Size: 64K
Context Length: 256k
Architecture: Hybrid Transformer–Mamba with efficient attention and long-context support
1importtorch2from transformers importAutoModelForCausalLM,AutoTokenizer34model =AutoModelForCausalLM.from_pretrained("ai21labs/AI21-Jamba-Reasoning-3B",5 dtype=torch.bfloat16,6 attn_implementation="flash_attention_2",7 device_map="auto")89tokenizer =AutoTokenizer.from_pretrained("ai21labs/AI21-Jamba-Reasoning-3B")1011messages =[12{"role":"user","content":"You are analyzing customer support tickets to decide which need escalation.\nTicket 1: 'App crashes when uploading files >50MB.'\nTicket 2: 'Forgot password, can’t log in.'\nTicket 3: 'Billing page missing enterprise pricing.'\nClassify each ticket as Critical, Medium, or Low and explain your reasoning.\n"},13]1415prompts = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)1617outputs = model.generate(**tokenizer(prompts, return_tensors="pt").to(model.device), do_sample=True, temperature=0.6, max_new_tokens=4096)1819generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)20print(generated_text)
Training Details
We trained the model in multiple stages, each designed to strengthen reasoning and long-context performance. The process began with large-scale pre-training on a diverse corpus of natural documents. We then mid-trained on ~0.5T tokens of math and code, while extending the context length to 32K tokens. During this stage we also applied a Mamba-specific long-context method, which we found to significantly improve long-context abilities.
To improve reasoning, tool use, and instruction following, we applied cold-start distillation: supervised fine-tuning with a 32K window and direct preference optimization with a 64K window. Finally, we enhanced reasoning performance further through online reinforcement learning with RLVR, targeting tasks such as code generation, mathematical problem solving, structured output, and information extraction.
Reinforcement “Fine-Tuning”
Full support for training Jamba through VeRL will be available soon. AI21 has introduced several improvements to the VeRL framework (https://github.com/volcengine/verl), including new capabilities for training hybrid models, and stability improvements for GRPO training. These improvements will soon be available to the open source community.