Can I Run StarCoder 2 on RTX 3060 12 GB Desktop (12 GB VRAM, 32 GB RAM)?

Written by Jakub Rusinowski · Last updated February 28, 2024

Yes

Yes — StarCoder 2 15B at Q4_K_M needs about 10.8 GB of the 12 GB usable on RTX 3060 12 GB Desktop (12 GB VRAM, 32 GB RAM) (~1.2 GB spare), at ~26.2 tok/s (estimated), with room for about 16,384 tokens of context.

Confidence: high · Recommended quantization: Q4_K_M · Estimated speed: ~26.2 tok/s

RTX 3060 12 GB Desktop (12 GB VRAM, 32 GB RAM) — what it gives a model

Usable memory for models12 GB
Memory bandwidth360 GB/s
Form factorDesktop
Operating systemWindows or Linux
Memory upgradeableYes

StarCoder 2 on RTX 3060 12 GB Desktop (12 GB VRAM, 32 GB RAM): memory by quantization

QuantMemory neededFits 12 GB?Max contextEst. speedDownload
F1632.5 GB✗ No31 GB
Q8_017.9 GB✗ No16.5 GB
Q6_K14.2 GB✗ No12.7 GB
Q5_K_M12.5 GB✗ No11 GB
Q4_K_M10.8 GB✓ Yes16K~26.2 tok/s9.4 GB
Q3_K_M8.1 GB✓ Yes16K~35.8 tok/s6.6 GB
Q2_K6.6 GB✓ Yes16K~44.7 tok/s5.1 GB

Which StarCoder 2 sizes fit

VariantNeeds at Q4_K_MFits?Est. speed
StarCoder 2 15B10.8 GB✓ Fits~26.2 tok/s
StarCoder 2 7B5.7 GB✓ Fits~51.7 tok/s
StarCoder 2 3B2.9 GB✓ Fits~106.2 tok/s

What to watch out for

RTX 3060 12 GB desktop limitations

Recommended setup

Ollama or llama.cpp (CUDA/ROCm) — vLLM if you need concurrent serving

How these numbers are calculated

FAQ

Can I run StarCoder 2 on RTX 3060 12 GB Desktop (12 GB VRAM, 32 GB RAM)?

Yes — StarCoder 2 15B at Q4_K_M needs about 10.8 GB of the 12 GB usable on RTX 3060 12 GB Desktop (12 GB VRAM, 32 GB RAM) (~1.2 GB spare), at ~26.2 tok/s (estimated), with room for about 16,384 tokens of context.

Which quantization of StarCoder 2 should I use on RTX 3060 12 GB Desktop (12 GB VRAM, 32 GB RAM)?

Q4_K_M — it needs about 10.8 GB of the 12 GB available, downloads as roughly 9.4 GB, and runs at an estimated 26.2 tokens/sec with up to 16K of context.

What limits StarCoder 2 on RTX 3060 12 GB Desktop (12 GB VRAM, 32 GB RAM)?

Nothing binding — the model fits with headroom and generates at a usable speed on this hardware.

Which runtime should I use?

Ollama or llama.cpp (CUDA/ROCm) — vLLM if you need concurrent serving

Other Computers

Other Models on RTX 3060 12 GB Desktop (12 GB VRAM, 32 GB RAM)

StarCoder 2 on GPUs

What This Model Is Good At

Model & Tools

← Can I Run It? | StarCoder 2 model page | Check your hardware