[whatmodel.sh](../../README.md) / CodeGemma 7B IT (v1.0) # CodeGemma 7B IT (v1.0) Google · released 2024-03 · 8.54B params · gemma **score 44.1** ±0.7 · #497 of 732 · from 10 benchmark results across 4 sources Score within the [LMArena (text)](https://whatmodel.sh/?set=lmarena-text&score=set) comparison set only. ## What it's good at ● marks CodeGemma 7B IT (v1.0) among every model on that task or test, worst to best.
task    vs the others         rank  counts  tests
coding  ▁▁▁▃▅●█▇▅▄▃▁   #357 of 469     90%      7
coding · #357 of 469 · 90% of its score Beats [LFM2.5 2.6B](lfm2-5-2-6b.md), [LFM2.5 8B-A1B](lfm2-5-8b-a1b.md), [Qwen3-VL 2B Thinking](qwen3-vl-2b-thinking.md) here, though they rank higher overall. Trails [Code Tulu 2 13B](code-tulu-2-13b.md), [Phi-3-mini-128k-instruct (Apr 2024)](phi-3-mini-128k-instruct.md), [DeepSeek LLM 67B Chat](deepseek-llm-67b-chat.md) here, though they rank lower overall.
test                                result  vs the others in its run  difficulty        counts  why
HumanEval                            60.4%  ▁·▁▁▃▄▆●█▃▁▁ beats 46/99  easy · avg 76%       39%  sharp · at its level · several runs
HumanEval+                           51.8%  ▁·▁▁▁▃▄▄●█▃▁ beats 45/99  easy · avg 70%       27%  sharp · at its level
HumanEvalSynthesize (HumanEvalPac…   41.6%  ▁·▂▁▂▆▅●▄▄▁▂ beats 21/35  medium · avg 62%    7.5%  at its level
MBPP+                                56.9%  ▁···▁▁▂▅●█▆▂ beats 33/75  easy · avg 66%      5.1%  at its level
HumanEvalExplain (HumanEvalPack, …   38.4%  ▄▇█▃▄▇▄▁●▃·▁ beats 30/35  medium · avg 46%    5.0%  at its level
HumanEvalFix (HumanEvalPack, 6-la…   45.8%  ▁·▁▁▄██▄█▁●▅ beats 31/35  medium · avg 51%    4.9%  sharp · at its level
MBPP (maker)                         54.2%  ▁▁▁▄▅●▆▅▄▁▂▁ beats 44/86  easy · avg 71%      2.2%  at its level
other tests (2)
test                     result  vs the others in its run  difficulty        counts  why
BigCodeBench (Complete)   38.3%  ▂▁▁▄▂▅●█▆▂▂▂ beats 23/58  medium · avg 48%    4.8%  at its level
BigCodeBench (Instruct)   32.1%  ▃▂·▆●██▆▅▃▃▃ beats 10/33  medium · avg 39%    4.7%  at its level
## How the score was worked out Each result implies a score on its own, after adjusting for how hard that test is and who ran it. The model's 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 is added up by who ran the tests. [Method](../method.md)
source                                    results  share of the score
EvalPlus / EvalPerf published evaluatio…        3   65% ▇▇▇▇▇▇▇▇
Granite Code Models: A Family of Open F…        3   17% ▇▇
BigCodeBench paper                              2    9% ▇
CodeGemma: Open Code Models Based on Ge…        2    8% ▇
prior: pull toward the middle                        0% ▇
weighted average                                   = 44.1
Licences: EvalPlus / EvalPerf published evaluation runs ([Apache-2.0](../../licenses/evalplus-published-runs-Apache-2.0.txt)) · Granite Code Models: A Family of Open Foundation Models for Code Intelligence ([CC BY 4.0](../../licenses/paper-2405.04324v1-CC-BY-4.0.txt)) · BigCodeBench paper ([CC BY 4.0](http://creativecommons.org/licenses/by/4.0/)) · CodeGemma: Open Code Models Based on Gemma ([CC BY 4.0](../../licenses/paper-2406.11409v2-CC-BY-4.0.txt)) ## How to run it ### llama.cpp (recommended) 1. Install llama.cpp. Homebrew and winget installs name the commands llama-cli and llama-server instead. [Other ways to install](https://github.com/ggml-org/llama.cpp/blob/master/docs/install.md) ```sh # macOS / Linux curl -LsSf https://llama.app/install.sh | sh # Windows irm https://llama.app/install.ps1 | iex ``` 2. Run CodeGemma 7B IT (v1.0) (Q4_K_M, needs ~5.3 GB, from [huggingface.co/lmstudio-community](https://huggingface.co/lmstudio-community/codegemma-7b-it-GGUF/tree/ffd4dfcc4482d2392160b285a8e2176628e93e7f)) ```sh llama cli -hf lmstudio-community/codegemma-7b-it-GGUF:Q4_K_M ``` 3. Or start a local server and open the address it prints (http://localhost:9931) ```sh llama serve -hf lmstudio-community/codegemma-7b-it-GGUF:Q4_K_M ``` Other versions: Q8_0 (~9.1 GB) `llama cli -hf lmstudio-community/codegemma-7b-it-GGUF:Q8_0` ### LM Studio 1. Install LM Studio. Open the app once before using the lms command. [Download it (macOS / Windows / Linux)](https://lmstudio.ai/download) 2. Run CodeGemma 7B IT (v1.0) (Q4_K_M, needs ~5.3 GB, from [huggingface.co/lmstudio-community](https://huggingface.co/lmstudio-community/codegemma-7b-it-GGUF/tree/ffd4dfcc4482d2392160b285a8e2176628e93e7f)) ```sh lms get https://huggingface.co/lmstudio-community/codegemma-7b-it-GGUF@Q4_K_M -y ``` 3. Then run lms ls to see its name, and lms chat followed by that name Other versions: Q8_0 (~9.1 GB) `lms get https://huggingface.co/lmstudio-community/codegemma-7b-it-GGUF@Q8_0 -y` · 4bit (~5.9 GB, Mac only) `lms get https://huggingface.co/mlx-community/codegemma-7b-it-4bit -y` · 8bit (~9.6 GB, Mac only) `lms get https://huggingface.co/mlx-community/codegemma-7b-it-8bit -y` ### Ollama 1. Install Ollama. [Download it (macOS / Windows)](https://ollama.com/download) ```sh # Linux curl -fsSL https://ollama.com/install.sh | sh ``` 2. Run CodeGemma 7B IT (v1.0) (Q4_K_M, needs ~5.3 GB, from [ollama.com](https://ollama.com/library/codegemma/tags)) ```sh ollama run codegemma:7b-instruct-q4_K_M ``` Other versions: Q8_0 (~9.1 GB) `ollama run codegemma:7b-instruct-q8_0` ### MLX (Mac) 1. Install MLX (Mac). Apple silicon Macs only, text only. ```sh # with uv uv tool install mlx-lm # or pip install mlx-lm ``` 2. Run CodeGemma 7B IT (v1.0) (4bit, needs ~5.9 GB, Mac only, from [huggingface.co/mlx-community](https://huggingface.co/mlx-community/codegemma-7b-it-4bit/tree/59210ff70e9186fcb9de296e6d56e330318af2bf)) ```sh mlx_lm.chat --model mlx-community/codegemma-7b-it-4bit ``` 3. Or start an OpenAI-compatible server at http://localhost:8080/v1 ```sh mlx_lm.server --model mlx-community/codegemma-7b-it-4bit ``` Other versions: 8bit (~9.6 GB, Mac only) `mlx_lm.chat --model mlx-community/codegemma-7b-it-8bit` Model repository and documentation: [huggingface.co/google](https://huggingface.co/google/codegemma-7b-it) [interactive version](https://whatmodel.sh/model/codegemma-7b-it) · [JSON](https://whatmodel.sh/api?format=json&all=1)