LLMs · Google
CodeGemma 2B
- Parameters
- 2.5B
- Architecture
- Dense
- Max context
- 8K tokens
- License
- gemma
- Released
- 2024-03
How to run it
Quickest · Ollama
One command downloads a ready-to-run version and starts a chat.
ollama run codegemma:2bQuantized files · GGUF
Works in LM Studio, llama.cpp, Jan and Ollama. No sign-in needed.
huggingface.co/google/codegemma-2b-GGUF (opens in a new tab)
ollama run hf.co/google/codegemma-2b-GGUFOriginal weights · Hugging Face
Full-precision files from Google, for fine-tuning, vLLM, Transformers.
Memory needed
Weights plus KV cache and runtime overhead. Leave a little extra free for the operating system and other apps.
| Quantization | Quality | Weights | Total at 8K context | Download |
|---|---|---|---|---|
Q2_K |
Low | 1.0 GB | 1.8 GB | |
Q3_K_M |
Low | 1.2 GB | 2.0 GB | |
Q4_K_M |
Good | 1.5 GB | 2.3 GB | |
Q5_K_M |
High | 1.8 GB | 2.5 GB | |
Q6_K |
High | 2.1 GB | 2.8 GB | |
Q8_0 |
Very high | 2.7 GB | 3.4 GB | |
F16 |
Full | 5.0 GB | 5.8 GB | GGUF (opens in a new tab) Original weights (opens in a new tab) |
Best hardware for CodeGemma 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 |
|---|---|---|---|---|---|
| 58 ptsGood (B) · 58 of 100 points: Model quality 6.3/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 12.3/15 | NVIDIA GeForce RTX 3060 12GB | F16 | 6.4 GB / 12.0 GB | 41.3 tok/s | Runs well |
| 58 ptsGood (B) · 58 of 100 points: Model quality 6.3/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 12.3/15 | NVIDIA GeForce RTX 4070 SUPER | F16 | 6.4 GB / 12.0 GB | 57.8 tok/s | Runs well |
| 57 ptsUsable (C) · 57 of 100 points: Model quality 6.3/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 11.0/15 | NVIDIA GeForce RTX 4060 | Q8_0 | 3.8 GB / 8.0 GB | 67.7 tok/s | Runs well |
| 55 ptsUsable (C) · 55 of 100 points: Model quality 6.3/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 9.5/15 | AMD Radeon RX 9070 XT | F16 | 6.6 GB / 16.0 GB | 63.2 tok/s | Runs well |
| 55 ptsUsable (C) · 55 of 100 points: Model quality 6.3/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 9.5/15 | NVIDIA GeForce RTX 4070 Ti SUPER | F16 | 6.6 GB / 16.0 GB | 77.1 tok/s | Runs well |
| 55 ptsUsable (C) · 55 of 100 points: Model quality 6.3/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 9.5/15 | NVIDIA GeForce RTX 4080 SUPER | F16 | 6.6 GB / 16.0 GB | 84.4 tok/s | Runs well |
| 55 ptsUsable (C) · 55 of 100 points: Model quality 6.3/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 9.5/15 | NVIDIA GeForce RTX 5060 Ti 16GB | F16 | 6.6 GB / 16.0 GB | 51.4 tok/s | Runs well |
| 55 ptsUsable (C) · 55 of 100 points: Model quality 6.3/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 9.5/15 | NVIDIA GeForce RTX 5070 Ti | F16 | 6.6 GB / 16.0 GB | 103 tok/s | Runs well |
| 55 ptsUsable (C) · 55 of 100 points: Model quality 6.3/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 9.5/15 | NVIDIA GeForce RTX 5080 | F16 | 6.6 GB / 16.0 GB | 110 tok/s | Runs well |
| 54 ptsUsable (C) · 54 of 100 points: Model quality 6.3/45, Memory fit 25.0/25, Speed 15.0/15, Memory use 7.7/15 | Intel Arc B580 | Q8_0 | 4.0 GB / 12.0 GB | 86.7 tok/s | Runs well |
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.