alio-medical (Gemma 4 E2B fine-tune)

Fine-tuned Gemma 4 E2B for plain-language medical text simplification, built for the Gemma 4 Good Hackathon on Kaggle (May 2026).

Project: Alio — an offline-first caregiver/family app that turns messy nurse notes, voice transcripts, and scanned lab reports into plain-language updates families can read in 30 seconds. Code at JzZ404/Alio.

What this model does

Three tasks, all in plain English / family-readable language:

  1. Lab panel interpretation — given a CMP, CBC, Lipid panel, A1c, etc., produce a JSON summary with flags and a follow-up urgency level
  2. Caregiver shift compilation — turn a stream of voice notes from a single shift into one concise narrative
  3. Symptom triage — classify a symptom report into self_care / this_week / today / emergency with a plain-language explanation

Training

  • Base: unsloth/gemma-4-E2B-it (5.15B params, "edge" tier)
  • Adapter: LoRA r=16, α=32, dropout=0.05, all attention + MLP modules (q,k,v,o,gate,up,down)
  • Trainable params: 31M / 5.15B = 0.60%
  • Data: 898 train + 100 val pairs from three sources:
    • Kaggle Medical Transcriptions (real clinical notes filtered to general/internal medicine, cardiology, neurology) — labeled by hosted Gemma 4 31B (teacher-student distillation)
    • Synthetic lab panels — 15 panel types (CMP, CBC, Lipid, A1c, Iron, Vit D, B12, TSH, etc.) in MyChart/Epic format
    • Synthetic symptom triage scenarios across 4 severity tiers
  • Trainer: Unsloth + TRL SFTTrainer on Kaggle T4 (2 epochs, lr=5e-5, max_grad_norm=1.0)
  • Quantization: q4_k_m GGUF for portable local inference

How to use

Via Ollama (recommended)

ollama pull hf.co/aarony630/alio-medical
ollama run hf.co/aarony630/alio-medical "Glucose 218 mg/dL, BUN 42, Creatinine 2.1, eGFR 35. Explain in plain language."

Or with the included Modelfile:

ollama create alio-medical -f Modelfile
ollama run alio-medical

Chat template

The model expects Gemma 4's chat template:

<|turn>system
You are a medical assistant that explains health information in plain language for family members.<turn|>
<|turn>user
[your input]<turn|>
<|turn>model

Recommended sampling: temperature=0.4, top_p=0.9, stop="<turn|>".

Files in this repo

  • gemma-4-e2b-it.Q4_K_M.gguf (3.4 GB) — the fine-tuned text model. Q4_K_M quantization. Used by Ollama for all medical-text generation (lab interpretation, caregiver shift compilation, symptom triage).
  • gemma-4-e2b-it.F16-mmproj.gguf (940 MB) — multimodal projector (vision/audio encoder). This is the base Gemma 4 E2B projector, unchanged — only the text decoder was LoRA-fine-tuned. Use this with llama-mtmd-cli for offline image input (Ollama doesn'''t support Gemma 4 multimodal as of v0.23.3).
  • Modelfile — Ollama configuration with the correct chat template (<|turn>...<turn|>) and stop tokens. Use as ollama create alio-medical -f Modelfile.

Limitations

  • Tends to underplay severity for clearly-diabetic-range blood glucose values when given as bare numbers in voice-note context (use the lab-interpretation pathway for sharper response)
  • For symptom triage, prefers today over emergency even when hard-escalation rules apply. The app's _apply_escalation_override() (keyword scanner) catches this in production.
  • Image input requires an OCR step (Gemini Vision in the reference app); the model itself is text-only.
  • Single-stage SFT only; no RLHF/DPO.

Citation

@misc{alio-medical-2026,
  author       = {Aaron Yeung},
  title        = {Alio: Offline-first caregiver app with fine-tuned Gemma 4 E2B},
  year         = {2026},
  howpublished = {Kaggle Gemma 4 Good Hackathon},
  url          = {https://github.com/JzZ404/Alio}
}
Downloads last month
71
GGUF
Model size
5B params
Architecture
gemma4
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for aarony630/alio-medical

Adapter
(32)
this model