Written by Jakub Rusinowski · Last updated February 28, 2024
Model library → StarCoder 2 → StarCoder 2 3B
Tiny but capable code completion model. Best used as a coding copilot in your editor via continue.dev or similar. Excellent for autocomplete with minimal VRAM.
StarCoder 2 3B needs about 3 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 | 3 Billion |
| Context window | 16,384 |
| Architecture | Dense |
| Provider | BigCode |
| Licence | BigCode Open RAIL-M v1 |
| Specified at | Q4_K_M |
| System RAM | 8 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 | 1.0 GB | 2.0 GB | ~269 tok/s (est.) | Fits comfortably |
| Q3_K_M | 1.3 GB | 2.3 GB | ~244 tok/s (est.) | Fits comfortably |
| Q4_K_M | 1.8 GB | 2.9 GB | ~208 tok/s (est.) | Fits comfortably |
| Q5_K_M | 2.1 GB | 3.2 GB | ~191 tok/s (est.) | Fits comfortably |
| Q6_K | 2.5 GB | 3.5 GB | ~176 tok/s (est.) | Fits comfortably |
| Q8_0 | 3.2 GB | 4.2 GB | ~151 tok/s (est.) | Fits comfortably |
| F16 | 6.0 GB | 7.1 GB | ~97 tok/s (est.) | Fits comfortably |
Want the memory numbers alone, at every quantization level and your own context length? Use the StarCoder 2 3B 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 3B is the Intel Arc B570 (10 GB).
Install Ollama, then run:
ollama run starcoder2:3b
Weights on Hugging Face: bigcode/starcoder2-3b.
Best for: code completion, editor plugin, low vram.
← All StarCoder 2 models | VRAM calculator | Check your own hardware