Written by Jakub Rusinowski · Last updated February 28, 2024
Model library → StarCoder 2 → StarCoder 2 15B
The flagship StarCoder model. HumanEval score of 46.4%, beating many larger general-purpose models on code tasks. Excellent at generating and explaining complex code in 600+ languages.
StarCoder 2 15B needs about 10 GB of VRAM at Q4_K_M — quantized weights plus framework overhead, before any KV cache. On Apple Silicon that figure comes out of unified memory.
| Parameters | 15 Billion |
| Context window | 16,384 |
| Architecture | Dense |
| Provider | BigCode |
| Licence | BigCode Open RAIL-M v1 |
| Specified at | Q4_K_M |
| System RAM | 24 GB |
| Record updated | 2024-02-28 |
BigCode OpenRAIL-M — commercial use permitted. Weights are downloadable and commercial use is permitted, subject to the licence’s acceptable-use terms.
Modelled on a reference NVIDIA RTX 4090 (24 GB), at 8K context. Speed figures are ESTIMATES from the memory-bandwidth roofline described on the methodology page, not benchmarks we ran — rows marked measured come from published or reader-submitted runs. VRAM here includes the KV cache, so it reads higher than the headline figure above, which does not.
| Quant | Weights | VRAM needed | Est. speed | Fit on 24 GB |
|---|---|---|---|---|
| Q2_K | 5.1 GB | 6.6 GB | ~106 tok/s (est.) | Fits comfortably |
| Q3_K_M | 6.6 GB | 8.1 GB | ~87 tok/s (est.) | Fits comfortably |
| Q4_K_M | 9.4 GB | 10.8 GB | ~66 tok/s (est.) | Fits comfortably |
| Q5_K_M | 11.0 GB | 12.5 GB | ~58 tok/s (est.) | Fits comfortably |
| Q6_K | 12.7 GB | 14.2 GB | ~51 tok/s (est.) | Fits comfortably |
| Q8_0 | 16.5 GB | 17.9 GB | ~41 tok/s (est.) | Fits comfortably |
| F16 | 31.0 GB | 32.5 GB | ~3 tok/s (est.) | Offloads to system RAM (slow) |
Want the memory numbers alone, at every quantization level and your own context length? Use the StarCoder 2 15B VRAM calculator.
or compare on Vast.ai from $0.35/hr (typical low · varies)
As an Amazon Associate we earn from qualifying purchases. Cloud GPU links are referral links — we may earn a commission at no extra cost to you.
The cheapest catalogued GPU that runs StarCoder 2 15B is the Intel Arc B570 (10 GB).
Install Ollama, then run:
ollama run starcoder2:15b
Weights on Hugging Face: bigcode/starcoder2-15b.
Best for: coding agent, code review, dev work.
← All StarCoder 2 models | VRAM calculator | Check your own hardware