Model reference · open weights

Zamba2

LLMs Zyphra Text gen 1 build Open weights 179k dl/mo

Zamba2 is an open-weight language model from Zyphra. Zamba2-1.2B-instruct (FP32) weighs 2.4 GB; the smallest configuration that runs it is RTX 3060 12 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • Zamba2-1.2B-instruct is a 1.2B parameter text-generation model developed by Zyphra that uses a hybrid architecture of Mamba2 state-space and transformer blocks.
  • It is designed for instruction-following and multi-turn chat tasks with a context length of 4096 tokens.
  • The model is released under the apache-2.0 license.

Summary of the Zyphra/Zamba2-1.2B-instruct model card, 2026-10-01

What it is

Released byZyphra
Released2024-09-19
Parameters1.2B
VRAM2.4 GB for the weights

What it runs on

Memory and cards for Zamba2-1.2B-instruct (FP32)

2.4 GBweights, file size
563 MBruntime overhead, at least
4,096 tokenscontext max

How much memory each request adds isn't estimated yet for this architecture. The weights need at least the cards below, plus room for the context.

CardWeights alone
RTX 3060 12 GBfits
RTX 4060 Ti 16 GBfits
RTX 3090 24 GBfits
RTX 4090 24 GBfits
RTX 5090 32 GBfits
L40S 48 GBfits
A100 80 GBfits
H100 80 GBfits
RTX PRO 6000 Blackwell 96 GBfits
DGX Spark (GB10) 128 GB unifiedfits
H200 141 GBfits
B200 180 GBfits

From the model card

What Zyphra says about Zamba2

Read the model card

Zamba2-1.2B-instruct is obtained from Zamba2-1.2B by fine-tuning on instruction-following and chat datasets. Specifically:

  1. SFT of the base Zamba2-1.2B model on ultrachat_200k and Infinity-Instruct
  2. DPO of the SFT checkpoint on ultrafeedback_binarized, orca_dpo_pairs, and OpenHermesPreferences

Zamba2-1.2B-Instruct is a hybrid model composed of state-space (Mamba2) and transformer blocks.

Quick start

Prerequisites

To download Zamba2-1.2B-instruct, install transformers from source:

  1. git clone https://github.com/huggingface/transformers.git
  2. cd transformers && pip install .

To install dependencies necessary to run Mamba2 kernels, install mamba-ssm from source (due to compatibility issues with PyTorch) as well as causal-conv1d:

  1. git clone https://github.com/state-spaces/mamba.git
  2. cd mamba && git checkout v2.1.0 && pip install .
  3. pip install causal-conv1d

You can run the model without using the optimized Mamba2 kernels, but it is not recommended as it will result in significantly higher latency and memory usage.

Inference

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

# Instantiate model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("Zyphra/Zamba2-1.2B-instruct")
model = AutoModelForCausalLM.from_pretrained("Zyphra/Zamba2-1.2B-instruct", device_map="cuda", torch_dtype=torch.bfloat16)

# Format the input as a chat template
prompt = "What factors contributed to the fall of the Roman Empire?"
sample = [{'role': 'user', 'content': prompt}]
chat_sample = tokenizer.apply_chat_template(sample, tokenize=False)

# Tokenize input and generate output
input_ids = tokenizer(chat_sample, return_tensors='pt', add_special_tokens=False).to("cuda")
outputs = model.generate(**input_ids, max_new_tokens=150, return_dict_in_generate=False, output_scores=False, use_cache=True, num_beams=1, do_sample=False)
print((tokenizer.decode(outputs[0])))

Performance

Zamba2-1.2B-Instruct achieves leading instruction-following and multi-turn chat performance for a model of its size and matches strong models significantly larger. For instance, Zamba2-1.2B-Instruct outperforms Gemma2-2B-Instruct, a very strong model over 2x its size.

ModelSizeAggregate MT-BenchIFEval
Zamba2-1.2B-Instruct1.2B59.5341.45
Gemma2-2B-Instruct2.7B51.6942.20
H2O-Danube-1.8B-Chat1.6B49.7827.95
StableLM-1.6B-Chat1.6B49.8733.77
SmolLM-1.7B-Instruct1.7B43.3716.53
Qwen2-1.5B-Instruct1.5BN/A34.68

Moreover, due to its unique hybrid SSM architecture, Zamba2-1.2B-Instruct achieves extremely low inference latency and rapid generation with a significantly smaller memory footprint than comparable transformer-based models.

Time to First Token (TTFT)Output Generation

And memory overhead

Model Details

Zamba2-1.2B utilizes and extends our original Zamba hybrid SSM-attention architecture. The core Zamba architecture consists of a backbone of Mamba2 layers interleaved with one or more shared attention layers. This attention has shared weights to minimize the parameter cost of the model. We find that concatenating the original model embeddings to the input to this attention block improves performance, likely due to better maintenance of information across depth. The Zamba2 architecture also applies LoRA projection matrices to the shared transformer blocks to gain some additional expressivity in each block and allow each shared block to specialize slightly to its own unique position while keeping the additional parameter overhead small.

Note: this is a temporary HuggingFace implementation of Zamba2-1.2B. It may not yet be fully compatible with all frameworks and tools intended to interface with HuggingFace models.

A standalone Pytorch implementation of Zamba2-1.2B may be found here.

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms