LLMs ·

Gemma 2 2B

Parameters
2.6B
Architecture
Dense
Max context
8K tokens
License
gemma
Released
2024-07

How to run it

Quickest · Ollama

One command downloads a ready-to-run version and starts a chat.

ollama run gemma2:2b

Get Ollama at ollama.com/download (opens in a new tab) · model page (opens in a new tab)

Quantized files · GGUF

Works in LM Studio, llama.cpp, Jan and Ollama. No sign-in needed.

huggingface.co/lmstudio-community/gemma-2-2b-it-GGUF (opens in a new tab)

ollama run hf.co/lmstudio-community/gemma-2-2b-it-GGUF

Original weights · Hugging Face

Full-precision files from Google, for fine-tuning, vLLM, Transformers.

huggingface.co/google/gemma-2-2b-it (opens in a new tab)

Free Hugging Face account needed: request access on the model page, and Google approves it (usually within minutes to a few hours).

Official repo · GitHub

Reference code, inference scripts and docs from Google. The weights themselves download from Hugging Face.

github.com/google-deepmind/gemma (opens in a new tab)

git clone https://github.com/google-deepmind/gemma

Google DeepMind’s official Gemma library.

Memory needed

Weights plus KV cache and runtime overhead. Leave a little extra free for the operating system and other apps.

KV cache: sliding-window hybrid: the KV estimate counts the global-attention layers plus a small allowance for the sliding-window layers.

Quantization Quality Weights Total at 8K context Download
Q2_K Low 1.0 GB 2.1 GB
Q3_K_M Low 1.3 GB 2.4 GB GGUF (Q3_K_L) (opens in a new tab)
Q4_K_M Good 1.6 GB 2.7 GB GGUF (opens in a new tab)
Q5_K_M High 1.9 GB 3.0 GB GGUF (opens in a new tab)
Q6_K High 2.1 GB 3.2 GB GGUF (opens in a new tab)
Q8_0 Very high 2.8 GB 3.9 GB GGUF (opens in a new tab)
F16 Full 5.2 GB 6.3 GB Original weights (opens in a new tab)

Best hardware for Gemma 2 2B

The least expensive GPU in our catalog that runs it without offloading is the Intel Arc A380 (launch price $139) at Q6_K.

Grade · points Hardware Quant Memory Speed Fit
65 ptsGood (B) · 65 of 100 points: Model quality 12.6/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 13.3/15 NVIDIA GeForce RTX 4070 SUPER F16 6.9 GB / 12.0 GB 55.6 tok/s Runs well
64 ptsGood (B) · 64 of 100 points: Model quality 12.6/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 12.3/15 NVIDIA GeForce RTX 4060 Q8_0 4.3 GB / 8.0 GB 65.1 tok/s Runs well
62 ptsGood (B) · 62 of 100 points: Model quality 12.6/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 10.3/15 AMD Radeon RX 9070 XT F16 7.1 GB / 16.0 GB 60.8 tok/s Runs well
62 ptsGood (B) · 62 of 100 points: Model quality 12.6/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 10.3/15 NVIDIA GeForce RTX 4070 Ti SUPER F16 7.1 GB / 16.0 GB 74.2 tok/s Runs well
62 ptsGood (B) · 62 of 100 points: Model quality 12.6/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 10.3/15 NVIDIA GeForce RTX 4080 SUPER F16 7.1 GB / 16.0 GB 81.2 tok/s Runs well
62 ptsGood (B) · 62 of 100 points: Model quality 12.6/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 10.3/15 NVIDIA GeForce RTX 5060 Ti 16GB F16 7.1 GB / 16.0 GB 49.4 tok/s Runs well
62 ptsGood (B) · 62 of 100 points: Model quality 12.6/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 10.3/15 NVIDIA GeForce RTX 5070 Ti F16 7.1 GB / 16.0 GB 98.9 tok/s Runs well
62 ptsGood (B) · 62 of 100 points: Model quality 12.6/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 10.3/15 NVIDIA GeForce RTX 5080 F16 7.1 GB / 16.0 GB 106 tok/s Runs well
61 ptsGood (B) · 61 of 100 points: Model quality 12.6/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 8.6/15 Intel Arc B580 Q8_0 4.5 GB / 12.0 GB 83.4 tok/s Runs well
61 ptsGood (B) · 61 of 100 points: Model quality 12.6/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 8.6/15 NVIDIA GeForce RTX 3060 12GB Q8_0 4.5 GB / 12.0 GB 86.2 tok/s Runs well

Check it on your own hardware

Estimates come from published hardware specs and our open formulas, not from running the model on your machine. Real speed varies with runtime, drivers and settings. Numbers marked “Measured” come from a linked benchmark.