StarCoder 2 15B: Technical Analysis & Performance Guide
StarCoder2 15B is BigCode's open code-completion model from February 2024. On Ollama, starcoder2:15b is a 9.1 GB download and needs about 11.4 GB of VRAM with its full 16K context, so it runs on a 12 GB graphics card. It was trained on more than 600 programming languages. It completes code; it is not a chat model. This page has not benchmarked it, and every figure is taken from BigCode, Hugging Face or Ollama.
Updated: September 29, 2026
What hardware does StarCoder2 15B run on?
A 12 GB card runs the default tag. A 16 GB card runs q4_K_M through q6_K. A 24 GB card runs q8_0. No 15B file fits an 8 GB card with the full context, so on 8 GB use the 7B or 3B model.
“VRAM needed” is the file size, plus the key-value cache for the whole 16,384-token context, plus 1 GB for compute buffers. The cache comes from config.json: 40 layers × 4 key-value heads × 128 dimensions × 2 (keys and values) × 2 bytes = 81,920 bytes per token, which is 1.34 GB at full context. Grouped-query attention is why that number is small for a 15B model.
| Ollama tag | Ollama download | GGUF file | VRAM needed (16K context) | Fits |
|---|---|---|---|---|
15b-q2_K | 6.2 GB | 6.19 GB | 8.5 GB | 12 GB card. Just over the limit for 8 GB. |
15b-q3_K_M | 8.1 GB | 8.10 GB | 10.4 GB | 12 GB card |
15b (default, q4_0) | 9.1 GB | 9.07 GB | 11.4 GB | 12 GB card, with little headroom |
15b-q4_K_M | 9.9 GB | 9.86 GB | 12.2 GB | 16 GB card |
15b-q5_K_M | 11 GB | 11.43 GB | 13.8 GB | 16 GB card |
15b-q6_K | 13 GB | 13.10 GB | 15.4 GB | 16 GB card, with little headroom |
15b-q8_0 | 17 GB | 16.97 GB | 19.3 GB | 24 GB card |
15b-fp16 | 32 GB | not in the GGUF repository | 34.3 GB | 48 GB |
BigCode's model card prints its own memory footprints for the Transformers library, which land in the same range: 32,251 MB at bfloat16, 16,900 MB in 8-bit and 9,225 MB in 4-bit.
With no GPU, Ollama loads the model into system RAM, so a machine with 16 GB of RAM can hold the 9.1 GB tag. Completion speed on a processor depends on the machine and has not been measured here. For as-you-type completion on modest hardware, the smaller models below are the usual choice; see best local autocomplete models.
What StarCoder2 is
StarCoder2 is a family of code models from the BigCode project, described in the paper StarCoder 2 and The Stack v2: The Next Generation, submitted on February 29, 2024. The 15B model is the largest of the three.
| Spec | StarCoder2 15B |
|---|---|
| Parameters | 15B (15.96B in the weights file) |
| Architecture | Transformer decoder, 40 layers, grouped-query attention |
| Context window | 16,384 tokens, with sliding-window attention of 4,096 tokens |
| Training data | The Stack v2, 600+ programming languages, 4+ trillion tokens |
| Training objective | Fill-in-the-Middle |
| Training hardware | 1024 × H100 (NVIDIA Eos) |
| Licence | BigCode OpenRAIL-M v1 |
The point that matters most in use is on the model card: StarCoder2 is “not an instruction model and commands like ‘Write a function that computes the square root.’ do not work well.” You give it the start of some code, or the code around a gap, and it continues. That is the job an editor's autocomplete does.
For instructions, BigCode published a separate fine-tune, StarCoder2-15B-Instruct-v0.1, in April 2024. Its card says it is designed for “coding-related instructions in a single turn” and was tuned mainly on Python tasks. On Ollama it is starcoder2:instruct.
StarCoder2 model sizes: 3B, 7B and 15B
| Model | Languages | Training tokens | Ollama tag | Download |
|---|---|---|---|---|
| StarCoder2 3B | 17 | 3+ trillion | starcoder2:3b | 1.7 GB |
| StarCoder2 7B | 17 | 3.5+ trillion | starcoder2:7b | 4.0 GB |
| StarCoder2 15B | 600+ | 4+ trillion | starcoder2:15b | 9.1 GB |
All three share the 16,384-token context. The language count is the practical difference: if you work in a language outside the 17 the smaller models were trained on, the 15B is the one that has seen it. Figures are from the three model cards on Hugging Face.
Ollama tags and install
ollama pull starcoder2 with no tag downloads the 3B model, not the 15B. Name the size you want.
# StarCoder2 15B, q4_0, 9.1 GB (completion model)
ollama pull starcoder2:15b
# StarCoder2 15B Instruct v0.1, q4_0, 9.1 GB (takes instructions)
ollama pull starcoder2:instruct
# Higher-quality quantisation for a 24 GB card, 17 GB
ollama pull starcoder2:15b-q8_0- Every 15B tag lists a 16K context on Ollama, matching the model card.
- Instruct tags are named
15b-instruct-v0.1-followed by the quantisation, at the same sizes as the base tags. - No tool calling. The Ollama library page has no tools badge, so agent frameworks that send tool definitions will be refused.
To use it for completion inside an editor, the Continue + Ollama setup guide walks through pointing an autocomplete provider at a local model. Full tag list: ollama.com/library/starcoder2/tags.
StarCoder2 benchmarks, as reported by BigCode
These scores are from the metadata of the two model cards. They are the publisher's figures and this site has not reproduced them. A dash means the card gives no figure.
| Benchmark | StarCoder2 15B (base) | StarCoder2 15B Instruct v0.1 |
|---|---|---|
| HumanEval (pass@1) | 46.3 | 72.6 |
| HumanEval+ (pass@1) | 37.8 | 63.4 |
| MBPP (pass@1) | – | 75.2 |
| MBPP+ (pass@1) | – | 61.2 |
| DS-1000 (pass@1) | 33.8 | 40.6 |
| LiveCodeBench, code generation (pass@1) | – | 20.4 |
| RepoBench v1.1 (edit similarity) | 74.08 | – |
| CruxEval-I (pass@1) | 48.1 | – |
The base model's HumanEval score looks low beside chat models because HumanEval asks for a function from a description, which is the instruction-style task the base model was not built for. RepoBench, which measures completing code inside a repository, is closer to what it does. Sources: base model card, Instruct model card.
StarCoder2 licence
All three sizes and the Instruct fine-tune are under the BigCode OpenRAIL-M v1 licence agreement. It is not Apache 2.0 or MIT: it is a responsible-use licence that attaches use restrictions to the model. Read the agreement before building a product on the weights.
The model card adds a separate caution about output. The training data was filtered to permissively licensed and unlicensed code, but the model “can generate source code verbatim from the dataset”, and that code's own licence may require attribution. BigCode provides a search index for checking where a generated snippet came from.
Is it still worth running?
This section is opinion. StarCoder2 dates from February 2024, and newer open coding models cover both completion and chat in one download. For a current shortlist see best local autocomplete models and the Ollama coding-model guide; Qwen 2.5 Coder 14B is the closest newer model in this size class.
Two things still set the 15B apart: the breadth of its training languages, and a training set built with opt-out requests excluded and a public index for tracing output. If either matters to you, it remains a reasonable completion model for a 12 GB or 16 GB card. People working almost entirely in Python sometimes compare it with WizardCoder Python 34B, and the DeepSeek Coder V2 16B is a chat-capable model at nearly the same download size.
Frequently asked questions
How big is starcoder2:15b on Ollama?
9.1 GB for the default q4_0 tag. Other 15B tags run from 6.2 GB (q2_K) to 32 GB (fp16).
When was StarCoder2 released?
The paper was submitted on February 29, 2024 and the 15B repository on Hugging Face was created on February 20, 2024. The Instruct fine-tune followed in April 2024.
Can I chat with StarCoder2 15B?
Not with the base model, which only continues code. Use starcoder2:instruct for single-turn coding instructions, or a chat model for conversation.
Where is the StarCoder2 source code?
At github.com/bigcode-project/starcoder2, which holds the quick-start and fine-tuning scripts. The weights are on Hugging Face.
Sources
- StarCoder2-15B model card: architecture, training data, memory footprints, licence
- StarCoder 2 and The Stack v2 (arXiv:2402.19173)
- bigcode-project/starcoder2 on GitHub
- Ollama tag list for starcoder2
- second-state GGUF files: the file sizes in the hardware table
Build Real AI on Your Machine
RAG, agents, NLP, vision, and MLOps - chapters across 25 courses that take you from reading about AI to building AI.
Related Guides
Continue your local AI journey with these comprehensive guides
Go from reading about AI to building with AI
25 structured courses. Hands-on projects. Runs on your machine. Start free.

Written by
Barsha Mohapatra
Founder and Editor, Local AI Master · Founder, Little AI Master
Founder of Little AI Master and the editor behind every course and guide on Local AI Master. Years of tutoring students taught her where AI education actually fails.
- PILLARLocal AI Models Directory: Every Model Compared
- Alpaca 7B: Stanford\
- Amazon Chronos: Time Series Forecasting Models (Complete Guide)
- Anima 2.9B on 8GB: The Anime Model Taking Over Civitai
- Aquila 7B by BAAI: Chinese-English Bilingual (FlagAI)
- Baichuan2-13B: Chinese LLM | 59% CMMLU, Bilingual, Free License 2026
- Bark by Suno AI: Open-Source Text-to-Audio Generation Guide
- ChatGLM3-6B: Tsinghua Chinese AI | Code Interpreter, 6GB RAM 2026
- Claude 3 Opus Review: Benchmarks, Pricing & API Guide 2026
- Claude 3 Sonnet Review: Benchmarks, API Pricing & Alternatives 2026
Grab the AI Starter Kit — career roadmap, cheat sheet, setup guide
No spam. Unsubscribe with one click.
Found your model? Now build something with it.
25 hands-on courses — RAG, agents, fine-tuning — all running locally. First chapter free, no card.