Codegemma 2B — Hardware Requirements & GPU Compatibility
ChatCodeSpecifications
- Publisher
- Family
- Gemma 2
- Parameters
- 2.5B
- Release Date
- 2024-08-07
- License
- Gemma Terms
Get Started
HuggingFace
How Much VRAM Does Codegemma 2B Need?
Select a quantization to see compatible GPUs below.
| Quantization | Bits | VRAM | + Context | File Size | Quality |
|---|---|---|---|---|---|
| BF16 | 16.00 | 5.5 GB | — | 5.01 GB | Brain floating point 16 — preferred for training |
Which GPUs Can Run Codegemma 2B?
BF16 · 5.5 GBCodegemma 2B (BF16) requires 5.5 GB of VRAM to load the model weights. For comfortable inference with headroom for KV cache and system overhead, 8+ GB is recommended. 35 GPUs can run it, including NVIDIA GeForce RTX 5090, NVIDIA GeForce RTX 3090 Ti, NVIDIA GeForce RTX 3070 Ti.
Runs great
— Plenty of headroomWhich Devices Can Run Codegemma 2B?
BF16 · 5.5 GB33 devices with unified memory can run Codegemma 2B, including NVIDIA DGX H100, NVIDIA DGX A100 640GB, MacBook Air 13" M3 (8 GB).
Runs great
— Plenty of headroomDecent
— Enough memory, may be tightRelated Models
Frequently Asked Questions
- How much VRAM does Codegemma 2B need?
Codegemma 2B requires 5.5 GB of VRAM at BF16.
VRAM = Weights + KV Cache + Overhead
Weights = 2.5B × 16 bits ÷ 8 = 5 GB
KV Cache + Overhead ≈ 0.5 GB (at 2K context + ~0.3 GB framework)
VRAM usage by quantization
BF165.5 GB- Can I run Codegemma 2B on a Mac?
Codegemma 2B requires at least 5.5 GB at BF16, which exceeds the unified memory of most consumer Macs. You would need a Mac Studio or Mac Pro with a high-memory configuration.
- Can I run Codegemma 2B locally?
Yes — Codegemma 2B can run locally on consumer hardware. At BF16 quantization it needs 5.5 GB of VRAM. Popular tools include Ollama, LM Studio, and llama.cpp.
- How fast is Codegemma 2B?
At BF16, Codegemma 2B can reach ~529 tok/s on AMD Instinct MI300X. On NVIDIA GeForce RTX 4090: ~119 tok/s. Speed depends mainly on GPU memory bandwidth. Real-world results typically within ±20%.
tok/s = (bandwidth GB/s ÷ model GB) × efficiency
Example: AMD Instinct MI300X → 5300 ÷ 5.5 × 0.55 = ~529 tok/s
Estimated speed at BF16 (5.5 GB)
AMD Instinct MI300X~529 tok/sNVIDIA GeForce RTX 4090~119 tok/sNVIDIA H100 SXM~395 tok/sAMD Instinct MI250X~327 tok/sReal-world results typically within ±20%. Speed depends on batch size, quantization kernel, and software stack.
- What's the download size of Codegemma 2B?
At BF16, the download is about 5.01 GB.
- Which GPUs can run Codegemma 2B?
35 consumer GPUs can run Codegemma 2B at BF16 (5.5 GB). Top options include AMD Radeon RX 6700 XT, AMD Radeon RX 6800, AMD Radeon RX 6800 XT, AMD Radeon RX 7600. 28 GPUs have plenty of headroom for comfortable inference.
- Which devices can run Codegemma 2B?
33 devices with unified memory can run Codegemma 2B at BF16 (5.5 GB), including Mac Mini M4 (16 GB), Mac Mini M4 (32 GB), Mac Mini M4 Pro (24 GB), Mac Mini M4 Pro (48 GB). Apple Silicon Macs use unified memory shared between CPU and GPU, making them well-suited for local LLM inference.