
Take control of your AI models with our newest skill, designed to make local fine-tuning efficient.
canonical_url: https://bebechien.github.io/cozy-corner-future/posts/master-local-fine-tuning-with-gemma-trainer/ cover_image: https://bebechien.github.io/cozy-corner-future/images/master-local-fine-tuning-with-gemma-trainer.png description: Take control of your AI models with our newest skill, designed to make local fine-tuning efficient. published: true tags:
Remember back in May when I introduced the gemma-skills repository? It's been rewarding to see how many of you have used my previous post to streamline your workflows. (And hey, even if we aren't swimming in GitHub stars yet, I think we're off to a great start!😉)
But as I built more custom applications, I kept hitting the same roadblock: how to take a great base model and adapt it to my specific needs.
Fine-tuning a model usually requires wading through complex setups and confusing guides. To make this process straightforward and quick, we created our newest skill: gemma-trainer
gemma-trainer?gemma-trainer is your blueprint for training and adapting Gemma models on your local hardware. It handles the "how-to" so you can focus on your specific project goals, whether you are teaching a model a new domain or aligning its behavior to your preferences.
Faster, Lighter Training: We recommend using Unsloth for single-GPU training, making it fast and using less memory so it runs easily on personal hardware.
Three Key Methods: It guides you through Supervised Fine-Tuning (SFT) to teach new info, Direct Preference Optimization (DPO) to align with preferences, and Reward Modeling (RM) to rate responses.
Teach Models to See and Hear: It includes clear instructions for training models with images and audio (multimodal learning) alongside text.
Run Anywhere: Quickly convert your models to lightweight formats (like GGUF) and run them on mobile or smart devices (IoT) using LiteRT-LM.
Up-to-Date Best Practices: The skill is continuously updated with the latest optimized settings and training techniques, ensuring you're always using the best methods.
To see this in action, recall how we turned Gemma 4 into an expert translator for Classical Korean literature in my previous post. With gemma-trainer, you don't need to manually piece together a pipeline. You can simply ask your agent:
"Fine-tune Gemma 4 E2B on the dataset bebechien/HongGildongJeon."
With the gemma-trainer skill, your agent will partner with you to:
Verify your data: Use the validation script to ensure your training data matches template requirements.
Set up parameters: Select the best LoRA settings to teach the model linguistic nuances without running out of video memory (VRAM).
Run the training: Launch the training session using optimized, resource-efficient defaults.
Evaluate and iterate: Review the model's performance and adjust settings to get the exact results you need.
Here is an example showing the agent starting a fine-tuning run on a Gemma 4 12B model for audio tasks:

Once configured, the agent kicks off the training process using your designated dataset:

Even if you make a mistake, the agent has your back. For instance, when I accidentally requested training a Gemma 4 31B model (which is a text-and-vision model and has no audio capability), it suggested using Gemma 4 E2B or 12B for audio tuning instead:

Once training is complete, the agent presents the results and outlines the next steps:

You can also ask your agent to write a custom evaluation script based on your specific requirements. In this case, I asked the agent to create a script that checks transcription similarity:

Finally, you will receive a comprehensive report summarizing the training performance, making it clear where you can make improvements in the next run:

gemma-trainer is a living, structured document. Drop it into your agent's skills directory, and your AI assistant will immediately know how to guide you through the process.
Check out the repository, add the skill to your toolbox, and let's build something amazing!
Thanks for reading and happy training!
aiMost of us have seen a coding agent fail to complete a task we know it can do. We just don't...
googlecloudWhen building Generative AI applications, developers often encounter a massive bottleneck: sequential...
discussI’ve been thinking about sharing some electronic circuit posts on Dev.to — small circuits, DIY...
agentsWhat nobody tells you about exporting your multi-agent prototype to a local workspace. Every...
agenticarchitectAutonomous agents are genuinely good at answering messy business questions. Give one an LLM and a set...
aiPR volume went up, ticket quality didn't, and the gap got filled with LLMs on both sides of the review: bots reviewing, bots replying, bots occasionally arguing with bots about priorities that only existed in a teammate's head. Our CEO named the actual problem, and it's bigger than code review.
Workflows from the Neura Market marketplace related to this Stable Diffusion resource