Skip to content
Updated minutes ago
Google

CodeGemma 7B

Google · dense · 8.5B parameters · 8,192 context

Quality
52.0

Parameters

8.5B

Context Window

8K tokens

Architecture

Dense

Best GPU

A30

Quality Score

52/100

Intelligence Brief

CodeGemma 7B is a 8.5B parameter DENSE model from Google, featuring Multi-Head Attention (MHA) with 28 layers and 3,072 hidden dimensions. With a 8,192 token context window, it supports code, math. On standardized benchmarks, it achieves MMLU 56, HumanEval 44, GSM8K 50. For self-hosted inference, A30 delivers optimal throughput at $332/month.

Architecture Details

TypeDENSE
Total Parameters8.5B
Active Parameters8.5B
Layers28
Hidden Dimension3,072
Attention Heads16
KV Heads16
Head Dimension256
Vocab Size256,128

Memory Requirements

BF16 Weights

17.0 GB

FP8 Weights

8.5 GB

INT4 Weights

4.3 GB

KV-Cache per Token229376 bytes
Activation Estimate0.80 GB

GPU Compatibility Matrix

CodeGemma 7B is compatible with 90% of GPU configurations across 41 GPUs at 3 precision levels.

BF16 (Full)
FP8 (Half)
INT4 (Quarter)
Blackwell(7 GPUs)
B200 NVL (pair)360GB
B300288GB
B100 SXM192GB
GB200 NVL72 (per GPU)192GB
Hopper(7 GPUs)
H100 NVL 94GB (per GPU pair)188GB
H200 SXM141GB
H2096GB
GH20096GB
Ada Lovelace(11 GPUs)
L40S48GB
L4048GB
RTX 6000 Ada48GB
L2048GB
Ampere(16 GPUs)
A100 80GB SXM80GB
A100 80GB PCIe80GB
A1664GB
RTX A600048GB
Legend:No fitVery tightTightModerateGoodExcellent

GPU Recommendations

A30optimal

BF16 · 1 GPU · vllm

100/100

score

Throughput

266.7 tok/s

Latency (ITL)

3.7ms

Est. TTFT

1ms

Cost/Month

$332

Cost/M Tokens

$0.47

Use this config →
RTX 4090optimal

BF16 · 1 GPU · vllm

100/100

score

Throughput

288.2 tok/s

Latency (ITL)

3.5ms

Est. TTFT

1ms

Cost/Month

$370

Cost/M Tokens

$0.49

Use this config →
RTX 3090optimal

BF16 · 1 GPU · vllm

100/100

score

Throughput

267.6 tok/s

Latency (ITL)

3.7ms

Est. TTFT

1ms

Cost/Month

$180

Cost/M Tokens

$0.26

Use this config →

Deployment Options

API

API Deployment

No API pricing available

Self-Hosted

Single GPU

A30

$332/mo

Min VRAM: 9 GB

Scale

Multi-GPU

RTX 3060 x2

162.3 tok/s

TP· $114/mo

API Pricing Comparison

No API pricing data available for this model.

Performance Estimates

Throughput by GPU

A30
266.7 tok/s
RTX 4090
288.2 tok/s
RTX 3090
267.6 tok/s

VRAM Breakdown (A30, BF16)

Weights
KV
Act
Weights 17.0 GBKV-Cache 7.5 GBActivations 6.4 GBOverhead 1.4 GB

Precision Impact

bf16

17.0 GB

weights/GPU

~266.7 tok/s

fp8

8.5 GB

weights/GPU

int4

4.3 GB

weights/GPU

Quality Benchmarks

Average
60th percentile across all models
MMLU
56.0
Bottom 25% (16th pctile)
HumanEval
44.0
Below Average (36th pctile)
GSM8K
50.0
Bottom 25% (15th pctile)
MT-Bench
68.0
Bottom 25% (0th pctile)

Capabilities

Features

Tool Use Vision Code Math Reasoning Multilingual Structured Output

Supported Frameworks

vllmsglangtgiollama

Supported Precisions

BF16 (default)FP8INT4

Where to Deploy CodeGemma 7B

Similar Models

Qwen 3 8B

8.2B params · dense

Quality: 70

from $0.20/M

Larger context, Higher qualityCompare →
Larger context, Higher qualityCompare →

Yi 1.5 9B

8.83B params · dense

Quality: 62

from $0.20/M

Higher qualityCompare →

Llama 3.1 8B

8.03B params · dense

Quality: 58

from $0.08/M

Larger context, Higher qualityCompare →

Frequently Asked Questions

How much VRAM does CodeGemma 7B need for inference?

CodeGemma 7B requires approximately 17.0 GB of VRAM at BF16 precision, 8.5 GB at FP8, or 4.3 GB at INT4 quantization. Additional VRAM is needed for KV-cache (229376 bytes per token) and activations (~0.80 GB).

What is the best GPU for CodeGemma 7B?

The top recommended GPU for CodeGemma 7B is the A30 using BF16 precision. It achieves approximately 266.7 tokens/sec at an estimated cost of $332/month ($0.47/M tokens). Score: 100/100.

How much does CodeGemma 7B inference cost?

CodeGemma 7B inference costs vary by provider and GPU setup. Use our calculator for detailed cost estimates across all providers.