Skip to content

Starcoder2 3B VRAM requirements

How much VRAM Starcoder2 3B needs
4-bit weights: 1.7 GBWith 8K context: 2.6 GBWith 16K context: 2.8 GB8-bit, 8K context: 3.9 GB
Parameters
3B
Longest context
16K
Released
Nov 2023
License
bigcode-openrail-m
Strongest at
Not rated

Its licence (bigcode-openrail-m) is not a standard open-source one: check the terms before commercial use.

How much VRAM Starcoder2 3B needs

Memory Starcoder2 3B needs at each precision and context length
PrecisionWeightsWith 8KWith 16K
16-bit5.6 GB6.5 GB6.8 GB
8-bit3.0 GB3.9 GB4.1 GB
6-bit2.3 GB3.2 GB3.4 GB
5-bit2.0 GB2.9 GB3.1 GB
4-bit1.7 GB2.6 GB2.8 GB
3-bit1.4 GB2.3 GB2.5 GB
2-bit1.1 GB1.9 GB2.2 GB
1.6-bit596 MB1.5 GB1.7 GB

One conversation, 16-bit context cache, runtime overhead included.

GPUs and Macs that run Starcoder2 3B

The best way Starcoder2 3B runs on common GPUs, Macs and AI boxes
MachineBest fitContextSpeedFirst replyReport
RTX 40608-bit16K59 tok/s0.4 sPDF: Starcoder2 3B on RTX 4060 report
RTX 50608-bit16K94 tok/s0.3 sPDF: Starcoder2 3B on RTX 5060 report
RTX 30708-bit16K94 tok/s0.3 sPDF: Starcoder2 3B on RTX 3070 report
RTX 3080 10 GB8-bit16K150 tok/s0.2 sPDF: Starcoder2 3B on RTX 3080 10 GB report
RTX 3060 12 GB8-bit16K77 tok/s0.5 sPDF: Starcoder2 3B on RTX 3060 12 GB report
Arc B5808-bit16K66 tok/s0.3 sPDF: Starcoder2 3B on Arc B580 report
RTX 40708-bit16K104 tok/s0.2 sPDF: Starcoder2 3B on RTX 4070 report
RTX 4070 Super8-bit16K104 tok/s0.2 sPDF: Starcoder2 3B on RTX 4070 Super report
RTX 50708-bit16K135 tok/s0.2 sPDF: Starcoder2 3B on RTX 5070 report
RTX 4060 Ti 16 GB8-bit16K62 tok/s0.3 sPDF: Starcoder2 3B on RTX 4060 Ti 16 GB report
RTX 5060 Ti 16 GB8-bit16K94 tok/s0.3 sPDF: Starcoder2 3B on RTX 5060 Ti 16 GB report
Arc A770 16 GB8-bit16K79 tok/s0.3 sPDF: Starcoder2 3B on Arc A770 16 GB report
Radeon RX 9070 XT8-bit16K106 tok/s0.2 sPDF: Starcoder2 3B on Radeon RX 9070 XT report
RTX 4070 Ti Super8-bit16K135 tok/s0.1 sPDF: Starcoder2 3B on RTX 4070 Ti Super report
RTX 4080 Super8-bit16K146 tok/s0.1 sPDF: Starcoder2 3B on RTX 4080 Super report
RTX 5070 Ti8-bit16K173 tok/s0.1 sPDF: Starcoder2 3B on RTX 5070 Ti report
RTX 50808-bit16K183 tok/s0.1 sPDF: Starcoder2 3B on RTX 5080 report
Radeon RX 7900 XTX8-bit16K147 tok/s0.3 sPDF: Starcoder2 3B on Radeon RX 7900 XTX report
RTX 30908-bit16K180 tok/s0.2 sPDF: Starcoder2 3B on RTX 3090 report
RTX 40908-bit16K191 tok/s0.1 sPDF: Starcoder2 3B on RTX 4090 report
Radeon AI PRO R97008-bit16K106 tok/s0.2 sPDF: Starcoder2 3B on Radeon AI PRO R9700 report
RTX 50908-bit16K300 tok/s0.1 sPDF: Starcoder2 3B on RTX 5090 report
2× RTX 30908-bit16K180 tok/s0.1 sPDF: Starcoder2 3B on 2× RTX 3090 report
2× RTX 40908-bit16K191 tok/s0.1 sPDF: Starcoder2 3B on 2× RTX 4090 report
RTX PRO 5000 Blackwell 48 GB8-bit16K241 tok/s0.1 sPDF: Starcoder2 3B on RTX PRO 5000 Blackwell 48 GB report
RTX 6000 Ada8-bit16K183 tok/s0.1 sPDF: Starcoder2 3B on RTX 6000 Ada report
L40S8-bit16K168 tok/s0.1 sPDF: Starcoder2 3B on L40S report
2× RTX 50908-bit16K300 tok/s0.1 sPDF: Starcoder2 3B on 2× RTX 5090 report
4× RTX 30908-bit16K180 tok/s0.1 sPDF: Starcoder2 3B on 4× RTX 3090 report
RTX PRO 6000 Blackwell8-bit16K300 tok/s0.1 sPDF: Starcoder2 3B on RTX PRO 6000 Blackwell report
Mac mini M4 16 GB8-bit16K30 tok/s4.0 sPDF: Starcoder2 3B on Mac mini M4 16 GB report
Mac mini M4 24 GB8-bit16K30 tok/s4.0 sPDF: Starcoder2 3B on Mac mini M4 24 GB report
Mac mini M4 32 GB8-bit16K30 tok/s4.0 sPDF: Starcoder2 3B on Mac mini M4 32 GB report
Mac mini M4 Pro 24 GB8-bit16K62 tok/s2.0 sPDF: Starcoder2 3B on Mac mini M4 Pro 24 GB report
Mac mini M4 Pro 48 GB8-bit16K62 tok/s2.0 sPDF: Starcoder2 3B on Mac mini M4 Pro 48 GB report
Mac mini M4 Pro 64 GB8-bit16K62 tok/s2.0 sPDF: Starcoder2 3B on Mac mini M4 Pro 64 GB report
M4 Max 128 GB8-bit16K101 tok/s1.0 sPDF: Starcoder2 3B on M4 Max 128 GB report
M5 Max 128 GB8-bit16K111 tok/s0.3 sPDF: Starcoder2 3B on M5 Max 128 GB report
M3 Ultra 96 GB8-bit16K123 tok/s0.6 sPDF: Starcoder2 3B on M3 Ultra 96 GB report
M3 Ultra 256 GB8-bit16K123 tok/s0.6 sPDF: Starcoder2 3B on M3 Ultra 256 GB report
M3 Ultra 512 GB8-bit16K123 tok/s0.6 sPDF: Starcoder2 3B on M3 Ultra 512 GB report
M5 Ultra 512 GB8-bit16K158 tok/s0.2 sPDF: Starcoder2 3B on M5 Ultra 512 GB report
Ryzen AI Max+ 395 64 GB8-bit16K47 tok/s0.6 sPDF: Starcoder2 3B on Ryzen AI Max+ 395 64 GB report
Ryzen AI Max+ 395 128 GB8-bit16K47 tok/s0.6 sPDF: Starcoder2 3B on Ryzen AI Max+ 395 128 GB report
RTX Spark8-bit16K65 tok/s0.2 sPDF: Starcoder2 3B on RTX Spark report
DGX Spark8-bit16K59 tok/s0.2 sPDF: Starcoder2 3B on DGX Spark report
Dual DGX Spark8-bit16K59 tok/s0.1 sPDF: Starcoder2 3B on Dual DGX Spark report
DGX Station GB3008-bit16K660 tok/s0.1 sPDF: Starcoder2 3B on DGX Station GB300 report
2× RTX PRO 6000 Blackwell8-bit16K300 tok/s0.1 sPDF: Starcoder2 3B on 2× RTX PRO 6000 Blackwell report
4× RTX PRO 6000 Blackwell8-bit16K300 tok/s0.1 sPDF: Starcoder2 3B on 4× RTX PRO 6000 Blackwell report
8× RTX PRO 6000 Blackwell8-bit16K300 tok/s0.1 sPDF: Starcoder2 3B on 8× RTX PRO 6000 Blackwell report
A100 80 GB SXM8-bit16K329 tok/s0.1 sPDF: Starcoder2 3B on A100 80 GB SXM report
H100 SXM8-bit16K454 tok/s0.1 sPDF: Starcoder2 3B on H100 SXM report
4× H200 NVL8-bit16K552 tok/s0.1 sPDF: Starcoder2 3B on 4× H200 NVL report
8× H200 NVL8-bit16K552 tok/s0.1 sPDF: Starcoder2 3B on 8× H200 NVL report

Best fit is the highest quality, up to 8-bit, that leaves 16K of context. First reply is the wait for a 2K prompt. Speeds are rough, plus or minus 25%.

How to run it

llama.cpp
llama-server -hf mradermacher/starcoder2-3b-i1-GGUF
vLLM
vllm serve bigcode/starcoder2-3b

Questions

How much VRAM does Starcoder2 3B need?

Starcoder2 3B needs 1.7 GB for its weights at 4-bit, 2.6 GB with an 8K context and 2.8 GB with 16K. At 8-bit, 3.9 GB.

What is the minimum VRAM for Starcoder2 3B?

About 2.3 GB at 3-bit with an 8K context, the lowest precision we recommend for a model this size. The smallest machine here that runs it without spilling is the RTX 4060.

How big is Starcoder2 3B?

3B parameters: 5.6 GB of weights at 16-bit, 1.7 GB at 4-bit.

Can Starcoder2 3B run on an RTX 4090?

Yes. At 8-bit it holds 16K of context and writes about 191 tokens a second.

More models