Access Gemma on Hugging Face
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
To access Gemma on Hugging Face, you’re required to review and agree to Google’s usage license. To do this, please ensure you’re logged in to Hugging Face and click below. Requests are processed immediately.
Log in or Sign Up to review the conditions and access this model content.
mkurman/med-gemma-3-270m-it
A small, instruction-tuned medical Q&A model built on google/gemma-3-270m-it, fine-tuned on synthetic multi-domain medical question–answer datasets.
Model Details
- Base model:
google/gemma-3-270m-it - Architecture: Decoder-only transformer (Gemma 3, ~270M params)
- Author: Mariusz Kurman
- Task: Instruction-following for medical Q&A
- License: Inherits terms from the Gemma license (please review the base model’s license before use)
Intended Use & Limitations
- Intended use: Educational and research exploration of small medical Q&A models; prototyping pipelines where latency and footprint matter.
- Out of scope / Limitations: Not a medical device. Not for real-world clinical decision-making, triage, or patient care. May generate incorrect, outdated, or fabricated content. Always verify with authoritative sources.
Training Data
- Sources: Multiple synthetic medical Q&A datasets from the author’s internal collection, spanning major disciplines (e.g., internal medicine, neurology, cardiology, OB-GYN, emergency medicine).
- Notes: Synthetic data may contain inaccuracies or distributional quirks; no PHI included.
Training Procedure (summary)
- Objective: Supervised fine-tuning (SFT) on instruction–response pairs.
- Formatting: Instruction (question / task) → short, direct or long deep answer; mixture of single and multi-turn examples.
- Evaluation: Light, qualitative checks on held-out synthetic prompts; no formal benchmark claimed.
Prompting
The model generally responds well to concise instructions.
Gemma-style
<start_of_turn>user
List three red flags for subarachnoid hemorrhage.
<end_of_turn>
<start_of_turn>model
Quickstart (Transformers)
from transformers import AutoTokenizer, AutoModelForCausalLM, TextStreamer
import torch
model_id = "mkurman/med-gemma-3-270m-it"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.float32,
device_map="auto"
)
tokens = tokenizer.apply_chat_template([{'role': 'user', 'content': 'Outline initial management steps for suspected anaphylaxis'}], add_generation_prompt=True, return_tensors='pt')
outputs = model.generate(
input_ids=tokens,
max_new_tokens=1024,
use_cache=True,
do_sample=False,
repetition_penalty=1.1,
streamer=TextStreamer(tokenizer, skip_prompt=False),
eos_token_id=tokenizer.eos_token_id
)
Responsible Use
- Do not use for health advice, diagnosis, or treatment decisions.
- Validate all outputs with peer-reviewed guidelines or licensed clinicians.
- Consider adding guardrails (e.g., refusal templates for patient-specific advice).
Known Gaps
- Small parameter count limits depth and factual recall.
- No formal external medical benchmark reporting yet.
- May be sensitive to prompt phrasing; keep instructions short and specific.
Citation
If you use this model, please cite:
@misc{med_gemma_3_270m_it_2025,
title = {mkurman/med-gemma-3-270m-it},
author = {Kurman, Mariusz},
year = {2025},
url = {https://huggingface.co/mkurman/med-gemma-3-270m-it}
}
Changelog
- 2025-09-08: Initial release.
Questions or feedback? Open an issue or discussion on the model page.
- Downloads last month
- 1