Practical workflow fine-tunes Gemma 4 on educational tasks using consumer hardware, highlighting its viability for schools.
This work documents a practical end-to-end workflow for fine-tuning Google's Gemma 4 (4 billion parameter variant) on K-12 educational tasks using consumer hardware — specifically the Apple M3 with 16 GB unified memory. The process covers: (1) data preparation from 840 raw JSON examples across four schemas (Alpaca, ShareGPT, Chain-of-Thought, and domain-tagged); (2) an iterative repair pipeline producing a curated set of 517 high-quality examples after removing PII-contaminated, malformatted, and style-conflicting entries; (3) LoRA fine-tuning with batch-size 1 using MLX-LM with 4-bit quantisation within a 16 GB memory constraint; and (4) a single master K-12 LoRA adapter saved as k12_school_adapter/0000600_adapters.safetensors at iteration 600. Training achieved a final validation loss of 1.558 over 600 iterations with a train/validation gap of 0.031. A Multi-LoRA deployment architecture — where this master adapter serves as the base for subject-specific and grade-specific adapters — is proposed as the recommended next step for multi-tenant school deployment. Code scripts may be provided on request.
No takes yet. Share an insight, caveat, or question.
Mudit Mehrotra (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: