Hugging Face · starcoder2
Can I run starcoder2?
StarCoder2 is the next generation of transparently trained open code LLMs that comes in three sizes: 3B, 7B and 15B parameters.
Parameter counts and memory belong to each build below. A family can contain several sizes and tasks; fitting in memory is not a quality ranking.
Calculate memory for a build and contextstarcoder2 system requirements
Memory needed at 4K context, counting model weights, KV cache, compute buffers and runtime overhead. Download sizes come from the official Ollama registry.
| Build | Quantization | Download | Memory needed |
|---|---|---|---|
| starcoder2:3b3B parameters (tag)16K documented maximum contextBuild sourceCatalog checked 2026-10-13 | Q4_0 | 1.6 GB | ~2.2 GB |
| starcoder2:3b-q4_K_M3B parameters (tag)16K documented maximum contextBuild sourceCatalog checked 2026-10-13 | Q4_K_M | 1.7 GB | ~2.4 GB |
| starcoder2:3b-q5_K_M3B parameters (tag)16K documented maximum contextBuild sourceCatalog checked 2026-10-13 | Q5_K_M | 2.0 GB | ~2.7 GB |
| starcoder2:3b-q6_K3B parameters (tag)16K documented maximum contextBuild sourceCatalog checked 2026-10-13 | Q6_K | 2.3 GB | ~3.0 GB |
| starcoder2:3b-q8_03B parameters (tag)16K documented maximum contextBuild sourceCatalog checked 2026-10-13 | Q8_0 | 3.0 GB | ~3.8 GB |
| starcoder2:7b7B parameters (tag)16K documented maximum contextBuild sourceCatalog checked 2026-10-13 | Q4_0 | 3.8 GB | ~4.7 GB |
| starcoder2:7b-q4_K_M7B parameters (tag)16K documented maximum contextBuild sourceCatalog checked 2026-10-13 | Q4_K_M | 4.1 GB | ~5.1 GB |
| starcoder2:7b-q5_K_M7B parameters (tag)16K documented maximum contextBuild sourceCatalog checked 2026-10-13 | Q5_K_M | 4.8 GB | ~5.8 GB |
Showing the 8 smallest non-alias builds. Choose any build and change the context. A context above the build's documented maximum is a hypothetical calculation, not a supported setting.
How to run starcoder2 locally
- 1.Install Ollama for Windows, macOS or Linux.
- 2.Download this exact build in a terminal:
ollama pull starcoder2:3b - 3.Check the source for the build's task. For text generation, run
ollama run starcoder2:3b. Base/text builds may need a prompt template; an instruct build is usually the appropriate starting point for a conversation.
Frequently asked questions about starcoder2
- How much VRAM do I need to run starcoder2?
- At 4K context, the smallest published build of starcoder2 (Q4_0) needs roughly 2.2 GB of GPU memory once weights, KV cache, compute buffers and runtime overhead are counted. Bigger quantizations and longer context windows need more. It can also run partly or entirely on the CPU using system RAM, more slowly.
- Can I run starcoder2 without a dedicated GPU?
- A supported CPU runtime can use system RAM. The smallest listed build needs an estimated 2.2 GB at 4K context, plus headroom for your operating system. Check the build's runtime requirements. We have not measured its speed on your CPU.
- How big is the starcoder2 download?
- The smallest published build is 1.6 GB. There are 24 builds in total, the largest being 29.7 GB. Leave some extra free disk space beyond the download itself.
- How do I run starcoder2 locally?
- Install Ollama, then download a specific build with "ollama pull starcoder2:3b". For a build that supports text generation, use ollama run with the same tag. Check the model source for its task and prompt format.
Will starcoder2 run on your PC?
Scan your hardware once and get a verdict for this model and every build — free, no account.
Compare with similar models
Or start from your memory: 8 GB VRAM, 12 GB VRAM, 16 GB VRAM, 24 GB VRAM or a 16 GB Mac.
Model data from the official Ollama registry · verified 13/10/2026