Downloads · 30 days
0
abnuel/MedGemma-4b-ICD
MedGemma-4b-ICD is a text generation model from abnuel. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gemma.
Fine-tuned version of google/medgemma-4b-it for automated ICD medical coding from clinical text. Given a clinical note or diagnosis description, this model generates the corresponding ICD-10 code(s).
Downloads · 30 days
0
Access
Public
Updated Apr 10, 2026
Repo size
169 MB
Likes
2
Public
Click a slice to open those files.
.safetensors131 MB · 77%
From the Hugging Face model README
Fine-tuned version of google/medgemma-4b-it for automated ICD medical coding from clinical text. Given a clinical note or diagnosis description, this model generates the corresponding ICD-10 code(s).
🚀 Live Demo: spaces/abnuel/med-coding
ICD (International Classification of Diseases) coding is a critical but labor-intensive clinical workflow. This model was fine-tuned using supervised fine-tuning (SFT) with TRL on a curated dataset of clinical text paired with ICD-10 codes, enabling automated code suggestion from free-text diagnoses and clinical documentation.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "abnuel/MedGemma-4b-ICD"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
prompt = "Patient presents with type 2 diabetes mellitus with diabetic chronic kidney disease, stage 3."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=64)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
If you use this model in your research, please cite:
@misc{adegunlehin2025medgemma-icd,
author = {Abayomi Adegunlehin},
title = {MedGemma-4b-ICD: Fine-tuned MedGemma for ICD-10 Medical Coding},
year = {2025},
url = {https://huggingface.co/abnuel/MedGemma-4b-ICD}
}