[whatmodel.sh](../../README.md) / CodeGemma 7B (v1.0) # CodeGemma 7B (v1.0) Google · released 2024-03 · 8.54B params · gemma **score 40.0** ±0.6 · #568 of 732 · from 14 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 (v1.0) among every model on that task or test, worst to best.
task vs the others rank counts tests coding ▁▁▁▃●▇█▇▅▄▃▁ #402 of 469 93% 9 math ▁▁▃▅█●▄█▄▂▁▁ #235 of 431* 3.1% 2
test result vs the others in its run difficulty counts why HumanEval 44.5% ▁·▁▁▃▄●▅█▃▁▁ beats 28/99 easy · avg 76% 38% sharp · at its level · several runs HumanEval+ 41.5% ▁·▁▁▁▃▄●▄█▃▁ beats 32/99 easy · avg 70% 24% sharp · at its level HumanEvalSynthesize (HumanEvalPac… 41.5% ▁·▂▁▂▆▅●▄▄▁▂ beats 20/35 medium · avg 62% 6.7% at its level MBPP 53.0% █·▅▃▃▃▅▃▃▅·● beats 15/15 easy · avg 67% 6.0% at its level · several runs MBPP+ 52.4% ▁···▁▁▂▅●█▆▂ beats 22/75 easy · avg 66% 4.9% at its level HumanEvalExplain (HumanEvalPack, … 12.4% ▄●█▃▄▇▄▁▇▃·▁ beats 4/35 medium · avg 46% 3.9% typical HumanEvalFix (HumanEvalPack, 6-la… 10.1% ▁·▁▁▄●█▄█▁▅▅ beats 6/35 medium · avg 51% 3.6% sharp CRUXEval-I 42.6% ▃▅█▃▃▅·▃▃●·▅ beats 12/15 medium · avg 56% 2.9% at its level CRUXEval-O 43.9% ▃·▃██▅▃·▃▃●▃ beats 13/15 medium · avg 54% 2.4% blunt · at its level
test result vs the others in its run difficulty counts why GSM8K 49.0% ▄··▄···▄··●▄ beats 3/5 easy · avg 75% 1.7% sharp · at its level · noisy MATH 21.8% ▃·▃····▃···● beats 4/5 medium · avg 37% 1.4% noisy
test result vs the others in its run difficulty counts why BigCodeBench (Complete) 37.3% ▂▁▁▄▂●▇█▆▂▂▂ beats 20/58 medium · avg 48% 4.1% at its level
source results share of the score EvalPlus / EvalPerf published evaluatio… 3 61% ▇▇▇▇▇▇▇ Granite Code Models: A Family of Open F… 8 27% ▇▇▇ CodeGemma: Open Code Models Based on Ge… 2 8% ▇ BigCodeBench paper 1 4% ▇ prior: pull toward the middle 0% ▇ weighted average = 40.0Licences: 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)) · CodeGemma: Open Code Models Based on Gemma ([CC BY 4.0](../../licenses/paper-2406.11409v2-CC-BY-4.0.txt)) · BigCodeBench paper ([CC BY 4.0](http://creativecommons.org/licenses/by/4.0/)) ## 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 (v1.0) (Q4_K_M, needs ~5.3 GB, from [huggingface.co/lmstudio-community](https://huggingface.co/lmstudio-community/codegemma-7b-GGUF/tree/215cae4d4fdd2d21552b3f88af57f2c2823d5f1e)) ```sh llama cli -hf lmstudio-community/codegemma-7b-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-GGUF:Q4_K_M ``` Other versions: Q8_0 (~9.1 GB) `llama cli -hf lmstudio-community/codegemma-7b-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 (v1.0) (Q4_K_M, needs ~5.3 GB, from [huggingface.co/lmstudio-community](https://huggingface.co/lmstudio-community/codegemma-7b-GGUF/tree/215cae4d4fdd2d21552b3f88af57f2c2823d5f1e)) ```sh lms get https://huggingface.co/lmstudio-community/codegemma-7b-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-GGUF@Q8_0 -y` · 4bit (~5.9 GB, Mac only) `lms get https://huggingface.co/mlx-community/codegemma-7b-4bit -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 (v1.0) (Q4_K_M, needs ~5.3 GB, from [ollama.com](https://ollama.com/library/codegemma/tags)) ```sh ollama run codegemma:7b-code-q4_K_M ``` Other versions: Q8_0 (~9.1 GB) `ollama run codegemma:7b-code-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 (v1.0) (4bit, needs ~5.9 GB, Mac only, from [huggingface.co/mlx-community](https://huggingface.co/mlx-community/codegemma-7b-4bit/tree/7e280d9b4f8bae62e07447d0b2a08cba74ab5400)) ```sh mlx_lm.chat --model mlx-community/codegemma-7b-4bit ``` 3. Or start an OpenAI-compatible server at http://localhost:8080/v1 ```sh mlx_lm.server --model mlx-community/codegemma-7b-4bit ``` Model repository and documentation: [huggingface.co/google](https://huggingface.co/google/codegemma-7b) [interactive version](https://whatmodel.sh/model/codegemma-7b) · [JSON](https://whatmodel.sh/api?format=json&all=1)