Instructions to use akmaier/medgemma-4b-figcaption-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use akmaier/medgemma-4b-figcaption-lora with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Access the MedGemma caption adapters
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
These LoRA adapters are derivatives of google/medgemma-4b-it and are governed by the Gemma Terms of Use and the Health AI Developer Foundations terms. Research and evaluation only, not for clinical use.
Log in or Sign Up to review the conditions and access this model content.
Figure-captioning LoRA adapters (MedGemma-4B)
PEFT LoRA adapters (r=16, alpha=32) fine-tuned on medical figure captions on top of google/medgemma-4b-it.
They accompany a SPIE Medical Imaging study on caption fine-tuning for medical figure captioning, and are
released for research and evaluation only. Not for clinical use. Access is gated because these are Gemma
derivatives (Gemma + Health AI Developer Foundations terms). Manuscript under submission.
Conditions (subfolders; seeds 42/43/44)
c1_raw_s{seed}: fine-tuned on raw figure captions.c2_clean_s{seed}: fine-tuned on cleaned captions.c3_aux_s{seed}: cleaned captions plus an auxiliary content loss.
C0 (zero-shot) is the base model with no adapter.
Loading
from peft import PeftModel
from transformers import AutoModelForImageTextToText
base = AutoModelForImageTextToText.from_pretrained("google/medgemma-4b-it", torch_dtype="bfloat16")
model = PeftModel.from_pretrained(base, "akmaier/medgemma-4b-figcaption-lora", subfolder="c2_clean_s42")
Notes
Trained on medical figure captions from open-access and text-and-data-mining sources (figures only; no captions or images are shipped). Findings: fine-tuning raises content overlap and hallucination together; the auxiliary loss does not help; for this 4B model caption cleaning does not reduce hallucination and instead trims content. The models do not reliably perceive imaging artifacts. For research and evaluation, not for clinical decisions.
- Downloads last month
- -