Autonomous LLM Post-Training with Tunix on TPUs
How AI agents automate fine-tuning workflows for optimal model performance
1The Autonomous Fine-Tuning Revolution
Imagine specifying your LLM fine-tuning requirements in a Markdown file before bed, and waking up to find an AI agent has conducted dozens of experiments overnight. This new paradigm automates hyperparameter optimization including LoRA ranks, learning rates, and batch sizes, while committing verified improvements to Git. The system uses Google's full AI stack - Tunix, Gemma models, and Cloud TPUs orchestrated with Antigravity CLI and Gemini Flash 3.7. This represents a significant leap from traditional manual fine-tuning processes that required extensive human intervention and trial-and-error.
2From Research to Practical Implementation
Building on the autoresearch project's demonstration of autonomous pre-training loops, the team created autofinetune to apply similar principles to post-training. The system handles both Supervised Fine-Tuning (SFT) and Reinforcement Learning via GRPO. In the first case study, the team automated optimization of google/functiongemma-270m-it on the google/mobile-actions dataset. The AI agent was given boundaries in a program.md file and then autonomously explored parameter space, demonstrating the ability to adjust LoRA rank/alpha, optimizer settings, and learning rates to improve model accuracy for function call generation.
3Supervised Fine-Tuning Case Study
The first experiment extended a previous SFT setup by implementing the autoresearch loop. Sample trajectories from SFT_results.tsv show how the agent performed hill climbing optimization. The autonomous system successfully improved the model's accuracy in generating correct function calls by continuously adjusting technical parameters. This case demonstrated that even relatively straightforward fine-tuning tasks could benefit from automation, saving researchers time while potentially discovering more optimal configurations than manual tuning might find.
4Challenging Reinforcement Learning Scenario
The second case study tackled the more complex challenge of autonomous RL fine-tuning using the official GRPO example from Tunix repository. This involved training Gemma 3 1B for math reasoning using GSM8K dataset. RL presents additional difficulties due to hyperparameter sensitivity, training instability, and longer execution times. Despite these challenges, the agent successfully identified better LoRA configurations, rollout temperature, KL penalty values, and system prompts, ultimately improving total reward by approximately 10%.
5Technical Implementation Details
The system leverages Google's TPU infrastructure for accelerated training and Tunix for orchestration. The Antigravity CLI provides the interface for managing experiments, while Gemini Flash 3.7 contributes to the autonomous decision-making capabilities. Sample runs and program.md templates available in the autofinetune GitHub repository demonstrate how researchers can implement similar workflows. The architecture shows particular promise for iterative optimization tasks where human oversight would create bottlenecks.
6Performance Improvements Demonstrated
Results from both case studies showed measurable improvements in model performance. In the SFT experiment, the autonomous system consistently found better parameter combinations than manual tuning typically achieves. The RL case demonstrated a 10% reward improvement, particularly notable given RL's reputation for being difficult to optimize. These improvements came without requiring constant human supervision, allowing researchers to focus on higher-level tasks while the system handles parameter optimization.
7Potential Applications and Use Cases
This technology has broad applications across industries using LLMs. Customer service chatbots could automatically adapt to new products or policies. Content generation models could optimize for specific brand voices. Research teams could rapidly prototype domain-specific models. The system's ability to work with different model sizes (from 270M to 1B parameters in the case studies) suggests scalability. Financial services, healthcare, and legal tech could particularly benefit from models that autonomously maintain peak performance.
8The Future of Autonomous Model Development
This project represents a significant step toward fully autonomous AI development pipelines. As these techniques mature, we may see entire model improvement cycles running without human intervention. The implications for research productivity are enormous - teams could maintain dozens of specialized models with minimal overhead. However, this also raises important questions about oversight and control that the AI community will need to address as autonomous systems become more capable.
Original article: Google Developers Blog — Autonomous LLM Post-Training with Tunix on TPUs