whatmodel.sh / CodeGemma 2B (v1.0)

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).

31.7±0.7#629 of 719 LLMsfrom 12 benchmark results across 4 sources

$ how it compares

The LLMs ranked either side of CodeGemma 2B (v1.0), out of 828 with a score, then more from Google.

#modelscorewhereRAMreleased
724Qwen1.5 4B Chat Alibaba32±2local~4.1GB2024-02
725Ghost 7B Alpha Ghost X32±2local~6.1GB2024-04
726CodeGemma 2B (v1.0) Google32±1local~3.2GB2024-03
727Qwen-7B (base) Alibaba32±1local~6.6GB2023-08
728Phi-1.5 (1.3B) Microsoft32±1local~2.4GB2023-09
more from Google
9Gemini 4 Argon (limited preview) Google82±1limited preview2026-09
23Gemini 3.8 Flash Google77±1api $1.50/M2026-09
32Gemini 3.7 Flash Google76±1api $1.50/M2026-08

see all LLMs · find the ones that fit your machine

$ 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.

testresultvs the others in its rundifficultycountswhy
HumanEval +126.8% ✎▁·▁▁▃▄▆▅█▃▁▁ beats 10/99easy · avg 79%▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 41%sharp · at its level · several runs
HumanEval+20.7% ✎▁·▁▁▁▃▄▄▄█▃▁ beats 9/99easy · avg 74%▇▇▇▇▇▇▇▇▇ 24%sharp
HumanEvalSynthesize (HumanEvalPack, 6-language average)30.4% ✎▁·▂▁▂▆▅█▄▄▁▂ beats 6/35medium · avg 64%▇▇▇ 6.8%at its level
MBPP +130.4% ✎█·▅▃▃▃▅▃▃▅·▅ beats 1/15easy · avg 70%▇▇▇ 6.6%at its level · several runs
MBPP+46.6% ✎▁···▁▁▂▅▇█▆▂ beats 15/75easy · avg 68%▇▇ 5.4%at its level
HumanEvalExplain (HumanEvalPack, 6-language average)17.3% ✎▄▇█▃▄▇▄▁▇▃·▁ beats 14/35medium · avg 49%▇ 3.3%typical
CRUXEval-I29.6% ✎▃▅█▃▃▅·▃▃▅·▅ beats 1/15medium · avg 59%▇ 3.3%at its level
CRUXEval-O32.1% ✎▃·▃██▅▃·▃▃▅▃ beats 3/15medium · avg 55%▇ 2.7%blunt · at its level
1 more test
testresultvs the others in its rundifficultycountswhy
HumanEvalFix (HumanEvalPack, 6-language average)4.4% ✎▁·▃▁▄██▄█▁▅▅ beats 1/35medium · avg 56%▇ 2.6%sharp
other tests1 not in a task · 4.1% of its score
testresultvs the others in its rundifficultycountswhy
BigCodeBench (Complete)23.9% ✎▂▃▁▄▂▅▇█▆▂▂▂ beats 3/58medium · avg 50%▇▇ 4.1%typical

$ where to run it

llama.cpp · recommended

version

  1. 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 | sh
    Windows
    irm https://llama.app/install.ps1 | iex

    other ways to install ↗

  2. Run CodeGemma 2B (v1.0) · needs ~1.6 GB · from huggingface.co/lmstudio-community
    chat in the terminal
    llama cli -hf lmstudio-community/codegemma-2b-GGUF:Q4_K_M
  3. 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

  1. Install LM Studio · Open the app once before using the lms command.

    download it (macOS / Windows / Linux) ↗

  2. Run CodeGemma 2B (v1.0) · needs ~1.6 GB · from huggingface.co/lmstudio-community

    open in LM Studio ↗

  3. Or download it in the terminal
    lms get https://huggingface.co/lmstudio-community/codegemma-2b-GGUF@Q4_K_M -y
  4. Then run lms ls to see its name, and lms chat followed by that name

Ollama

version

  1. Install Ollama

    download it (macOS / Windows) ↗

    Linux
    curl -fsSL https://ollama.com/install.sh | sh
  2. Run CodeGemma 2B (v1.0) · needs ~1.6 GB · from ollama.com
    chat in the terminal
    ollama run codegemma:2b-code-q4_K_M

MLX (Mac)

  1. Install MLX (Mac) · Apple silicon Macs only, text only.
    with uv
    uv tool install mlx-lm
    or
    pip install mlx-lm
  2. Run CodeGemma 2B (v1.0) · needs ~2.2 GB, Mac only · from huggingface.co/mlx-community
    chat in the terminal
    mlx_lm.chat --model mlx-community/codegemma-2b-4bit
  3. 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

sourceresultsshare of the scorelicence
EvalPlus / EvalPerf published evaluation runs3▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇▇ 65%Apache-2.0
Granite Code Models: A Family of Open Foundation Models for Code Intelligence — authors' own runs6▇▇▇▇▇▇▇ 23%CC BY 4.0
CodeGemma: Open Code Models Based on Gemma — authors' own runs · lab-reported2▇▇ 8%CC BY 4.0
BigCodeBench paper (Zhuo et al., ICLR 2025), arXiv 2406.15877v41▇ 4%CC BY 4.0
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