Model reference · open weights
medgemma is an open-weight language model from Google. medgemma-4b-it-GGUF (GGUF) weighs 2.5 GB; the smallest configuration that runs it is RTX 3060 12 GB.
Summary of the google/medgemma-4b-it model card, 2026-10-01. The estimate below is for another build of the family.
What it is
| Released by | |
|---|---|
| Released | 2025-05-19 |
| Parameters | 4.3B |
| VRAM | 2.5 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory | |
|---|---|---|---|---|
| 8K each | 32K each | |||
| RTX 3060 12 GB | 10 | 6 | all 128K | 11.6 GB |
| RTX 4060 Ti 16 GB | 15 | 9 | all 128K | 15.4 GB |
| RTX 3090 24 GB | 25 | 15 | all 128K | 23.4 GB |
| RTX 4090 24 GB | 25 | 15 | all 128K | 23.4 GB |
| RTX 5090 32 GB | 34 | 21 | all 128K | 31.0 GB |
| L40S 48 GB | 50 | 31 | all 128K | 44.0 GB |
| A100 80 GB | 93 | 57 | all 128K | 78.2 GB |
| H100 80 GB | 63 | 26 | all 128K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 77 | 32 | all 128K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 88 | 37 | all 128K | 107 GB |
| H200 141 GB | 114 | 47 | all 128K | 138 GB |
| B200 180 GB | 147 | 36 | all 128K | 176 GB |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 4.2 GB | 4.7 GB |
| 5 | 7.4 GB | 9.9 GB |
| 8 | 9.8 GB | 13.8 GB |
| 16 | 16.1 GB | 24.2 GB |
| 32 | 28.9 GB | 45.0 GB |
| 64 | 54.4 GB | 86.6 GB |
One card, with vLLM's small-card settings.
Builds
| Build | Params | Precision | Weights | Smallest setup |
|---|---|---|---|---|
| medgemma-4b-it ↗ | 4.3B | BF16 | 8.6 GB | RTX 3060 12 GB |
| medgemma-27b-it ↗ | 28.8B | BF16 | 54.9 GB | H100 80 GB |
| medgemma-4b-it-GGUF (above) ↗ packaged by unsloth 26 builds: IQ1_S 1.2 GB … BF16 7.8 GB |
— | GGUF | 2.5 GB | RTX 3060 12 GB |
From the model card
Model documentation: MedGemma
Resources:
Author: Google
This section describes the MedGemma model and how to use it.
MedGemma is a collection of Gemma 3 variants that are trained for performance on medical text and image comprehension. Developers can use MedGemma to accelerate building healthcare-based AI applications. MedGemma currently comes in three variants: a 4B multimodal version and 27B text-only and multimodal versions.
Both MedGemma multimodal versions utilize a SigLIP image encoder that has been specifically pre-trained on a variety of de-identified medical data, including chest X-rays, dermatology images, ophthalmology images, and histopathology slides. Their LLM components are trained on a diverse set of medical data, including medical text, medical question-answer pairs, FHIR-based electronic health record data (27B multimodal only), radiology images, histopathology patches, ophthalmology images, and dermatology images.
MedGemma 4B is available in both pre-trained (suffix: -pt) and
instruction-tuned (suffix -it) versions. The instruction-tuned version is a
better starting point for most applications. The pre-trained version is
available for those who want to experiment more deeply with the models.
MedGemma 27B multimodal has pre-training on medical image, medical record and medical record comprehension tasks. MedGemma 27B text-only has been trained exclusively on medical text. Both models have been optimized for inference-time computation on medical reasoning. This means it has slightly higher performance on some text benchmarks than MedGemma 27B multimodal. Users who want to work with a single model for both medical text, medical record and medical image tasks are better suited for MedGemma 27B multimodal. Those that only need text use-cases may be better served with the text-only variant. Both MedGemma 27B variants are only available in instruction-tuned versions.
MedGemma variants have been evaluated on a range of clinically relevant benchmarks to illustrate their baseline performance. These evaluations are based on both open benchmark datasets and curated datasets. Developers can fine-tune MedGemma variants for improved performance. Consult the Intended Use section below for more details.
MedGemma is optimized for medical applications that involve a text generation component. For medical image-based applications that do not involve text generation, such as data-efficient classification, zero-shot classification, or content-based or semantic image retrieval, the MedSigLIP image encoder is recommended. MedSigLIP is based on the same image encoder that powers MedGemma.
Please consult the MedGemma Technical Report for more details.
Below are some example code snippets to help you quickly get started running the model locally on GPU. If you want to use the model at scale, we recommend that you create a production version using Model Garden.
First, install the Transformers library. Gemma 3 is supported starting from transformers 4.50.0.
$ pip install -U transformers
Run model with the pipeline API
from transformers import pipeline
from PIL import Image
import requests
import torch
pipe = pipeline(
"image-text-to-text",
model="google/medgemma-4b-it",
torch_dtype=torch.bfloat16,
device="cuda",
)
# Image attribution: Stillwaterising, CC0, via Wikimedia Commons
image_url = "https://upload.wikimedia.org/wikipedia/commons/c/c8/Chest_Xray_PA_3-8-2010.png"
image = Image.open(requests.get(image_url, headers={"User-Agent": "example"}, stream=True).raw)
messages = [
{
"role": "system",
"content": [{"type": "text", "text": "You are an expert radiologist."}]
},
{
"role": "user",
"content": [
{"type": "text", "text": "Describe this X-ray"},
{"type": "image", "image": image}
]
}
]
output = pipe(text=messages, max_new_tokens=200)
print(output[0]["generated_text"][-1]["content"])
Run the model directly
# pip install accelerate
from transformers import AutoProcessor, AutoModelForImageTextToText
from PIL import Image
import requests
import torch
model_id = "google/medgemma-4b-it"
model = AutoModelForImageTextToText.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
processor = AutoProcessor.from_pretrained(model_id)
# Image attribuQuoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.
How it works