Gemma 3 4B vs Gemma 3 27B
Architecture Comparison
SpecGemma 3 4BGemma 3 27B
TypeDENSEDENSE
Total Parameters4.3B27B
Active Parameters4.3B27B
Layers3462
Hidden Dimension2,5603,584
Attention Heads3232
KV Heads816
Context Length131,072131,072
Precision (default)BF16BF16
Memory Requirements
PrecisionGemma 3 4BGemma 3 27B
BF16 Weights8.6 GB54.0 GB
FP8 Weights4.3 GB27.0 GB
INT4 Weights2.1 GB13.5 GB
KV-Cache / Token139264 B507904 B
Activation Estimate0.50 GB1.50 GB
Minimum GPUs Needed (BF16)
H100 SXM1 GPU1 GPU
L40S1 GPU2 GPUs
Quality Benchmarks
BenchmarkGemma 3 4BGemma 3 27B
Overall5476
MMLU60.078.0
HumanEval32.048.0
GSM8K58.085.0
MT-Bench72.082.0
Gemma 3 4B
MMLU
60.0
HumanEval
32.0
GSM8K
58.0
MT-Bench
72.0
Gemma 3 27B
MMLU
78.0
HumanEval
48.0
GSM8K
85.0
MT-Bench
82.0
Capabilities
FeatureGemma 3 4BGemma 3 27B
Tool Use✓ Yes✓ Yes
Vision✓ Yes✓ Yes
Code✓ Yes✓ Yes
Math✓ Yes✓ Yes
Reasoning✗ No✗ No
Multilingual✓ Yes✓ Yes
Structured Output✓ Yes✓ Yes
API Pricing Comparison
Cheapest Output (Gemma 3 4B)
$0.10/M
Input: $0.05/M
Cheapest Output (Gemma 3 27B)
$0.20/M
Input: $0.10/M
| Provider | Gemma 3 4B In $/M | Out $/M | Gemma 3 27B In $/M | Out $/M |
|---|---|---|---|---|
| $0.05 | $0.10 | $0.10 | $0.20 | |
| together | — | — | $0.30 | $0.30 |
Recommendation Summary
- ‣Gemma 3 27B scores higher on overall quality (76 vs 54).
- ‣Gemma 3 4B is cheaper per output token ($0.10/M vs $0.20/M).
- ‣Gemma 3 4B has a smaller memory footprint (8.6 GB vs 54.0 GB BF16), making it easier to deploy on fewer GPUs.
- ‣Gemma 3 27B is stronger at code generation (HumanEval: 48.0 vs 32.0).
- ‣Gemma 3 27B is better at math reasoning (GSM8K: 85.0 vs 58.0).