A hands-on tutorial demonstrating how to fine-tune Google's Gemma 4 E2B model to translate Classical Korean (from the Joseon Dynasty novel HongGildongJeon) into modern Korean. Using LoRA (Low-Rank Adaptation) via the PEFT library on a single NVIDIA T4 GPU in Google Colab, the author structures a small dataset as chat conversations with masked system/user labels so the model only learns to generate the assistant's translation. The baseline model scored just 4.85% similarity to human translations; after 5 epochs of fine-tuning with a learning rate of 2e-5, similarity jumped to ~85.71%. The post outlines a reusable fine-tuning workflow: define a goal, prepare a quality dataset, verify learning, evaluate with metrics and human judgment, then deploy and iterate.

4m read timeFrom dev.to
Post cover image
Table of contents
The Recipe for TrainingThe "Before" PictureTeaching Gemma with CareThe Warm "After" GlowClosing Thoughts
1.8K Impressions