whatmodel.sh / CodeGemma 2B (v1.0)
CodeGemma 2B (v1.0)
↗ share
+ contribute
CodeGemma 2B (v1.0) is an open-weights language model from Google, released March 2024. Its published size is 2.51B parameters. Licence: gemma.
Catalogue identity notes
Maker repo google/codegemma-2b @e7583ed: licence tag gemma. 2,506,172,416 parameters from the Hugging Face safetensors metadata (dense, so active = total). Released 2024-03: month the maker's Hugging Face repo was created (createdAt 2024-03-21). Pretrained CodeGemma 2B, original April 2024 release; CodeGemma 1.1 is separate. Ollama tags codegemma:2b-code-q4_K_M, codegemma:2b-code-q8_0 (sizes as listed on the tags page, observed 2026-09-29).
$ how it compares
The LLMs ranked either side of CodeGemma 2B (v1.0), out of 828 with a score, then more from Google.
| # | model | score | where | ||
|---|---|---|---|---|---|
| 724 | 32±2 | local | |||
| 725 | 32±2 | local | |||
| 726 | 32±1 | local | |||
| 727 | 32±1 | local | |||
| 728 | 32±1 | local | |||
| more from Google | |||||
| 9 | 82±1 | limited preview | |||
| 23 | 77±1 | api $1.50/M | |||
| 32 | 76±1 | api $1.50/M | |||
$ what it's good at
coding▁▁▁▃▆██▇▆▄▃▁ #433 of 458 · 96% of its score · 9 tests
Beats Qwen3.5 2B, Molmo 7B-D (0924), DeepSeek R1 Distill Qwen 1.5B here, though they rank higher overall. Trails Granite 3.0 1B-A400M Instruct, Llama 3.2 1B Instruct, SmolLM2 1.7B Instruct here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| HumanEval +1 | 26.8% ✎ | ▁·▁▁▃▄▆▅█▃▁▁ beats 10/99 | 41% |
| HumanEval+ | 20.7% ✎ | ▁·▁▁▁▃▄▄▄█▃▁ beats 9/99 | 24% |
| HumanEvalSynthesize (HumanEvalPack, 6-language average) | 30.4% ✎ | ▁·▂▁▂▆▅█▄▄▁▂ beats 6/35 | 6.8% |
| MBPP +1 | 30.4% ✎ | █·▅▃▃▃▅▃▃▅·▅ beats 1/15 | 6.6% |
| MBPP+ | 46.6% ✎ | ▁···▁▁▂▅▇█▆▂ beats 15/75 | 5.4% |
| HumanEvalExplain (HumanEvalPack, 6-language average) | 17.3% ✎ | ▄▇█▃▄▇▄▁▇▃·▁ beats 14/35 | 3.3% |
| CRUXEval-I | 29.6% ✎ | ▃▅█▃▃▅·▃▃▅·▅ beats 1/15 | 3.3% |
| CRUXEval-O | 32.1% ✎ | ▃·▃██▅▃·▃▃▅▃ beats 3/15 | 2.7% |
1 more test
| test | result | vs the others in its run | counts |
|---|---|---|---|
| HumanEvalFix (HumanEvalPack, 6-language average) | 4.4% ✎ | ▁·▃▁▄██▄█▁▅▅ beats 1/35 | 2.6% |
other tests1 not in a task · 4.1% of its score
| test | result | vs the others in its run | counts |
|---|---|---|---|
| BigCodeBench (Complete) | 23.9% ✎ | ▂▃▁▄▂▅▇█▆▂▂▂ beats 3/58 | 4.1% |
$ where to run it
llama.cpp · recommended
version
- Install llama.cpp · Homebrew and winget installs name the commands llama-cli and llama-server instead.macOS / Linux
curl -LsSf https://llama.app/install.sh | shWindowsirm https://llama.app/install.ps1 | iex - Run CodeGemma 2B (v1.0) · needs ~1.6 GB · from huggingface.co/lmstudio-communitychat in the terminal
llama cli -hf lmstudio-community/codegemma-2b-GGUF:Q4_K_M - Or start a local server and open the address it prints (http://localhost:9931)
llama serve -hf lmstudio-community/codegemma-2b-GGUF:Q4_K_M
LM Studio
version
- Install LM Studio · Open the app once before using the lms command.
- Run CodeGemma 2B (v1.0) · needs ~1.6 GB · from huggingface.co/lmstudio-community
- Or download it in the terminal
lms get https://huggingface.co/lmstudio-community/codegemma-2b-GGUF@Q4_K_M -y - Then run lms ls to see its name, and lms chat followed by that name
Ollama
version
- Install Ollama
download it (macOS / Windows) ↗
Linuxcurl -fsSL https://ollama.com/install.sh | sh - Run CodeGemma 2B (v1.0) · needs ~1.6 GB · from ollama.comchat in the terminal
ollama run codegemma:2b-code-q4_K_M
MLX (Mac)
- Install MLX (Mac) · Apple silicon Macs only, text only.with uv
uv tool install mlx-lmorpip install mlx-lm - Run CodeGemma 2B (v1.0) · needs ~2.2 GB, Mac only · from huggingface.co/mlx-communitychat in the terminal
mlx_lm.chat --model mlx-community/codegemma-2b-4bit - Or start an OpenAI-compatible server at http://localhost:8080/v1
mlx_lm.server --model mlx-community/codegemma-2b-4bit
Official weights and documentation: huggingface.co/google ↗
$ how the score was worked out · EvalPlus / EvalPerf published… 65%, Granite Code Models: A Family… 23%, CodeGemma: Open Code Models B… 8% and 1 more
Each result implies a score on its own, after adjusting for how hard its test is and who ran it. The score is their weighted average, with a small pull toward the middle for thinly tested models. Each test's weight is its counts column above; here it's added up by who ran the tests. How it works
| source | results | share of the score |
|---|---|---|
| 3 | 65% | |
| 6 | 23% | |
| 2 | 8% | |
| 1 | 4% | |
| prior · pull toward the middle | 0% | |
| weighted average | = 31.7 |
$ improve this page
Use a short GitHub form or edit the data through a pull request. Every number needs a source; here's which ones we can use.
data updated · sources and licences · json