What GPU do I need to run bigcode/starcoder2-3b?
3.0B parameters, published in F32. View on Hugging Face
starcoder2-3b is published by bigcode on Hugging Face, with 118,497 downloads and 222 likes to date. It's a Starcoder2ForCausalLM model built for text-generation, published natively in F32.
VRAM required & cheapest live GPU fit
Required VRAM = weight size at each precision times a flat 1.2 overhead for activations and fragmentation. The KV-cache grows with context and is not in that factor; it is listed per model below where the architecture is published. Full formula and assumptions: methodology.
| Precision | Weight size | Required VRAM | Cheapest live fit | GPUs needed | Est. $/hr (full fit) |
|---|---|---|---|---|---|
| FP32 | 11.3 GB | 13.5 GB | V100 | 1 | $0.110/hr |
| FP8 (quantized) | 2.8 GB | 3.4 GB | RTX 5060 Ti | 1 | $0.180/hr |
| INT4 (quantized) | 1.4 GB | 1.7 GB | RTX 3070 | 1 | $0.088/hr |
A GPU is only matched to a row if its hardware supports that precision, and the primary recommendation is always a single-GPU fit when one exists.
INT4 requires a quantized checkpoint actually published for this model, check its Hugging Face page before relying on this row.
Cheapest way to run starcoder2-3b at its published (F32) precision: 1× V100, at $0.110/hr per GPU ($0.110/hr total). Quantizing to FP8 or INT4 (rows above) can cost less, but requires a compatible quantized checkpoint to exist for this model.
starcoder2-3b: KV cache by context length
The KV cache is the memory the attention layers hold for every token of context, on top of the weights. It is not part of the flat 1.2x overhead in the table above, grows with context length and with every concurrent request, and is why a long-context deployment needs more VRAM than the table shows.
KV-cache size for starcoder2-3b is not published for this architecture, so no figure is shown.
starcoder2-3b: common questions
Does starcoder2-3b fit on a 16 GB GPU?
Yes. At FP32 it needs 13.5 GB of VRAM, so a 16 GB card holds it with 2.5 GB to spare. A 12 GB card is not enough for it at FP32.
Can starcoder2-3b run in 16-bit instead of FP32?
Yes. Its published weights are FP32, 11.3 GB, or 13.5 GB once inference overhead is added. Loading the same weights in 16 bits halves that to 5.6 GB, or 6.8 GB with overhead. That moves it onto an 8 GB card instead of a 16 GB one. How much accuracy the cast costs is model-specific and is not measured here.
What is the least VRAM starcoder2-3b can run in?
1.7 GB, at INT4 (quantized), which fits a 6 GB card, against 13.5 GB at FP32. That row assumes an INT4 checkpoint has actually been published for this model, so check its Hugging Face page before planning around it.
Does quantizing starcoder2-3b lower the GPU bill?
Yes. At FP32 the cheapest live fit is one V100 at $0.110/hr. At INT4 (quantized) it drops to one RTX 3070 at $0.088/hr, provided a quantized checkpoint exists for it.
Weight-to-VRAM math, the fit rules, and how live prices are normalized: full methodology.
More StarCoder2 models
- starcoder2-7b (7.2B, BF16)
Alternatives at this size
Other models for text-generation within about a third of starcoder2-3b's 3.0B parameters, from other model lines.
- Qwen2.5-3B-Instruct (3.1B, BF16)
- phi-2 (2.8B, F16)
- Llama-3.2-3B-Instruct (3.2B, BF16)
- PowerMoE-3b (3.4B, F32)
- gemma-2-2b-it (2.6B, BF16)
More on starcoder2-3b
Fits on a 16 GB GPU at FP32: every model that fits in 16 GB.
Fits on an 8 GB GPU at FP8: every model that fits in 8 GB.
Best coding models: how starcoder2-3b ranks against the rest.
Best chat and assistants models: how starcoder2-3b ranks against the rest.
Related reading: V100 pricing and specs, How much VRAM you need for LLMs, Serving LLMs with vLLM, vLLM vs TensorRT-LLM vs SGLang, and Best GPU for LLM inference.
Your own GPU cloud accounts
One console for the GPU clouds you already rent from. Your keys stay on your machine.
$20 a month, flat