Google has released autofinetune, an experimental agent loop that changes a post-training script, runs the job, measures the result, keeps improvements and reverts regressions. It is a useful automation pattern, but the experiment still succeeds or fails inside an arena designed by a human.
Google published the autofinetune project on September 11, 2026. The stack combines Tunix, Gemma, Cloud TPUs, Antigravity CLI and Gemini Flash 3.7. Google also linked the code, sample runs and the Markdown instructions that constrain each experiment.
Google autofinetune turns a training notebook into a bounded search loop
The design has two files with different responsibilities. A human writes program.md to define the allowed changes, forbidden changes, objective and evaluation rules. The agent edits a self-contained run.py, launches training, records the target metric in results.tsv, and commits a change only when the measured result improves.
A regression is reverted instead of becoming the new starting point. That makes the Git history part of the experimental record. It also makes the limits in program.md the real control surface. If the metric is weak or the allowed search space is unsafe, faster iteration only reaches the wrong target sooner.
The first case study ran 20 FunctionGemma experiments
For supervised fine-tuning, Google used FunctionGemma 270M on the mobile-actions dataset with a Cloud TPU v5e-1. The agent could change LoRA rank and alpha, target projection layers, learning rate, schedules, optimizer, gradient clipping, batch size and seeds. It could not change the dataset, model architecture or number of epochs.
Google reports 20 automated experiments in a couple of hours, with each run taking a few minutes. The objective was post-training accuracy for function-call generation. This is a company-run case study, not an independent benchmark, but its constraints are unusually useful because readers can see what the agent was and was not allowed to modify.
The reinforcement-learning loop took days, not minutes
The second case used Gemma 3 1B, GSM8K and GRPO on a Cloud TPU v6e-1. Google reports 40 experiments over two to three days. The agent searched LoRA configuration, rollout temperature, KL penalty and system-prompt choices.
The selected objective, called Post_RL_metric, simply added numerical accuracy and format accuracy. Google says the loop increased that total reward by about 10%. That result is specific to the chosen arithmetic. A model could improve the sum while moving the two components in different directions, so teams should retain the component scores and not monitor only the combined number.
This is hill climbing, not an autonomous research scientist
The agent proposes changes and tests them, but the human still chooses the dataset, objective, stopping conditions, compute allowance and forbidden moves. The loop cannot tell whether the benchmark reflects the production task unless that relationship is encoded in the evaluation design.
Repeated optimization also creates a familiar risk: the search process can overfit to the evaluation set. A responsible run needs a hidden holdout that the agent cannot inspect, plus a final human review that compares the winning configuration against the original baseline on more than one metric.
A safe overnight-run contract
- Pin the model, dataset revision, training library and container image.
- Give the agent a hard wall-clock and accelerator budget.
- Keep a validation split for iteration and a sealed holdout for final selection.
- Record every attempted configuration, including failed and reverted runs.
- Gate any change to data, architecture, evaluation code or security policy.
- Rerun the winner with multiple seeds before calling it an improvement.
Where autofinetune fits in an agent stack
Autofinetune automates post-training search. It does not replace the separate job of building reliable tool-use examples, which is the focus of our Google ToolGrad training-data analysis. It also needs an isolated execution environment. Our guide to Google Agent Platform sandboxes explains the identity, network and persistent-state controls that matter when an agent can execute code for hours.
The practical verdict
Google autofinetune is most interesting as an inspectable pattern for bounded experimentation. The valuable unit is not an agent that never sleeps. It is an experiment contract where every allowed change, result, revert and compute cost can be audited the next morning.
Primary sources
- Google Developers Blog: Autonomous LLM post-training with Tunix on TPUs
- Google DeepMind autofinetune repository
Checked September 14, 2026. Run counts, duration and performance changes are Google-reported. They have not been independently reproduced by MustHave.ai.