Views
No views yet
RESEARCH / EDUCATIONAL QA ONLY. This adapter is NOT a medical device, NOT a diagnostic tool, and NOT a substitute for a qualified radiologist. It MUST NOT be used for clinical decision-making, screening, triage, or patient care. Outputs of the adapted model are frequently wrong.
google/medgemma-1.5-4b-it for the CXR Draft Auditor project. I pushed it to the Hub as a safety copy BEFORE the merge step, following the procedure I use across the project (push the adapter first, then merge into a clean bf16 base and verify a non-trivial weight delta, so a silent merge can never be published). Applying this adapter to the bf16 base model reproduces the merged v1 model, alex-feeel/medgemma-cxr-auditor. That v1 model originally served the CXR Draft Auditor demo Space, but as of 2026-06-12 it has been superseded as served by the v2 derivative (alex-feeel/medgemma-cxr-auditor-v2), which won the held-out head-to-head; I keep v1 for reference and reproducibility.google/medgemma-1.5-4b-it (HAI-DEF, gated; you must accept the HAI-DEF terms on the base repository to download it).alex-feeel/medgemma-cxr-auditor (v1, superseded as served by v2 on 2026-06-12).CAUSAL_LM, saved with PEFT 0.19.1.q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj (attention and MLP projections; by name match this covers both the Gemma-3 language tower and the vision-tower attention).SFTTrainer + PEFT QLoRA (4-bit NF4 via bitsandbytes), learning rate 2e-4, batch size 1, gradient accumulation 8, 1 epoch over approximately 6,800 curated, class-balanced CXR grounding examples, on a single A100 (80 GB) via Hugging Face Jobs.adapter_config.json and adapter_model.safetensors (approximately 66 MB), plus the tokenizer and processor configuration files saved alongside the adapter.1import torch
2from peft import PeftModel
3from transformers import AutoModelForImageTextToText, AutoProcessor
4
5base_id = "google/medgemma-1.5-4b-it" # gated: accept the HAI-DEF terms first
6base = AutoModelForImageTextToText.from_pretrained(base_id, dtype=torch.bfloat16)
7model = PeftModel.from_pretrained(base, "alex-feeel/medgemma-cxr-auditor-adapter")
8processor = AutoProcessor.from_pretrained(base_id)model.merge_and_unload() on the loaded PeftModel (on the bf16 base, never on a 4-bit quantized base) and verify the merged weights differ non-trivially from the base before using or distributing the result.NOTICE file is distributed with this repository. It states verbatim: "HAI-DEF is provided under and subject to the Health AI Developer Foundations Terms of Use found at https://developers.google.com/health-ai-developer-foundations/terms".