StarCoder 2 — local AI model by BigCode

Written by Jakub Rusinowski · Last updated

The premier open-source code generation model. StarCoder 2 is trained on The Stack v2 dataset covering 600+ programming languages. Purpose-built for code completion, generation, and understanding — not a general-purpose model fine-tuned for code.

Variants

The smallest StarCoder 2 variant needs about 3 GB of VRAM at Q4_K_M — quantized weights plus framework overhead, before any KV cache.

ModelVRAM
StarCoder 2 3B →
3B
~2.6 GB
StarCoder 2 7B →
7B
~5.1 GB
StarCoder 2 15B →
15B
~10.2 GB

Memory is quantized weights plus overhead at Q4_K_M, from the same engine as the GPU & VRAM checker.

How to run StarCoder 2 locally

Install Ollama, then pull the tag.

ollama run starcoder2:3b

Pick a size above for its own VRAM figure, speed estimate and install command.

Licence

BigCode OpenRAIL-MCommercial use permitted

Weights are downloadable and commercial use is permitted, subject to the licence’s acceptable-use terms.

Applies to: StarCoder 2 3B, StarCoder 2 7B, StarCoder 2 15B

Recommended GPU

The cheapest catalogued GPU that runs StarCoder 2 locally (min 3 GB VRAM) is the Intel Arc B570 (10 GB).

Affiliate disclosure: Some links on this page are affiliate links — if you buy through them, LLM Configurator may earn a commission at no extra cost to you. As an Amazon Associate, LLM Configurator earns from qualifying purchases.
Intel Arc B570 10GB
10 GB VRAM · 150 W board power
2026 prices are volatile — check the current listing.

Can I run StarCoder 2 on my GPU?

StarCoder 2 — frequently asked questions

How much VRAM does StarCoder 2 need?

StarCoder 2 needs about 3 GB VRAM at Q4_K_M quantization for its smallest variant. Variants: StarCoder 2 3B (3 GB, Q4_K_M); StarCoder 2 7B (5 GB, Q4_K_M); StarCoder 2 15B (10 GB, Q4_K_M). On Apple Silicon, unified memory counts toward this requirement.

Can I run StarCoder 2 on an RTX 4090 (24 GB)?

Yes — StarCoder 2 runs on an RTX 4090 (24 GB) and other 24 GB cards such as the RTX 3090. Smaller variants also fit comfortably on 8–16 GB GPUs at Q4_K_M.

What quantization should I use for StarCoder 2?

Q4_K_M is the best balance of quality and VRAM for StarCoder 2 in most cases. Choose Q8_0 for near-lossless quality if you have spare VRAM, or smaller quants (Q3/Q2) only when memory is tight.

How do I run StarCoder 2 with Ollama?

Install Ollama, then run: ollama run starcoder2:3b. This downloads StarCoder 2 and starts a local, OpenAI-compatible endpoint — no internet connection is needed after the initial download.