StarCoder 2 7B — VRAM, speed & local setup
Written by Jakub Rusinowski · Last updated
The sweet spot for code generation. Strong multi-language support, good at completing complex functions. Works well on 8GB VRAM GPUs as a lightweight coding assistant.
StarCoder 2 7B needs about 5 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.
VRAM and speed by quantization
Quoted against NVIDIA RTX 4090 (24 GB). Includes the KV cache at 8K context, so it reads higher than the headline figure.
| Quant | Memory | VRAM | Speed (est.) | Fit |
|---|---|---|---|---|
| Q2_K 2.63 bpw | 3.7 GB | ~174 tok/s | Fits | |
| Q3_K_M 3.41 bpw | 4.4 GB | ~150 tok/s | Fits | |
| Q4_K_M 4.83 bpw | 5.7 GB | ~120 tok/s | Fits | |
| Q5_K_M 5.67 bpw | 6.4 GB | ~107 tok/s | Fits | |
| Q6_K 6.56 bpw | 7.2 GB | ~96 tok/s | Fits | |
| Q8_0 8.50 bpw | 9 GB | ~79 tok/s | Fits | |
| F16 16.00 bpw | 15.7 GB | ~46 tok/s | Fits |
Black marker = usable memory on the NVIDIA RTX 4090 (24 GB). Estimates from the memory-bandwidth roofline on the methodology page. StarCoder 2 7B VRAM calculator →
Get StarCoder 2 7B running
The cheapest catalogued GPU that runs StarCoder 2 7B is the Intel Arc B570 (10 GB).
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.
How to run StarCoder 2 7B
Install Ollama, then run:
ollama run starcoder2:7bSpecifications
Curated — A hand-written entry from before this catalogue recorded its sources. The figures are long-standing but their provenance is not on file.
- Parameters
- 7 Billion
- Context window
- 16,384
- Architecture
- Dense
- Provider
- BigCode
- Licence
- BigCode Open RAIL-M v1
- Practical deployment
- Edge device (phone, SBC)
- Specified at
- Q4_K_M
- System RAM
- 16 GB
- Record updated
- 2024-02-28
Weights are downloadable and commercial use is permitted, subject to the licence’s acceptable-use terms.
Quality and use cases
Scores as published by the model’s authors or an independent evaluator — quality, not throughput, and not measured by us.
Can I run StarCoder 2 7B on my GPU?
- StarCoder 2 7B on AMD Radeon RX 7800 XT
- StarCoder 2 7B on AMD Radeon RX 7900 XT
- StarCoder 2 7B on AMD Radeon RX 9060 XT 16GB
- StarCoder 2 7B on AMD Radeon RX 9060 XT 8GB
- StarCoder 2 7B on AMD Radeon RX 9070
- StarCoder 2 7B on AMD Radeon RX 9070 XT
- StarCoder 2 7B on Apple M1
- StarCoder 2 7B on Intel Arc B570
- StarCoder 2 7B on Intel Arc B580
- StarCoder 2 7B on NVIDIA GeForce RTX 3060 (12GB)
- StarCoder 2 7B on NVIDIA GeForce RTX 3070
- StarCoder 2 7B on NVIDIA GeForce RTX 3070 Ti
- StarCoder 2 7B on NVIDIA GeForce RTX 3080 (10GB)
- StarCoder 2 7B on NVIDIA GeForce RTX 4060
- StarCoder 2 7B on NVIDIA GeForce RTX 4060 Ti 16GB
- StarCoder 2 7B on NVIDIA GeForce RTX 4070
- StarCoder 2 7B on NVIDIA GeForce RTX 4070 Super
- StarCoder 2 7B on NVIDIA GeForce RTX 4070 Ti
- StarCoder 2 7B on NVIDIA GeForce RTX 4070 Ti Super
- StarCoder 2 7B on NVIDIA GeForce RTX 4080
- StarCoder 2 7B on NVIDIA GeForce RTX 4080 Super
- StarCoder 2 7B on NVIDIA GeForce RTX 5060
- StarCoder 2 7B on NVIDIA GeForce RTX 5060 Ti 16GB
- StarCoder 2 7B on NVIDIA GeForce RTX 5060 Ti 8GB
- StarCoder 2 7B on NVIDIA GeForce RTX 5070
- StarCoder 2 7B on NVIDIA GeForce RTX 5070 Ti
- StarCoder 2 7B on NVIDIA GeForce RTX 5080
Other StarCoder 2 sizes
StarCoder 2 7B — frequently asked questions
How much VRAM does StarCoder 2 7B need?
About 5 GB at Q4_K_M — quantized weights plus framework overhead, before any KV cache. The cache grows with context length and is added on top; the table above folds it in. Apple Silicon counts unified memory toward the same figure.
Does StarCoder 2 7B run on an RTX 4090 (24 GB)?
Yes. StarCoder 2 7B needs about 5 GB at Q4_K_M, inside a 24 GB card, at an estimated 120 tokens/sec.
How do I run StarCoder 2 7B locally?
Install Ollama and run `ollama run starcoder2:7b`. That pulls the weights and starts a local OpenAI-compatible endpoint; after the download nothing leaves the machine.
What other sizes does StarCoder 2 come in?
StarCoder 2 3B (3 GB), StarCoder 2 7B (5 GB), StarCoder 2 15B (10 GB). Every size shares the family's training and licence; the larger ones score higher and need proportionally more memory.