MedGemma 2 E4B

Gemma 4 E4B trained on medical text and images, with 8B parameters including per-layer embeddings and a 4.5B effective size.

Google·8B params·42 layers / 2 KV heads·Max 128K ctx·Health AI Developer Foundations
Local Run Command
Q4_K_M minimum memory: 7.3 GB at 16K context.
Artificial Analysis Benchmarkartificialanalysis.ai ↗
Intelligence Index
—

Independent benchmark scores sourced from Artificial Analysis.

OpenRouter API & Cloud GPU
No live OpenRouter route synced.

VRAM by Quantization (16K context)

Q4_K_M (4-bit)6.2 GB
real file size
0.1 GB7.3 GB7.3 GBBest speed-to-quality balance for local inference (~98% quality)
ollama run medgemma2:e4b
Q6_K (6-bit)8.4 GB
estimate
0.1 GB9.6 GB9.6 GBNear-lossless quality with ~35% larger footprint than Q4
Q8_0 (8-bit)8.4 GB
real file size
0.1 GB9.7 GB9.6 GBVirtually indistinguishable from FP16 for coding & reasoning
ollama run medgemma2:e4b-q8_0
FP16 / BF16 (16-bit)14.9 GB
real file size
0.1 GB16.5 GB16.4 GBFull native precision; standard for production GPU serving
ollama run medgemma2:e4b-bf16

Layer and head counts are read from the published config.json. KV cache is an approximation for this architecture: 18 layers reuse the cache of earlier layers; 35 sliding-window layers cache only the last 512 tokens.

Run MedGemma 2 E4B with Ollama, LM Studio, llama.cpp, MLX or vLLM

Command
Ollama
Q4_K_M
medgemma2:e4b
6.2 GB
real file size
LM Studio
Q4_K_M
ggml-org/medgemma-2-E4B-it-GGUF
6.2 GB
real file size
Not in LM Studio's catalog. Search for ggml-org/medgemma-2-E4B-it-GGUF in the app's Discover tab.
llama.cpp
Q4_K_M
ggml-org/medgemma-2-E4B-it-GGUF
6.2 GB
real file size
MLX
4-bit
4.3 GB
estimate
No 4-bit MLX build of this model on mlx-community. Convert one with mlx_lm.convert.
vLLM
INT4
4.8 GB
estimate
No INT4 build of this model found for vLLM.

Each runtime loads its own build of the model, so download sizes differ. Sizes marked as real are file sizes read from the Ollama registry or Hugging Face.

Hardware Compatibility Matrix (Q4_K_M · 16K context)

Details
11.5 GBFits comfortably7.2–9.7 tok/s—MedGemma 2 E4B on M1 16GB →
48.0 GBFits comfortably31–41 tok/s—MedGemma 2 E4B on M1 Max 64GB →
98.0 GBFits comfortably50–68 tok/s—MedGemma 2 E4B on M1 Ultra 128GB →
18.0 GBFits comfortably11.2–15.1 tok/s—MedGemma 2 E4B on M2 24GB →
48.0 GBFits comfortably37–50 tok/s—MedGemma 2 E4B on M2 Max 64GB →
152 GBFits comfortably56–76 tok/s—MedGemma 2 E4B on M2 Ultra 192GB →
27.0 GBFits comfortably16.0–22 tok/s—MedGemma 2 E4B on M3 Pro 36GB →
48.0 GBFits comfortably37–50 tok/s—MedGemma 2 E4B on M3 Max 64GB →
98.0 GBFits comfortably37–50 tok/s—MedGemma 2 E4B on M3 Max 128GB →
11.5 GBFits comfortably12.4–16.8 tok/s—MedGemma 2 E4B on M4 16GB →
24.0 GBFits comfortably12.4–16.8 tok/s—MedGemma 2 E4B on M4 32GB →
36.0 GBFits comfortably28–37 tok/s—MedGemma 2 E4B on M4 Pro 48GB →
48.0 GBFits comfortably28–37 tok/s—MedGemma 2 E4B on M4 Pro 64GB →
48.0 GBFits comfortably48–65 tok/s—MedGemma 2 E4B on M4 Max 64GB →
98.0 GBFits comfortably48–65 tok/s—MedGemma 2 E4B on M4 Max 128GB →
98.0 GBFits comfortably48–65 tok/s—MedGemma 2 E4B on Studio M4 Max 128GB →
204 GBFits comfortably57–77 tok/s—MedGemma 2 E4B on M3 Ultra 256GB →
430 GBFits comfortably57–77 tok/s—MedGemma 2 E4B on M3 Ultra 512GB →
24.0 GBFits comfortably20–27 tok/s—MedGemma 2 E4B on M1 Pro 32GB →
24.0 GBFits comfortably21–28 tok/s—MedGemma 2 E4B on M2 Pro 32GB →
27.0 GBFits comfortably31–42 tok/s—MedGemma 2 E4B on M3 Max 36GB →
11.5 GBFits comfortably12.4–16.8 tok/s—MedGemma 2 E4B on Air M4 16GB →
24.0 GBFits comfortably12.4–16.8 tok/s—MedGemma 2 E4B on Air M4 32GB →
18.0 GBFits comfortably28–37 tok/s—MedGemma 2 E4B on M4 Pro 24GB →
11.5 GBFits comfortably16.7–23 tok/s—MedGemma 2 E4B on Air M5 16GB →
24.0 GBFits comfortably16.7–23 tok/s—MedGemma 2 E4B on Air M5 32GB →
48.0 GBFits comfortably35–48 tok/s—MedGemma 2 E4B on M5 Pro 64GB →
98.0 GBFits comfortably63–86 tok/s—MedGemma 2 E4B on M5 Max 128GB →
24.0 GBFits comfortably19.0–26 tok/s—MedGemma 2 E4B on mini M6 32GB →
48.0 GBFits comfortably35–48 tok/s—MedGemma 2 E4B on mini M5 Pro 64GB →
98.0 GBFits comfortably63–86 tok/s—MedGemma 2 E4B on Studio M5 Max 128GB →
430 GBFits comfortably107–144 tok/s—MedGemma 2 E4B on Studio M5 Ultra 512GB →
11.2 GBFits comfortably39–53 tok/s1×MedGemma 2 E4B on RTX 3060 12GB →
9.2 GBFits comfortably72–98 tok/s1×MedGemma 2 E4B on RTX 3080 10GB →
22.8 GBFits comfortably82–110 tok/s1×MedGemma 2 E4B on RTX 3090 24GB →
15.0 GBFits comfortably33–44 tok/s1×MedGemma 2 E4B on RTX 4060 Ti 16GB →
15.0 GBFits comfortably70–95 tok/s1×MedGemma 2 E4B on RTX 4070 Ti S 16GB →
15.0 GBFits comfortably79–107 tok/s1×MedGemma 2 E4B on RTX 4080 S 16GB →
22.8 GBFits comfortably93–126 tok/s1×MedGemma 2 E4B on RTX 4090 24GB →
15.0 GBFits comfortably95–129 tok/s1×MedGemma 2 E4B on RTX 5070 Ti 16GB →
15.0 GBFits comfortably98–133 tok/s1×MedGemma 2 E4B on RTX 5080 16GB →
30.5 GBFits comfortably157–213 tok/s1×MedGemma 2 E4B on RTX 5090 32GB →
22.8 GBFits comfortably99–133 tok/s1×MedGemma 2 E4B on RX 7900 XTX 24GB →
15.0 GBFits comfortably64–86 tok/s1×MedGemma 2 E4B on RX 9070 XT 16GB →
10.2 GBFits comfortably57–77 tok/s1×MedGemma 2 E4B on RTX 2080 Ti 11GB →
7.3 GBPartial offload8.7–12.0 tok/s2×MedGemma 2 E4B on RTX 3060 Ti 8GB →
7.3 GBPartial offload8.7–12.0 tok/s2×MedGemma 2 E4B on RTX 3070 8GB →
11.2 GBFits comfortably70–95 tok/s1×MedGemma 2 E4B on RTX 3080 Ti 12GB →
22.8 GBFits comfortably93–125 tok/s1×MedGemma 2 E4B on RTX 3090 Ti 24GB →
7.3 GBPartial offload5.8–12.0 tok/s2×MedGemma 2 E4B on RTX 4060 8GB →
7.3 GBPartial offload6.1–12.0 tok/s2×MedGemma 2 E4B on RTX 4060 Ti 8GB →
11.2 GBFits comfortably48–65 tok/s1×MedGemma 2 E4B on RTX 4070 12GB →
11.2 GBFits comfortably57–77 tok/s1×MedGemma 2 E4B on RTX 4070 S 12GB →
11.2 GBFits comfortably56–75 tok/s1×MedGemma 2 E4B on RTX 4070 Ti 12GB →
15.0 GBFits comfortably74–100 tok/s1×MedGemma 2 E4B on RTX 4080 16GB →
15.0 GBFits comfortably47–64 tok/s1×MedGemma 2 E4B on RTX 5060 Ti 16GB →
11.2 GBFits comfortably68–91 tok/s1×MedGemma 2 E4B on RTX 5070 12GB →
15.0 GBFits comfortably59–80 tok/s1×MedGemma 2 E4B on RX 7800 XT 16GB →
18.9 GBFits comfortably66–90 tok/s1×MedGemma 2 E4B on RX 7900 XT 20GB →
15.0 GBFits comfortably64–86 tok/s1×MedGemma 2 E4B on RX 9070 16GB →
15.0 GBFits comfortably36–49 tok/s1×MedGemma 2 E4B on RX 9060 XT 16GB →
46.2 GBFits comfortably72–98 tok/s1×MedGemma 2 E4B on RTX A6000 48GB →
46.2 GBFits comfortably92–124 tok/s1×MedGemma 2 E4B on RTX 6000 Ada 48GB →
93.0 GBFits comfortably153–207 tok/s1×MedGemma 2 E4B on PRO 6000 96GB →
15.0 GBFits comfortably44–59 tok/s1×MedGemma 2 E4B on RTX A4000 16GB →
22.8 GBFits comfortably69–94 tok/s1×MedGemma 2 E4B on RTX A5000 24GB →
18.9 GBFits comfortably40–53 tok/s1×MedGemma 2 E4B on RTX 4000 Ada 20GB →
30.5 GBFits comfortably61–82 tok/s1×MedGemma 2 E4B on RTX 5000 Ada 32GB →
46.2 GBFits comfortably87–145 tok/s1×MedGemma 2 E4B on PRO 5000 48GB →
46.2 GBFits comfortably68–91 tok/s1×MedGemma 2 E4B on PRO W7900 48GB →
30.5 GBFits comfortably64–86 tok/s1×MedGemma 2 E4B on AI PRO R9700 32GB →
22.8 GBFits comfortably32–53 tok/s1×MedGemma 2 E4B on L4 24GB →
46.2 GBFits comfortably77–105 tok/s1×MedGemma 2 E4B on L40S 48GB →
38.5 GBFits comfortably93–155 tok/s1×MedGemma 2 E4B on A100 40GB →
77.5 GBFits comfortably102–138 tok/s1×MedGemma 2 E4B on A100 80GB →
77.5 GBFits comfortably123–167 tok/s1×MedGemma 2 E4B on H100 80GB →
137 GBFits comfortably136–226 tok/s1×MedGemma 2 E4B on H200 141GB →
175 GBFits comfortably149–248 tok/s1×MedGemma 2 E4B on B200 180GB →
15.0 GBFits comfortably26–36 tok/s1×MedGemma 2 E4B on T4 16GB →
46.2 GBFits comfortably62–84 tok/s1×MedGemma 2 E4B on A40 48GB →
46.2 GBFits comfortably82–110 tok/s1×MedGemma 2 E4B on L40 48GB →
115 GBFits comfortably30–40 tok/s—MedGemma 2 E4B on DGX Spark 128GB →
96.0 GBFits comfortably26–35 tok/s—MedGemma 2 E4B on Ryzen AI Max+ 395 128GB →
48.0 GBFits comfortably26–35 tok/s—MedGemma 2 E4B on Ryzen AI Max+ 395 64GB →

Frequently asked questions

How much VRAM does MedGemma 2 E4B require?

At Q4_K_M quantization with a 16K context window, MedGemma 2 E4B needs 7.3 GB total VRAM (6.2 GB weights + 0.1 GB KV cache + runtime overhead). In full FP16 precision, it requires 16.5 GB.

Can an RTX 4090 (24 GB) run MedGemma 2 E4B?

Yes. At Q4_K_M with 16K context MedGemma 2 E4B needs 7.3 GB, which fits a single 24 GB RTX 4090 at an estimated 93–126 tok/s.

How do I run MedGemma 2 E4B locally with Ollama?

Install Ollama and run `ollama run medgemma2:e4b` in your terminal. Make sure your GPU or Apple Silicon unified memory meets the 7.3 GB Q4_K_M requirement.