Views
No views yet
Reusable as both the Kaggle model card and the Medium/blog blurb. ⚠️ Research & education only - NOT for clinical or patient-facing use.
google/medgemma-1.5-4b-it
on medical chain-of-thought reasoning. It is the supervised-fine-tuned ("after") checkpoint that
replicates, on a medical-specialist base, the central finding of the companion Qwen3-4B study: this
fine-tune makes the model's internal (token-probability) confidence markedly better calibrated
and dramatically less over-cautious. Trained entirely on a single free Kaggle T4.q/v/o/gate/up/down projections. Trainable params well under 1% of the model.train_loss 1.72 to ~1.56;
~4.6 h on one T4 (fp32 is ~2.7× slower per step than fp16).adapter_config.json + adapter_model.safetensors). Load on top of the
gated base (you must accept MedGemma's terms and supply an HF token).FreedomIntelligence/medical-o1-reasoning-SFT
(Apache-2.0): chain-of-thought medical Q&A, GPT-4o-generated reasoning validated by a medical verifier.
No PHI.| metric | base | +this adapter | Δ [95% CI] |
|---|---|---|---|
| Accuracy ↑ | 0.556 | 0.505 | -0.051 [-0.105, +0.006] (n.s.) |
| ECE ↓ (calibration error) | 0.304 | 0.126 | -0.178 [-0.235, -0.122] |
| AURC ↓ (selective prediction) | 0.352 | 0.345 | -0.007 [-0.078, +0.063] (n.s.) |
| Abstention rate | 0.696 | 0.096 | -0.600 [-0.634, -0.566] |
healthcare/exp-004-confidence-tax/. code at https://github.com/Mr-Neutr0n/confidence-tax-study1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3from peft import PeftModel
4
5base = "google/medgemma-1.5-4b-it" # gated: accept terms + pass token=...
6tok = AutoTokenizer.from_pretrained(base, token=HF_TOKEN)
7model = AutoModelForCausalLM.from_pretrained(
8 base, torch_dtype=torch.float32, attn_implementation="eager", # fp32 + eager on T4
9 device_map="auto", token=HF_TOKEN)
10model = PeftModel.from_pretrained(model, "<this-adapter-path>") # load the LoRA adapter