Instructions to use unofficial-jona/MedGemma-27B-IT-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use unofficial-jona/MedGemma-27B-IT-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf unofficial-jona/MedGemma-27B-IT-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf unofficial-jona/MedGemma-27B-IT-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf unofficial-jona/MedGemma-27B-IT-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf unofficial-jona/MedGemma-27B-IT-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf unofficial-jona/MedGemma-27B-IT-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf unofficial-jona/MedGemma-27B-IT-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf unofficial-jona/MedGemma-27B-IT-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf unofficial-jona/MedGemma-27B-IT-GGUF:Q4_K_M
Use Docker
docker model run hf.co/unofficial-jona/MedGemma-27B-IT-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use unofficial-jona/MedGemma-27B-IT-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unofficial-jona/MedGemma-27B-IT-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unofficial-jona/MedGemma-27B-IT-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/unofficial-jona/MedGemma-27B-IT-GGUF:Q4_K_M
- Ollama
How to use unofficial-jona/MedGemma-27B-IT-GGUF with Ollama:
ollama run hf.co/unofficial-jona/MedGemma-27B-IT-GGUF:Q4_K_M
- Unsloth Studio
How to use unofficial-jona/MedGemma-27B-IT-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for unofficial-jona/MedGemma-27B-IT-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for unofficial-jona/MedGemma-27B-IT-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for unofficial-jona/MedGemma-27B-IT-GGUF to start chatting
- Docker Model Runner
How to use unofficial-jona/MedGemma-27B-IT-GGUF with Docker Model Runner:
docker model run hf.co/unofficial-jona/MedGemma-27B-IT-GGUF:Q4_K_M
- Lemonade
How to use unofficial-jona/MedGemma-27B-IT-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unofficial-jona/MedGemma-27B-IT-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.MedGemma-27B-IT-GGUF-Q4_K_M
List all available models
lemonade list
- Atomic Chat
MedGemma 27B IT — GGUF Q4_K_M
This repository contains a 4-bit GGUF quantization of Google's MedGemma 27B IT, created for local inference with llama.cpp and compatible applications such as LM Studio.
It is a multimodal model. Download both files to use image inputs:
| File | Purpose | Approximate disk size |
|---|---|---|
MedGemma-27B-IT-Q4_K_M.gguf |
Main language model, 4-bit Q4_K_M quantization | ~16 GB |
mmproj-MedGemma-27B-IT-F16.gguf |
Medical vision encoder/projector (kept at F16) | ~1 GB |
Q4_K_M is a quality-oriented 4-bit quantization. It substantially reduces memory use relative to the original BF16 checkpoint while preserving the model's instruction-following capability. This is a lossy conversion; validate outputs for your intended task.
Requirements
Use a recent build of llama.cpp with Gemma 3 multimodal support.
| Workload | Practical hardware guidance |
|---|---|
| Text-only inference | 20 GB+ VRAM is a practical starting point for full GPU offload at modest context; 16 GB GPUs need partial CPU offload |
| Text + image inference | 24 GB+ VRAM recommended; a 20 GB GPU can run modest contexts, while 16 GB GPUs need partial CPU offload |
| Long context | Extra memory is required for the KV cache; begin at 4K context on a 20 GB GPU and increase only after measuring memory use |
Actual memory use depends on context size, batch size, GPU offload layers, and runtime build. The model weights alone are about 15.4 GiB and the F16 vision projector adds about 0.8 GiB. A 20 GB GPU is a good starting point for 4K context, but does not make the full 128K-token capability practical without substantial CPU/RAM offload.
Download
hf download unofficial-jona/MedGemma-27B-IT-GGUF \
MedGemma-27B-IT-Q4_K_M.gguf mmproj-MedGemma-27B-IT-F16.gguf \
--local-dir ./MedGemma-27B-IT-GGUF
Use with llama.cpp
Text-only
llama-cli -m ./MedGemma-27B-IT-Q4_K_M.gguf \
-ngl 999 -c 8192 \
-p "<start_of_turn>user\nExplain the difference between bacterial and viral pneumonia for a clinician.<end_of_turn>\n<start_of_turn>model\n"
Text and image
llama-mtmd-cli -m ./MedGemma-27B-IT-Q4_K_M.gguf \
--mmproj ./mmproj-MedGemma-27B-IT-F16.gguf \
--image ./image.png -ngl 999 -c 8192 \
-p "<start_of_turn>user\nDescribe the image cautiously and list any uncertainty.<end_of_turn>\n<start_of_turn>model\n"
Use the chat template supplied by your runtime when it offers a Gemma 3 / MedGemma template. Command-line option names can differ slightly across llama.cpp releases; run the executable with --help to confirm the multimodal image flag.
Important medical-use notice
MedGemma is a research/developer model, not a medical device. It can make incorrect, incomplete, biased, or unsafe statements. Do not use it as the sole basis for diagnosis, triage, treatment, or other clinical decisions. Keep qualified clinical review and appropriate safeguards in any healthcare workflow.
Provenance and license
- Base model: google/medgemma-27b-it
- Quantization: llama.cpp
Q4_K_M(main model); F16 vision projector - Original author: Google
- Original license and access terms: Health AI Developer Foundations terms of use
This conversion does not change the original model's license, usage terms, or safety limitations. Access to the base model requires agreeing to its original terms on Hugging Face.
Citation
@article{sellergren2025medgemma,
title={MedGemma Technical Report},
author={Sellergren, Andrew and others},
journal={arXiv preprint arXiv:2507.05201},
year={2025}
}
- Downloads last month
- 466
4-bit