Skip to main content
DevHivesBlog

Search the blog

Find a post by title, tag or topic

MedGemma 2: Google's Free Healthcare Model You Can Run on a Laptop

Google released MedGemma 2, an open healthcare model you can download for free. Here's what it can do, what it costs, and how to build a portfolio project with it — without an API bill.

Arnab Biswas9 min read
WhatsApp
A sparkle beside a hand-written bracket, showing the balance between AI potential and coding limits.

On December 3, 2026, Google published MedGemma 2. The Hugging Face model card for the smaller version lists audio input on top of the usual text and image. That means a model can listen to a doctor dictate notes and turn them into text. It can also ask a hospital system for data, and it can run offline on your own machine. Is it worth your weekend, and what can you build with it?

MedGemma 2 is Google's open healthcare model, and you can download the weights for free. It comes in two sizes. The small one (E4B) is meant for laptops and phones, so you pay no per-request API bill, though I could not confirm its download size or memory need. It helps clinicians under oversight. It does not diagnose patients alone.

If "open weights" is a new term for you, read my explainer on open-weight vs closed AI models first. It explains why you can run this model without asking Google for a key.

MedGemma 2 comes in two sizes: E4B and 26B A4B

Google released two instruction-tuned checkpoints, a compact E4B for local devices and a 26B mixture-of-experts model for hospital servers, and both take 128K tokens of context, according to the 26B model card. Both are built on Gemma 4. "Instruction-tuned" means the model was trained to follow requests, so you can chat with it directly.

"Mixture-of-experts" means the big model holds many smaller sub-networks and uses only a few for each token (a piece of a word). That is why its active size is much smaller than its total size.

MedGemma 2 E4BMedGemma 2 26B A4B
SizeAbout 4.5B effective parameters26B total parameters
Active per tokenNot listed on the cardAbout 3.8B
InputsText, image, audioText, image
Context128K tokens128K tokens
Meant forPhones, edge devices, laptopsHospital on-premise servers, private cloud
SourceE4B card26B card
Watch: Introducing MedGemma 2 — Google for Developers (YouTube)

What MedGemma 2 can do: tools, citations, audio and long records

The new skills are native tool calling (FHIR queries, SQL, Python for clinical calculations), answers that cite references, medical dictation transcription on E4B, and reading long patient records, as described in Google's launch post. Here is what each one means in plain words.

  • Tool calling. The model writes a request for another program to run. That might be a query to a FHIR server (FHIR is the standard format hospitals use to share health data), a SQL query, or Python code for a dose calculation.
  • Cited answers. The model can use RAG (retrieval-augmented generation: it looks up passages in documents first, then answers from them). It can then point to the source, such as PubMed or a hospital guideline.
  • Dictation. The small model can turn a doctor's spoken notes into text.
  • Long records. It can read a long EHR (electronic health record, the digital file of a patient's history) in one go.

Say you are building a ward assistant. A nurse asks for the latest kidney test for one patient. Instead of guessing, the model writes a FHIR query, your code runs it, and the model reads the real result back. The model never needs to "remember" the patient. It fetches the data each time.

Both checkpoints

  • Tool calling (FHIR, SQL, Python)
  • Cited answers from documents
  • Long patient records
  • Image input

E4B only

  • Audio input and medical dictation
  • Running on a phone or edge device

Benchmark scores show where MedGemma 2 is strong and weak

On Google's own tests the model scores well on question answering and agent tasks, but the clinical calculation score of 59.1 for the small model, listed on the 26B model card, shows it still makes many mistakes. A calculation error in medicine is a wrong dose, so that weak spot matters most.

The small model answers medical questions well but still gets many calculations wrong.
The small model answers medical questions well but still gets many calculations wrong.
TestWhat it measuresScoreSource
MedQAExam-style medical questions82.3 (E4B), up from 69.1 for MedGemma 1.526B card
MedAgentBenchDoing multi-step tasks in a simulated health record system86.3 (26B), vs 81.3 for Gemma 4 26B26B card
MedCalc-BenchGetting clinical calculations right72.8 (26B), 59.1 (E4B)26B card
Grounded Clinical QAAnswering from given sources94.8 (E4B)26B card

Google ran these tests and reported the results. No outside group has checked them in the sources I have. Open the card yourself and read how each test was run.

This pattern is useful for builders. The model is good at reading and answering from documents you give it. It is weaker at arithmetic it does in its head. That is a good reason to hand calculations to a tool, which is what the project below does.

What it costs: free weights, your own hardware

The weights cost nothing to download, so your only costs are the laptop or phone you already own and any cloud server you choose to rent, as the E4B model card shows. No source I opened gives a dollar or rupee price, and there is no per-token paid API listed for these weights.

You can get the model in these places:

  • Hugging Face, for the raw weights
  • LiteRT-LM, for phones and edge devices
  • Ollama and llama.cpp, for running on a laptop
  • Unsloth, for fine-tuning on your own data
  • MLX, for Apple Silicon Macs
  • Google Cloud through the Gemini platform, if you want a hosted setup

The license is the HAI-DEF Terms of Use, linked from the card. It is not a standard open-source license like MIT. Read it before you ship anything, especially anything a real patient might touch. I have not checked whether it allows a public portfolio repo, so read the terms linked from the card before you publish a demo.

I have not tested E4B on a laptop, and no source I opened gives its download size or the memory it needs, so I cannot tell you whether an 8GB machine will cope. The model card and the page of whichever runtime you pick are where those figures should be, so check them before you plan your weekend.

Build an offline healthcare tool for your portfolio

A local tool that reads a clinical question, calls a function, and shows a cited answer proves more skill than another chatbot wrapper, and it needs no API key. Most beginner tutorials stop at "call an API and print the reply." Healthcare is skipped because it feels risky and the data is hard to get.

That gap is your chance. I think a recruiter in Bengaluru or Boston would notice tool calling and retrieval running offline in one repo. They may also notice that you thought about safety, which I suspect many junior projects skip.

Serious teams are already on this path. Google says AIIMS New Delhi is adapting MedGemma and Google's open models to build and evaluate outpatient-triage and dermatology-screening apps. The same post says MedGemma has been downloaded over 10 million times, with more than 1,000 derived models, in 18 months.

  1. Pick E4B

    It is the size meant for a laptop, and it is enough for a demo.

  2. Run it locally with llama.cpp

    Load the E4B weights from the Hugging Face card in llama.cpp, the laptop route listed above, and confirm it answers a simple medical question offline. Check the card for the exact file and memory needs first.

  3. Give it one tool

    Write a BMI or dose calculator in Python. Let the model call it instead of doing the maths itself.

  4. Add a guideline document

    Put a short public guideline in a folder. Retrieve the matching passage and ask the model to cite it.

  5. Test with made-up data only

    Invent patients. Never paste a real record, not even your own family's.

A tool definition for the calculator can be this small:

def bmi(weight_kg: float, height_m: float) -> float:
    """Return body mass index for an adult."""
    return round(weight_kg / (height_m ** 2), 1)
tools = [{
    "type": "function",
    "function": {
        "name": "bmi",
        "description": "Calculate adult BMI from weight in kg and height in metres",
        "parameters": {
            "type": "object",
            "properties": {
                "weight_kg": {"type": "number"},
                "height_m": {"type": "number"}
            },
            "required": ["weight_kg", "height_m"]
        }
    }
}]

Google has a pattern of releasing domain models in the open. Its CellGemma model for cell and drug prediction is another one worth a look if biology interests you.

What MedGemma 2 cannot do

It supports clinicians who stay in charge and it does not diagnose a patient on its own, so your project must say so on screen. The model card's intended-use and limitations text is clear that outputs need checking by a qualified person.

Good benchmark scores are not clinical proof. A model can pass exam questions and still give a confident wrong answer about a real person. Treat every output as a draft for a human to review.

Do

  • Label the app "Demo. Not medical advice." on every screen
  • Use synthetic, made-up patient data
  • Show the source passage next to each answer
  • Copy the card's limits into your README

Don't

  • Claim your app diagnoses anyone
  • Upload real health records, even anonymised ones
  • Let the model do dose maths without a tool
  • Share the demo with real patients

Should you try MedGemma 2 this week?

Try it if you already know basic Python and want a project with a clear user; skip it if you are still learning functions and loops. Tool calling and retrieval build on those basics, and debugging them without that base is painful.

Say you are a final-year student in Pune who has built two CRUD apps. This project gives your resume a third line that stands apart from everyone else's to-do app. A bootcamp graduate in Ohio applying to health-tech startups gets a different benefit: you can talk about FHIR and safety in an interview, which I expect those teams care about.

If you are deciding between open models more broadly, my post on Qwen4 35B A3B covers a general-purpose option. On size, the choice is simple. Use E4B for a laptop project. Use 26B A4B only if you have access to a server.

Download the E4B model from Hugging Face, run it with llama.cpp, and give it one tool, such as the BMI calculator above (a real dose tool would need clinical review), before you build anything bigger. Then read the model card's limits section and write them into your project's README.

ShareWhatsAppLinkedInX

Picked from the tags and topic of this post.

A speech bubble containing code with a timer, showing the new /swarm feature that turns a prompt into an agent team.
ai5 min read

Gemini 4 Carbon /swarm: Google's $2 agent team for student projects

Google released Gemini 4 Carbon to developers at an intro price of $2 per million input tokens, with the /swarm feature that turns one prompt into a team of agents. Here is what the launch means for student projects and how to try it today.

Arnab Biswas
A sparkle of AI over a crossed-out copy icon, showing Gemini editing files directly in chat without copying.
ai5 min read

Gemini Gets Native PDF and Document Editing in the Chat

Gemini's app can now preview and edit PDFs, Docs, Sheets, Slides, code, Markdown and TXT files without leaving the chat. It is free for all users, and you fix files by typing in full screen or by highlighting a section and asking.

Arnab Biswas