Skip to content

Granite 3B Code Base 2K VRAM requirements

How much VRAM Granite 3B Code Base 2K needs
4-bit weights: 2.0 GBWith 2K context: 3.2 GB8-bit, 2K context: 4.7 GB
Parameters
3.5B
Longest context
2K
Released
Apr 2024
License
Apache 2.0
Strongest at
Coding

How much VRAM Granite 3B Code Base 2K needs

Memory Granite 3B Code Base 2K needs at each precision and context length
PrecisionWeightsWith 2K
16-bit6.5 GB7.7 GB
8-bit3.4 GB4.7 GB
6-bit2.7 GB3.9 GB
5-bit2.3 GB3.6 GB
4-bit2.0 GB3.2 GB
3-bit1.6 GB2.8 GB
2-bit1.2 GB2.5 GB
1.6-bit685 MB1.9 GB

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

GPUs and Macs that run Granite 3B Code Base 2K

The best way Granite 3B Code Base 2K runs on common GPUs, Macs and AI boxes
MachineBest fitContextSpeedFirst replyReport
RTX 40608-bit2K49 tok/s0.5 sPDF: Granite 3B Code Base 2K on RTX 4060 report
RTX 50608-bit2K78 tok/s0.4 sPDF: Granite 3B Code Base 2K on RTX 5060 report
RTX 30708-bit2K78 tok/s0.4 sPDF: Granite 3B Code Base 2K on RTX 3070 report
RTX 3080 10 GB8-bit2K126 tok/s0.3 sPDF: Granite 3B Code Base 2K on RTX 3080 10 GB report
RTX 3060 12 GB8-bit2K64 tok/s0.6 sPDF: Granite 3B Code Base 2K on RTX 3060 12 GB report
Arc B5808-bit2K55 tok/s0.4 sPDF: Granite 3B Code Base 2K on Arc B580 report
RTX 40708-bit2K87 tok/s0.3 sPDF: Granite 3B Code Base 2K on RTX 4070 report
RTX 4070 Super8-bit2K87 tok/s0.2 sPDF: Granite 3B Code Base 2K on RTX 4070 Super report
RTX 50708-bit2K113 tok/s0.2 sPDF: Granite 3B Code Base 2K on RTX 5070 report
RTX 4060 Ti 16 GB8-bit2K52 tok/s0.3 sPDF: Granite 3B Code Base 2K on RTX 4060 Ti 16 GB report
RTX 5060 Ti 16 GB8-bit2K78 tok/s0.3 sPDF: Granite 3B Code Base 2K on RTX 5060 Ti 16 GB report
Arc A770 16 GB8-bit2K66 tok/s0.4 sPDF: Granite 3B Code Base 2K on Arc A770 16 GB report
Radeon RX 9070 XT8-bit2K89 tok/s0.2 sPDF: Granite 3B Code Base 2K on Radeon RX 9070 XT report
RTX 4070 Ti Super8-bit2K113 tok/s0.2 sPDF: Granite 3B Code Base 2K on RTX 4070 Ti Super report
RTX 4080 Super8-bit2K123 tok/s0.1 sPDF: Granite 3B Code Base 2K on RTX 4080 Super report
RTX 5070 Ti8-bit2K146 tok/s0.2 sPDF: Granite 3B Code Base 2K on RTX 5070 Ti report
RTX 50808-bit2K155 tok/s0.1 sPDF: Granite 3B Code Base 2K on RTX 5080 report
Radeon RX 7900 XTX8-bit2K125 tok/s0.3 sPDF: Granite 3B Code Base 2K on Radeon RX 7900 XTX report
RTX 30908-bit2K151 tok/s0.2 sPDF: Granite 3B Code Base 2K on RTX 3090 report
RTX 40908-bit2K161 tok/s0.1 sPDF: Granite 3B Code Base 2K on RTX 4090 report
Radeon AI PRO R97008-bit2K89 tok/s0.2 sPDF: Granite 3B Code Base 2K on Radeon AI PRO R9700 report
RTX 50908-bit2K256 tok/s0.1 sPDF: Granite 3B Code Base 2K on RTX 5090 report
2× RTX 30908-bit2K151 tok/s0.1 sPDF: Granite 3B Code Base 2K on 2× RTX 3090 report
2× RTX 40908-bit2K161 tok/s0.1 sPDF: Granite 3B Code Base 2K on 2× RTX 4090 report
RTX PRO 5000 Blackwell 48 GB8-bit2K204 tok/s0.1 sPDF: Granite 3B Code Base 2K on RTX PRO 5000 Blackwell 48 GB report
RTX 6000 Ada8-bit2K155 tok/s0.1 sPDF: Granite 3B Code Base 2K on RTX 6000 Ada report
L40S8-bit2K141 tok/s0.1 sPDF: Granite 3B Code Base 2K on L40S report
2× RTX 50908-bit2K256 tok/s0.1 sPDF: Granite 3B Code Base 2K on 2× RTX 5090 report
4× RTX 30908-bit2K151 tok/s0.1 sPDF: Granite 3B Code Base 2K on 4× RTX 3090 report
RTX PRO 6000 Blackwell8-bit2K256 tok/s0.1 sPDF: Granite 3B Code Base 2K on RTX PRO 6000 Blackwell report
Mac mini M4 16 GB8-bit2K25 tok/s4.8 sPDF: Granite 3B Code Base 2K on Mac mini M4 16 GB report
Mac mini M4 24 GB8-bit2K25 tok/s4.8 sPDF: Granite 3B Code Base 2K on Mac mini M4 24 GB report
Mac mini M4 32 GB8-bit2K25 tok/s4.8 sPDF: Granite 3B Code Base 2K on Mac mini M4 32 GB report
Mac mini M4 Pro 24 GB8-bit2K52 tok/s2.4 sPDF: Granite 3B Code Base 2K on Mac mini M4 Pro 24 GB report
Mac mini M4 Pro 48 GB8-bit2K52 tok/s2.4 sPDF: Granite 3B Code Base 2K on Mac mini M4 Pro 48 GB report
Mac mini M4 Pro 64 GB8-bit2K52 tok/s2.4 sPDF: Granite 3B Code Base 2K on Mac mini M4 Pro 64 GB report
M4 Max 128 GB8-bit2K86 tok/s1.2 sPDF: Granite 3B Code Base 2K on M4 Max 128 GB report
M5 Max 128 GB8-bit2K94 tok/s0.3 sPDF: Granite 3B Code Base 2K on M5 Max 128 GB report
M3 Ultra 96 GB8-bit2K105 tok/s0.7 sPDF: Granite 3B Code Base 2K on M3 Ultra 96 GB report
M3 Ultra 256 GB8-bit2K105 tok/s0.7 sPDF: Granite 3B Code Base 2K on M3 Ultra 256 GB report
M3 Ultra 512 GB8-bit2K105 tok/s0.7 sPDF: Granite 3B Code Base 2K on M3 Ultra 512 GB report
M5 Ultra 512 GB8-bit2K137 tok/s0.2 sPDF: Granite 3B Code Base 2K on M5 Ultra 512 GB report
Ryzen AI Max+ 395 64 GB8-bit2K39 tok/s0.7 sPDF: Granite 3B Code Base 2K on Ryzen AI Max+ 395 64 GB report
Ryzen AI Max+ 395 128 GB8-bit2K39 tok/s0.7 sPDF: Granite 3B Code Base 2K on Ryzen AI Max+ 395 128 GB report
RTX Spark8-bit2K54 tok/s0.2 sPDF: Granite 3B Code Base 2K on RTX Spark report
DGX Spark8-bit2K49 tok/s0.2 sPDF: Granite 3B Code Base 2K on DGX Spark report
Dual DGX Spark8-bit2K49 tok/s0.1 sPDF: Granite 3B Code Base 2K on Dual DGX Spark report
DGX Station GB3008-bit2K587 tok/s0.1 sPDF: Granite 3B Code Base 2K on DGX Station GB300 report
2× RTX PRO 6000 Blackwell8-bit2K256 tok/s0.1 sPDF: Granite 3B Code Base 2K on 2× RTX PRO 6000 Blackwell report
4× RTX PRO 6000 Blackwell8-bit2K256 tok/s0.1 sPDF: Granite 3B Code Base 2K on 4× RTX PRO 6000 Blackwell report
8× RTX PRO 6000 Blackwell8-bit2K256 tok/s0.1 sPDF: Granite 3B Code Base 2K on 8× RTX PRO 6000 Blackwell report
A100 80 GB SXM8-bit2K281 tok/s0.2 sPDF: Granite 3B Code Base 2K on A100 80 GB SXM report
H100 SXM8-bit2K394 tok/s0.1 sPDF: Granite 3B Code Base 2K on H100 SXM report
4× H200 NVL8-bit2K485 tok/s0.1 sPDF: Granite 3B Code Base 2K on 4× H200 NVL report
8× H200 NVL8-bit2K485 tok/s0.1 sPDF: Granite 3B Code Base 2K 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/granite-3b-code-base-i1-GGUF
vLLM
vllm serve ibm-granite/granite-3b-code-base-2k

Questions

How much VRAM does Granite 3B Code Base 2K need?

Granite 3B Code Base 2K needs 2.0 GB for its weights at 4-bit, 3.2 GB with an 2K context and 3.2 GB with 2K. At 8-bit, 4.7 GB.

What is the minimum VRAM for Granite 3B Code Base 2K?

About 2.8 GB at 3-bit with an 2K 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 Granite 3B Code Base 2K?

3.5B parameters: 6.5 GB of weights at 16-bit, 2.0 GB at 4-bit.

Can Granite 3B Code Base 2K run on an RTX 4090?

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

More models