Google·Gemma 2

Codegemma 2B — Hardware Requirements & GPU Compatibility

ChatCode
5.8K downloads 94 likes

Specifications

Publisher
Google
Family
Gemma 2
Parameters
2.5B
Release Date
2024-08-07
License
Gemma Terms

Get Started

How Much VRAM Does Codegemma 2B Need?

Select a quantization to see compatible GPUs below.

QuantizationBitsVRAM
BF1616.005.5 GB

Which GPUs Can Run Codegemma 2B?

BF16 · 5.5 GB

Codegemma 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.

Which Devices Can Run Codegemma 2B?

BF16 · 5.5 GB

33 devices with unified memory can run Codegemma 2B, including NVIDIA DGX H100, NVIDIA DGX A100 640GB, MacBook Air 13" M3 (8 GB).

Related 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

5.5 GB

Learn more about VRAM estimation →

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 MI300X5300 ÷ 5.5 × 0.55 = ~529 tok/s

Estimated speed at BF16 (5.5 GB)

~529 tok/s
~119 tok/s
~395 tok/s
~327 tok/s

Real-world results typically within ±20%. Speed depends on batch size, quantization kernel, and software stack.

Learn more about tok/s estimation →

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.