[whatmodel.sh](../../README.md) / StarCoderBase 7B # StarCoderBase 7B BigCode · released 2023-07 · 7.53B params · bigcode-openrail-m **score 32.7** ±0.7 · #646 of 732 · from 16 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 StarCoderBase 7B among every model on that task or test, worst to best.
task    vs the others         rank  counts  tests
coding  ▁▁▁●▅▇█▇▅▄▃▁   #444 of 469     94%      9
math    ▁▁●▅█▆▄█▄▂▁▁   #394 of 431    5.9%      2
coding · #444 of 469 · 94% of its score Beats [Qwen3.5 2B](qwen3-5-2b.md), [Molmo 7B-D (0924)](molmo-7b-d.md), [Tulu 2 7B](tulu-2-7b.md) here, though they rank higher overall. Trails [Granite 3.0 1B-A400M Instruct](granite-3-0-1b-a400m.md), [Llama 3.2 1B Instruct](llama-3-2-1b.md) here, though they rank lower overall.
test                                result  vs the others in its run  difficulty        counts  why
HumanEval                            24.4%  ▁·▁▁●▄▆▅█▃▁▁ beats 8/99   easy · avg 76%       40%  sharp · at its level · several runs
HumanEval+                           21.3%  ▁·▁▁▁●▄▄▄█▃▁ beats 10/99  easy · avg 70%       21%  sharp
MBPP                                 34.8%  █·●▃▃▃▅▃▃▅·▅ beats 3/15   easy · avg 81%       10%  at its level · several runs
HumanEvalSynthesize (HumanEvalPac…   26.7%  ▁·▂▁●▆▅█▄▄▁▂ beats 4/35   medium · avg 62%    6.3%  at its level
CRUXEval-I                           29.7%  ▁··▁●▂█▇▁··▁ beats 3/22   medium · avg 56%    4.5%  at its level · several runs
CRUXEval-O                           32.2%  ▁·▂●▁█▁▂···▁ beats 3/22   medium · avg 54%    4.0%  blunt · at its level · several runs
DS-1000 (maker)                      19.1%  ▄▄·●██▄█·█·▄ beats 2/12   medium · avg 49%    3.6%  typical
HumanEvalExplain (HumanEvalPack, …   14.8%  ▄▇●▃▄▇▄▁▇▃·▁ beats 8/35   medium · avg 46%    3.0%  typical
HumanEvalFix (HumanEvalPack, 6-la…   12.5%  ▁·▁▁▄●█▄█▁▅▅ beats 9/35   medium · avg 51%    2.2%  sharp
math · #394 of 431 · 5.9% of its score Beats [Yi 34B Chat](yi-34b-chat.md), [Command R (03-2024)](command-r-03-2024.md), [DeepSeek LLM 67B Chat](deepseek-llm-67b-chat.md) here, though they rank higher overall. Trails [GPT-Neo 125M](gpt-neo-125m.md), [GPT-2 XL (1.5B)](gpt-2-xl.md), [GPT-Neo 1.3B](gpt-neo-1-3b.md) here, though they rank lower overall.
test           result  vs the others in its run  difficulty        counts  why
GSM8K (maker)   14.9%  ▄▄●·▄█·██·█▄ beats 2/12   easy · avg 75%      4.9%  sharp · several runs
MATH             2.4%  ●·▃····▃···█ beats 0/5    medium · avg 37%    1.0%  noisy
## 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…        2   50% ▇▇▇▇▇▇
StarCoder 2 and The Stack v2: The Next …        4   24% ▇▇▇
Granite Code Models: A Family of Open F…        8   24% ▇▇▇
CRUXEval published evaluation results           2    3% ▇
prior: pull toward the middle                        0% ▇
weighted average                                   = 32.7
Licences: EvalPlus / EvalPerf published evaluation runs ([Apache-2.0](../../licenses/evalplus-published-runs-Apache-2.0.txt)) · StarCoder 2 and The Stack v2: The Next Generation ([CC BY-SA 4.0](../../licenses/paper-2402.19173v1-CC-BY-SA-4.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)) · CRUXEval published evaluation results ([MIT](../../licenses/cruxeval-published-results-MIT.txt)) ## How to run it ### Ollama (recommended) 1. Install Ollama. [Download it (macOS / Windows)](https://ollama.com/download) ```sh # Linux curl -fsSL https://ollama.com/install.sh | sh ``` 2. Run StarCoderBase 7B (Q4_0, needs ~4.3 GB, from [ollama.com](https://ollama.com/library/starcoder/tags)) ```sh ollama run starcoder:7b ``` Other versions: Q4_0 (~4.3 GB) `ollama run starcoder:7b` ### Other ways to run it 1. Run it as published (fp32, needs ~30.11 GB, from [huggingface.co/bigcode](https://huggingface.co/bigcode/starcoderbase-7b/tree/94e20e98e189b1d6dccd56e932667bd85cc7c393)) ```sh uv run --with torch --with 'transformers<5' --with accelerate python -c "from transformers import pipeline; print(pipeline('text-generation', model='bigcode/starcoderbase-7b', torch_dtype='auto', device_map='auto')('def print_hello_world():', max_new_tokens=40)[0]['generated_text'])" ``` Model repository and documentation: [huggingface.co/bigcode](https://huggingface.co/bigcode/starcoderbase-7b) [interactive version](https://whatmodel.sh/model/starcoderbase-7b) · [JSON](https://whatmodel.sh/api?format=json&all=1)