LoRA fine-tune of Llama 2 7B that converts free-text clinical notes into structured
summaries with fixed sections: DIAGNOSIS, KEY FINDINGS, MEDICATIONS, ACTION ITEMS,
FOLLOW-UP. Adapter fused into the base weights and quantized to Q4_K_M for llama.cpp.
Trained on ~500 fully synthetic notes (MLX LoRA, completion-masked loss).
Eval vs base on 25 held-out notes: ROUGE-1 0.944 vs 0.710, BLEU 0.920 vs 0.351,
structure compliance 1.000 vs 0.976.
Use a repetition penalty (~1.15). Known limitation: notes missing sections the
training data always contained (e.g. vitals) can trigger hallucinated values.
Educational project. Synthetic data only — not for real patient data or clinical use.