Google
ChatCoding5.1B
Chat

Gemma 4 E2B

Gemma · Apache 2.0

Gemma 4's compact edge model. 5.1B total parameters with 2.3B effective via Per-Layer Embeddings. Supports text, image, audio, and video input. Runs on practically any dedicated GPU with 4 GB of VRAM or more. Successor to Gemma 3 4B with measurably better reasoning and multimodal capabilities. Apache 2.0 licensed.

Parameters
5.1B
Architecture
Dense
Context
128,000 tokens
Released
2026-04-02
Engines
llama.cpp, ollama, vLLM, TGI
Builder Tools
Aider, Claude Code, Continue, Cursor, LM Studio, Ollama, Open WebUI, Windsurf

Parameters

5.1B

VRAM

4.5 GB

Context

125K

Formats

4

GPUs

43

Gemma 4 E2B (5.1B) requires 4.5 GB VRAM at recommended quality (Q6_K). At efficient quality (Q4_K_M), it fits in 4 GB VRAM, making it compatible with the NVIDIA RTX 4060 Laptop (40-60W). On NVIDIA Grace Blackwell Ultra GB300, expect approximately 500 tok/s at Q8_0. For the best experience, Starter AI Desktop ($582) is recommended.

Source: OwnRig methodology

VRAM (Recommended)

4.5 GB

Quantization

Q6_K

File Size

3.9 GB

Max Context

125K tokens

Primary Use

Chat

Memory

VRAM Requirements

QualityQuantizationVRAMFile Size
fullQ8_05.5 GB4.97 GB
recommendedQ6_K4.5 GB3.9 GB
recommendedQ5_K_M4.2 GB3.66 GB
efficientQ4_K_M4 GB3.46 GB
Scaling

Context Length Impact

KV cache VRAM at Q6_K quality. Longer context = more memory.

ContextKV CacheTotal VRAM
2K102 MB4.6 GB
4K102 MB4.6 GB
8K205 MB4.7 GB
16K410 MB4.9 GB
32K922 MB5.4 GB
64K1.8 GB6.3 GB

Compatible GPUs

43 devices
NVIDIA Grace Blackwell Ultra GB300Q8_0500 tok/sExcellent
Apple M4 Max (128GB Unified)Q8_082 tok/sExcellent
Apple M4 Max (36GB Unified)Q8_082 tok/sExcellent
Apple M4 Max (64GB Unified)Q8_082 tok/sExcellent
Apple M4 Ultra (192GB)Q8_0123 tok/sExcellent
AMD Radeon Pro W7900Q8_0130 tok/sExcellent
NVIDIA GeForce RTX 3080 10GBQ8_0114 tok/sExcellent
NVIDIA GeForce RTX 3090Q8_0141 tok/sExcellent
NVIDIA GeForce RTX 4070 SuperQ8_076 tok/sExcellent
NVIDIA GeForce RTX 4070 Ti 12GBQ8_076 tok/sExcellent
NVIDIA GeForce RTX 4070 Ti SuperQ8_0101 tok/sExcellent
NVIDIA GeForce RTX 4080 SuperQ8_0111 tok/sExcellent
NVIDIA GeForce RTX 4090Q8_0152 tok/sExcellent
NVIDIA RTX 4090 Laptop (150-175W)Q8_077 tok/sExcellent
NVIDIA GeForce RTX 5080Q8_0144 tok/sExcellent
NVIDIA GeForce RTX 5090Q8_0270 tok/sExcellent
NVIDIA RTX PRO 6000 BlackwellQ8_0271 tok/sExcellent
NVIDIA RTX PRO 6000 Blackwell Max-QQ8_0271 tok/sExcellent
AMD Radeon RX 7900 XTXQ8_0144 tok/sExcellent
Apple M4 Pro (24GB Unified)Q8_041 tok/sGood
Apple M4 Pro (48GB)Q8_041 tok/sGood
NVIDIA GeForce RTX 3060 12GBQ8_054 tok/sGood
NVIDIA GeForce RTX 4060 8GBQ8_041 tok/sGood
NVIDIA RTX 4060 Laptop (40-60W)Q8_038 tok/sGood
NVIDIA GeForce RTX 4060 Ti 16GBQ8_043 tok/sGood
NVIDIA RTX 4070 Laptop (80-115W)Q8_038 tok/sGood
NVIDIA RTX 4080 Laptop (120-150W)Q8_057 tok/sGood
AMD Radeon RX 7600Q8_043 tok/sGood
AMD Radeon RX 9070Q8_096 tok/sGood
Apple M1 Pro (16GB Unified)Q8_022 tok/sGood
Apple M2 Pro (16GB Unified)Q8_024 tok/sGood
AMD Radeon RX 9060 XT 16GBQ8_048 tok/sGood
AMD Radeon RX 9060 XT 8GBQ8_048 tok/sGood
NVIDIA GeForce RTX 5060 8GBQ8_047 tok/sGood
NVIDIA GeForce RTX 5060 Ti 16GBQ8_048 tok/sGood
Apple M3 Pro (18GB Unified)Q8_022 tok/sAcceptable
Apple M4 (16GB Unified)Q8_018 tok/sAcceptable
Apple M2 (8GB Unified)Q8_09 tok/sAcceptable
Apple M2 (16GB Unified)Q8_09 tok/sAcceptable
Apple M3 (8GB Unified)Q8_010 tok/sAcceptable
Apple M3 (16GB Unified)Q8_010 tok/sAcceptable
Apple M1 (8GB Unified)Q8_05 tok/sMarginal
Apple M1 (16GB Unified)Q8_05 tok/sMarginal

Showing 43 of 43 entries

Builder Context

Gemma 4 E2B is commonly used with Aider, Claude Code, Continue, Cursor, LM Studio, Ollama, Open WebUI, Windsurf. For an AI coding workflow, pair it with an embedding model like nomic-embed-text for local RAG.

FAQ

Frequently Asked Questions

How much VRAM does Gemma 4 E2B need?
Gemma 4 E2B requires 4.5 GB VRAM at recommended quality (Q6_K). At lower quality settings, it can fit in as little as 4 GB.
What is the best GPU for Gemma 4 E2B?
The NVIDIA Grace Blackwell Ultra GB300 delivers the best performance for Gemma 4 E2B, achieving 500 tok/s at Q8_0 with an excellent rating.
Can I run Gemma 4 E2B on an RTX 4060 Ti?
Yes. On the NVIDIA GeForce RTX 4060 Ti 16GB, Gemma 4 E2B runs at 43 tok/s (Q8_0, good).
What quantization should I use for Gemma 4 E2B?
For the best quality, use Q6_K (4.5 GB VRAM). If your GPU has limited VRAM, Q4_K_M (4 GB) is the most efficient option with acceptable quality.
Is Gemma 4 E2B good for coding?
Yes. Gemma 4 E2B is used with Aider, Claude Code, Continue, Cursor, LM Studio, Ollama, Open WebUI, Windsurf for local AI coding. For the best coding experience, pair it with an embedding model for local RAG.

Related Guides

All models

Data confidence: estimated. Source

VRAM requirements are calculated from model parameters and may vary by inference engine, context length, and batch size. Performance estimates are based on community benchmarks and should be verified for your specific configuration.Gemma is a trademark of its respective owner. OwnRig is not affiliated with or endorsed by the model creator.