Google released MedGemma 2 on 3 December. It's built on Gemma 4, it comes in two sizes, and the headline change isn't better answers to medical quiz questions. It's tool use: the model card says it can write "structured HL7 FHIR API queries, SQL queries, and Python code for external execution", and the launch post adds search over sources like PubMed or a hospital's own protocols, with the source passages cited.

That changes how you pick a size. Here's what I'd look at before downloading anything.

The two sizes, side by side

MedGemma 2 E4B MedGemma 2 26B (MoE)
Hugging Face ID google/medgemma-2-E4B-it google/medgemma-2-26B-A4B-it
Parameters in the weights 8.0B (BF16) 25.8B (BF16), about 4B active per token
Weights on disk at BF16 about 16 GB about 52 GB
Inputs text, images (including CT and MRI volumes, and video), audio text, images (including volumes and video)
Context up to 128K input tokens validated at 128K (the card also says up to 256K)
Pipeline task any-to-any image-text-to-text
Google's intended home phones, tablets, laptops, edge on-prem hospital servers, private cloud

E4B means about 4B effective parameters (the card says 4.5B). The repo holds about 8B because it also includes per-layer embeddings and the encoders. The weight sizes are my arithmetic from the parameter counts Hugging Face reports for each repo (7,996,156,490 and 25,805,936,206), times 2 bytes for BF16. That's weights only. Google's research post puts the memory needed to run them at about 18 GB and 58 GB, and says the 26B needs a single 80 GB-class GPU. The phone story uses a 4-bit LiteRT-LM build, not these BF16 files.

One thing that trips people up with mixture-of-experts models: "4B active" is about speed, not memory. Every expert still has to be loaded, so the 26B model needs room for all 52 GB of weights even though each token only runs through about 4B parameters.

The benchmark gap that should decide it

The model card reports these for the two sizes (E4B first, 26B second):

Benchmark E4B 26B MoE
MedAgentBench (success rate) 53.3 86.3
MedCalc-Bench Verified (accuracy) 59.1 72.8
EHRQA, FHIR, internal (accuracy) 95.6 95.2
Grounded Clinical QA, internal (accuracy) 94.8 95.6

Read those two halves separately.

For answering a question over a patient record that's already in front of the model, the small one is level with the big one. On Google's internal EHRQA set over FHIR data, it's 95.6 vs 95.2.

For multi-step work, where the model has to decide which tool to call, read the result and call the next one, the gap is 33 points on MedAgentBench. If your app is a lookup or summary screen, E4B on a laptop looks reasonable. If it's an agent that chains FHIR calls and calculations, plan for the 26B and the hardware that comes with it.

Getting it running

Both repos are gated. You have to sign in to Hugging Face and accept the conditions before the files will download, so do that first or the download in your script will fail.

Then install a recent Transformers. The card says Gemma 4 support starts at 5.10.1, and recommends 5.15.0 or higher so responses parse correctly with thinking mode and tool calling:

pip install -U "transformers>=5.15.0" accelerate 

This is adapted from the model card's quick start. The task name differs between the two sizes, which is an easy copy-paste mistake:

from transformers import pipeline pipe = pipeline( "any-to-any", # "image-text-to-text" for the 26B model model="google/medgemma-2-E4B-it", # or "google/medgemma-2-26B-A4B-it" device_map="auto", dtype="auto", ) messages = [ { "role": "user", "content": [ {"type": "image", "url": "<your image URL>"}, {"type": "text", "text": "Describe this X-ray"}, ], } ] output = pipe(text=messages, max_new_tokens=1024) print(output[0]["generated_text"][-1]["content"]) 

The card also shows the lower-level route with AutoProcessor and AutoModelForMultimodalLM, where you pass enable_thinking to apply_chat_template and read the result with processor.parse_response. Use that one once you need thinking mode or tool calls.

If you plan to run a quantized build through llama.cpp or Ollama, keep one note from the card in mind: quantized and community-converted versions "may perform differently from the original BF16 weights." Test your own cases on BF16 first so you have a baseline to compare against.

Read this before you ship anything

The weights are open, but they aren't Apache 2.0 like Gemma 4. MedGemma 2 is governed by the Health AI Developer Foundations Terms of Use and a Prohibited Use Policy. Read both before you put it in a product.

The model card is also blunt about responsibility, and it's worth building around these lines rather than skimming them:

  • Outputs "are not intended to directly inform clinical diagnosis." The same sentence also rules out treatment recommendations and clinical calculations, which matters if you're building a calculator agent.
  • The model is not meant to be used without "appropriate validation, adaptation, and/or making meaningful modification."
  • Developers "are solely responsible for the validation, security, execution and correctness of any tools, APIs, or data sources connected to the model."

In practice that last one means three things for a tool-calling setup:

  1. Run any generated SQL or Python in a sandbox with read-only credentials. Never against production data directly.
  2. Log every tool call with its inputs and outputs, so a clinician or reviewer can see what the model actually asked for.
  3. Evaluate on your own records, not only on the published benchmarks. A 95.6 on EHRQA says nothing about how your FHIR server names things.

Quick pick

  • Laptop, phone or edge box, single-turn questions over a record: start with E4B.
  • An agent that chains several tool calls, on a server you control: the 26B, with about 52 GB for weights plus cache.
  • Not sure yet: prototype on E4B, then run the same tasks on the 26B before you commit. The MedAgentBench gap suggests where the difference will show.

For the general-purpose Gemma 4 26B A4B, Toolbit's model page has its specs, API pricing and independent benchmark scores: https://www.toolbit.ai/updates/models/gemma-4-26b-a4b?utm_source=devto&utm_medium=organic&utm_campaign=medgemma-2 (I work at Toolbit, for what it's worth.)

Sources: Google's launch post (blog.google, 3 Dec 2026), Google Research's technical post on MedGemma 2, the MedGemma 2 model card on developers.google.com, and the two Hugging Face repos.

This article was created with the help of AI. Every fact in it was checked against Google's and Hugging Face's own pages on 4 December 2026.