whatmodel.sh / StarCoder2 7B
StarCoder2 7B
↗ share
+ contribute
StarCoder2 7B is an open-weights language model from BigCode, released February 2024. Its published size is 7.17B parameters and a 16k-token context window. Licence: bigcode-openrail-m.
Catalogue identity notes
Maker repo bigcode/starcoder2-7b @bb9afde: licence tag bigcode-openrail-m. 7,173,923,840 parameters from the Hugging Face safetensors metadata (dense, so active = total). Released 2024-02: month the maker's Hugging Face repo was created (createdAt 2024-02-20). Base model. Ollama tags starcoder2:7b-q4_K_M, starcoder2:7b-q8_0 (sizes as listed on the tags page, observed 2026-09-29).
$ how it compares
The LLMs ranked either side of StarCoder2 7B, out of 828 with a score, then more from BigCode.
| # | model | score | where | ||
|---|---|---|---|---|---|
| 696 | 35±3 | local | |||
| 697 | 35±1 | local | |||
| 698 | 35±1 | local | |||
| 699 | 35±1 | local | |||
| 700 | 35±2 | local | |||
| more from BigCode | |||||
| 521 | 46±1 | local | |||
| 639 | 39±1 | local | |||
| 701 | 35±1 | local | |||
$ what it's good at
coding▁▁▁▃▆██▇▆▄▃▁ #413 of 458 · 87% of its score · 9 tests
Beats DeepSeek R1 Distill Qwen 7B, Qwen3.5 2B, DeepSeek R1 Distill Llama 8B here, though they rank higher overall. Trails Llama 3.2 1B Instruct, SmolLM2 1.7B Instruct, Granite 3B Code Base (2K) here, though they rank lower overall.
| test | result | vs the others in its run | counts |
|---|---|---|---|
| HumanEval +2 | 35.4% ✎ | ▁·▁▁▃▄▆▅█▃▁▁ beats 21/99 | 47% |
| HumanEval+ | 29.9% ✎ | ▁·▁▁▁▃▄▄▄█▃▁ beats 20/99 | 17% |
| MBPP +1 | 45.4% ✎ | █·▅▃▃▃▅▃▃▅·▅ beats 11/15 | 6.2% |
| HumanEvalSynthesize (HumanEvalPack, 6-language average) | 37.4% ✎ | ▁·▂▁▂▆▅█▄▄▁▂ beats 14/35 | 4.6% |
| CRUXEval-I +1 | 34.2% ✎ | ▃▅█▃▃▅·▃▃▅·▅ beats 7/15 | 2.8% |
| DS-1000 lab | 27.8% ✎ | ▄▄·▄██▄█·█·▄ beats 8/12 | 2.8% |
| HumanEvalExplain (HumanEvalPack, 6-language average) | 13.5% ✎ | ▄▇█▃▄▇▄▁▇▃·▁ beats 6/35 | 2.5% |
| CRUXEval-O +1 | 35.8% ✎ | ▃·▃██▅▃·▃▃▅▃ beats 8/15 | 2.3% |
1 more test
| test | result | vs the others in its run | counts |
|---|---|---|---|
| HumanEvalFix (HumanEvalPack, 6-language average) | 8.9% ✎ | ▁·▁▁▄██▄█▁▅▅ beats 4/35 | 2.1% |
math▁▂▃▅▆▅▄█▄▁▁▁ #358 of 398 · 3.6% of its score · 2 tests
Beats Yi 34B Chat, Llama 3 8B Instruct, Command R (03-2024) here, though they rank higher overall. Trails Gemma 3 1B, Stable Code 3B, Qwen3 0.6B here, though they rank lower overall.
other tests2 not in a task · 9.1% of its score
| test | result | vs the others in its run | counts |
|---|---|---|---|
| EvoEval (overall) | 25.0% ✎ | ▂▂▃▄▄█▁▄▅▃▁▃ beats 9/42 | 6.3% |
| BigCodeBench (Complete) lab | 28.5% ✎ | ▂▁▁▄▂▅▇█▆▂▂▂ beats 7/58 | 2.7% |
$ 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 StarCoder2 7B · needs ~4.4 GB · from huggingface.co/second-statechat in the terminal
llama cli -hf second-state/StarCoder2-7B-GGUF:Q4_K_M - Or start a local server and open the address it prints (http://localhost:9931)
llama serve -hf second-state/StarCoder2-7B-GGUF:Q4_K_M
LM Studio
version
- Install LM Studio · Open the app once before using the lms command.
- Run StarCoder2 7B · needs ~4.4 GB · from huggingface.co/second-state
- Or download it in the terminal
lms get https://huggingface.co/second-state/StarCoder2-7B-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 StarCoder2 7B · needs ~4.4 GB · from ollama.comchat in the terminal
ollama run starcoder2:7b-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 StarCoder2 7B · needs ~4.4 GB, Mac only · from huggingface.co/mlx-communitychat in the terminal
mlx_lm.chat --model mlx-community/starcoder2-7b-4bit - Or start an OpenAI-compatible server at http://localhost:8080/v1
mlx_lm.server --model mlx-community/starcoder2-7b-4bit
Official weights and documentation: huggingface.co/bigcode ↗
$ how the score was worked out · EvalPlus / EvalPerf published… 42%, Top Leaderboard Ranking = Top… 20%, StarCoder 2 and The Stack v2:… 18% and 2 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 |
|---|---|---|
| 2 | 42% | |
| 2 | 20% | |
| 6 | 18% | |
| 8 | 17% | |
| 1 | 3% | |
| prior · pull toward the middle | 0% | |
| weighted average | = 34.8 |
$ 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