StarCoder2
BigCode's StarCoder2 generation. 3B/7B/15B for code completion. Supports fill-in-middle and 600+ programming languages.
Best for code completion (VS Code, JetBrains)
Sizes 3B · 7B · 15B
Context 16K
License BigCode Open RAIL-M
Min VRAM (default size, Q4) 3 GB
Rec VRAM 8 GB
What is StarCoder2?
StarCoder2 is BigCode's open-weights language model. Released in 2024-02, it ships in 3 sizes (3B, 7B, 15B) and is licensed BigCode Open RAIL-M. The most popular use case is code completion (VS Code, JetBrains).
VRAM and hardware
The smallest 3B size needs at least 3 GB VRAM; the largest 15B needs around 3 GB.
| Size | Min VRAM (Q4_K_M) | Recommended VRAM | Tokens/sec on 3090 |
|---|---|---|---|
| 3B | 3 GB | 5 GB | ~28 tok/s |
| 7B | 5 GB | 8 GB | ~25 tok/s |
| 15B | 10 GB | 15 GB | ~21 tok/s |
How to run StarCoder2 locally
Option 1: Ollama (simplest)
ollama pull starcoder2
ollama run starcoder2 Option 2: Mullama (production)
mullama pull starcoder2
mullama run starcoder2 Option 3: llama.cpp (CLI)
# Download a GGUF from Hugging Face (search "starcoder2 gguf")
./llama-cli -m starcoder2.Q4_K_M.gguf -p "Hello, AI!" Option 4: Python with Mullama or llama-cpp-python
from mullama import Model, Context
model = Model.load("starcoder2.Q4_K_M.gguf", n_gpu_layers=99)
ctx = Context(model, n_ctx=4096)
print(ctx.generate("Hello, AI!", 256)) What you can build with StarCoder2
- code completion
- fill-in-middle
- VS Code extensions
Hardware it fits on
- Apple Silicon (8GB): 3B in MLX
- Apple Silicon (16GB): 7B in MLX
- Apple Silicon (32GB): 15B in MLX or GGUF
- Apple Silicon (64GB+): 15B in MLX
- RTX 3090 (24GB): 15B at Q4_K_M
- RTX 4090 (24GB): same as 3090, ~30% faster
- RTX 5090 (32GB): 15B at Q8_0
- 2× RTX 6000 Ada (96GB total): 15B at Q4_K_M
Related models in the StarCoder family
This is the only StarCoder-family model in the catalog right now.
Other models you might consider
- Llama 3.1 (Meta) — 8B, general-purpose chat, agentic workflows, code
- Llama 3.2 (Meta) — 1B, low-end hardware, mobile, edge deployment
- Llama 3.2 Vision (Meta) — 11B, vision + chat on desktop GPUs
- Llama 3.3 (Meta) — 70B, best-in-class 70B for desktops
- Llama 4 (Meta) — Scout 17B (109B MoE), vision + long context (10M tokens)
- Qwen 2.5 (Alibaba) — 0.5B, strongest 7B-32B on consumer hardware