StarCoder2 15B
15BBigCode
⚠ Superseded · Prefer Qwen2.5-Coder 7B Instruct
This index would suggest Qwen2.5-Coder 7B Instruct instead today — longer context (16K → 128K tokens). The numbers below are still accurate; they are just for a model you probably should not start with. Compare the two →
BigCode's open code model trained on 600+ languages. Great for polyglot dev.
16K
Max Context
2
Quant Variants
GGUF Q4_K_M
Best Quality
96.8%
Accuracy Retained
Quantization Variants
Per-quant VRAM, quality loss, and inference speed on RTX 4090
Measured = site benchmarks · Estimated = formula · Community = public reports
Similar models
Compare with Qwen2.5 14BQwen2.5 14B Instruct
Alibaba Qwen2.5
The sweet spot between performance and resource usage. 16GB VRAM with Q4.
DeepSeek-Coder-V2-Lite Instruct
DeepSeek
MoE architecture coding model. Active params ~2.4B, total ~16B. Exceptional code quality.
DeepSeek-R1-Distill-Qwen-14B
DeepSeek
R1 reasoning distilled into 14B. Huge community interest; excellent chain-of-thought.
Phi-3 Medium 14B Instruct
Microsoft Phi
Microsoft's mid-size Phi-3. Excellent quality-per-GB on 16GB cards.
Running StarCoder2 15B locally
At Q4_K_M and 4K of context, StarCoder2 15B needs about 10.2 GB — 8.6 GB of weights, 0.63 GB of KV cache and a 0.9 GB activation buffer. The smallest card in this index that clears that comfortably is the RTX 5070 at 12 GB, and 55 of the 63 cards here do. These are calculated figures, not measurements: the estimate stops counting a card as comfortable at 88% of its VRAM, which is roughly the room a desktop session needs.
What longer context costs
Going from 4K to 32K adds about 4.37 GB, taking the total to 15.0 GB. Weights do not move with context — only the KV cache does, and it grows linearly, so this is the number to watch when planning for long documents. The model's native window is 16K; holding all of it at Q4_K_M would need about 12 GB.
Which build to download
This index tracks 2 formats for it — GGUF, GPTQ — across 2 levels. Q4_K_M carries the lowest published perplexity loss at 3.2%. The fastest level measured here is GPTQ INT4 at 115 tok/s on an RTX 4090, batch 1. GGUF runs on llama.cpp and Ollama across NVIDIA, AMD and Apple silicon; AWQ and GPTQ target vLLM on CUDA and ROCm; EXL2 is ExLlamaV2 and CUDA only.
Common questions
- How much VRAM does StarCoder2 15B need?
- About 10.2 GB at Q4_K_M with 4K of context and batch 1, rising to roughly 15.0 GB at 32K. That figure is weights plus KV cache plus a 10% activation buffer, calculated from the model's architecture rather than measured on a card.
- Will StarCoder2 15B run on a 12GB GPU?
- Yes — at Q4_K_M and 4K context it needs about 10.2 GB, which leaves 1.8 GB spare on a RTX 5070. That is the smallest card in this index that clears it comfortably; 55 of 63 do.
- Which quantization of StarCoder2 15B should I use?
- Q4_K_M has the lowest published quality loss (3.2%), and Q4_K_M is the level most people run. All 2 levels in the index are Q4_K_M, GPTQ INT4.
Where this model fits
Sized at Q4_K_M with a 4K context window, smallest card first. Comfortable means the estimate uses at most 88% of the memory.
- Runs comfortably on
- RTX 507012GB · +1.8RTX 4070 Ti12GB · +1.8RTX 4070 Super12GB · +1.8RTX 407012GB · +1.8RTX 3080 Ti12GB · +1.8
- Tight but possible
- RTX 3080 10G10GB
- Just misses
- RTX 3070+2.2GB overMac M3 8G+4.2GB over
- Compared here
- GGUF vs GPTQ
- Try it yourself
- Size it in the calculatorGenerate the run command
How to actually run this
Deployment guides for this model and this class of hardware.
This page's figures change when the model or the runtime does.Last updated 2026-09-21 RSS → /feed.xml