惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

博客园 - 三生石上(FineUI控件)
D
DataBreaches.Net
博客园_首页
J
Java Code Geeks
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
罗磊的独立博客
腾讯CDC
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
B
Blog
D
Docker
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
A
About on SuperTechFans
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
WordPress大学
WordPress大学
MyScale Blog
MyScale Blog
G
Google Developers Blog
博客园 - 司徒正美
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 叶小钗
M
MIT News - Artificial intelligence
Recent Announcements
Recent Announcements

Google Developers Blog

Why client SDK generation belongs in the open- Google Developers Blog Agent Anomaly Detection, now in Private Preview on the Gemini Enterprise Agent Platform- Google Developers Blog Build zero-trust AI agents that judge intent, not just syntax- Google Developers Blog The Anatomy of Harness Engineering: How to Evaluate, Iterate, and Guard AI Coding Agents- Google Developers Blog Announcing ADK for Kotlin 1.0: Building Production-Ready AI Agents in Kotlin, Android, and Beyond- Google Developers Blog Driving Developer Excellence: Inside the Program Sprints- Google Developers Blog 4 engineering patterns behind the strongest AI Agents Challenge submissions- Google Developers Blog Decoding cosmic signals with deep learning and Keras- Google Developers Blog Enterprise-Grade Precision for Long-Context Multimodal Embedding Inference on Cloud TPU- Google Developers Blog How to Evaluate Live & Voice Agents in ADK- Google Developers Blog Build zero-trust AI agents with Google's Agent Development Kit- Google Developers Blog Introducing Credentio: Open Source C++ Library for C2PA Content Credentials from Google- Google Developers Blog HeyGen x Google Cloud: Bringing Avatar IV to TPUs- Google Developers Blog Why Go is an Ideal Language for AI-Assisted Software Engineering- Google Developers Blog Mastering Edge AI on Raspberry Pi with LiteRT and Gemma- Google Developers Blog Agent Plugins package your skills, tools, and more- Google Developers Blog Scaling AI Agent Infrastructure with the MCP Stateless updates- Google Developers Blog A unified API for AI model routing- Google Developers Blog Scaling real-time AI agents with session-aware load balancing- Google Developers Blog Agent and Model Evaluations in Gemini Enterprise Agent Platform are now GA- Google Developers Blog Enable on-demand expertise with Agent Skills in Genkit Go- Google Developers Blog How to use Google microbenchmarks for evaluating TPU performance- Google Developers Blog Run Ray on TPU, Part 2: Ray AI libraries- Google Developers Blog Scaling Agentic RL: High-Throughput Agentic Training with Tunix- Google Developers Blog Run Ray on TPU, Part 1: The foundations- Google Developers Blog Expanding Choice in Gemini Enterprise Agent Platform: Introducing Grounding with Parallel Web Search- Google Developers Blog Building scalable AI agents with modular prompt transpilation- Google Developers Blog Evolving Spec-Driven Development: Conductor Now Supports Antigravity- Google Developers Blog Systems Engineering Playbook: Optimizing Qwen 3.5-397B MoE on Ironwood (TPU7x)- Google Developers Blog Unlocking the Next Era of On-Device AI with Google Tensor and Pixel- Google Developers Blog
Autonomous LLM post-training with Tunix on TPUs- Google D...
Wei Wei · 2026-09-11 · via Google Developers Blog

Imagine going to sleep after writing a single Markdown specification and waking up to find that an AI agent ran dozens of LLM fine-tuning experiments overnight on your behalf - discovering optimal LoRA ranks, refining learning rate schedules, tuning batch sizes and committing each verified improvement to Git.

This is no longer a fantasy. Earlier this year, the autoresearch project showcased how autonomous LLM agents can iteratively explore pre-training in a self-contained loop. Taking inspiration from this paradigm, we created autofinetune: applying autonomous research loops to LLM post-training (Supervised Fine-Tuning and Reinforcement Learning via GRPO), using Google’s full AI stack—Tunix, Gemma, and Cloud TPUs orchestrated with Antigravity CLI and Gemini Flash 3.7.

fullstack

In this post, we’ll explore how the autonomous research loop works for post-training and walk through a couple of real-world LLM finetuning case studies.

The Paradigm Shift: From Manual Tuning to Autonomous Loops

Traditional post-training involves a repetitive, manual cycle:

  1. Formulate a hypothesis (e.g., "Will adding attn_vec_einsum to the LoRA target modules improve accuracy?" or "What happens if we change rollout temperature during GRPO?").
  2. Edit training scripts and hyperparameters.
  3. Launch a job on accelerators.
  4. Monitor loss curves and benchmark evaluations.
  5. Manually revert failures or record successes in a spreadsheet.

As demonstrated in autoresearch, we can now automate this whole process with the power of AI agents:

  • Design the Arena (program.md): human defines the loop, boundary conditions, evaluation criteria, and constraints.
  • Provide the Execution Code (run.py): A single, clean, self-contained finetuning script.
  • Let the Agent Iterate: An agent follows instructions in program.md: it modifies run.py, runs the training job, measures the target metric, retains winning commits or reverts regressions, and logs results in results.tsv.

agentloop

Case Study 1: Supervised Fine-Tuning (SFT) on FunctionGemma

In the first experiment in autofinetune, we took the same SFT setup in our previous blog and extended it by creating the autoresearch loop to optimize google/functiongemma-270m-it on the google/mobile-actions dataset.

The Setup

  • Hardware: Cloud TPU v5e-1
  • Iteration Speed: A few minutes per run
  • Total Runs: 20 automated experiments in a couple of hours for quick experimentation
  • Objective Metric: Post-training evaluation accuracy on function call generation (accuracy)

The agent was given boundaries in program.md:

  • Allowed: LoRA rank/alpha, target projection layers, learning rates, warmup/decay schedules, optimizers (e.g., AdamW/Muon, gradient clipping), batch size, and seeds.
  • Disallowed: Changing the dataset, number of epochs, or model architecture.

Sample Trajectory

Here is a sample trajectory from sample_runs/SFT_results.tsv demonstrating how the agent hill climbed.

SFT_results

As you can see, the agent is able to automatically adjust LoRA rank/alpha, optimizer, learning rate, etc. to keep improving the model’s accuracy in terms of generating correct function calls.

Case Study 2: Reinforcement Learning (GRPO) on Gemma for Math Reasoning

Supervised fine-tuning is only a simple test. For our second case study, we took the official GRPO example from the Tunix repository (which trains Gemma 3 1B for math reasoning using GSM8K; the trained model has better numerical accuracy and format accuracy in its answers) and set it up for autonomous RL finetuning. Reinforcement learning is subject to hyperparameter sensitivity, instability, and longer execution times - making this task more challenging and time-consuming.

The Arena Setup

  • Hardware: Cloud TPU v6e-1
  • Model: Gemma 3 1B
  • Dataset: GSM8K
  • Iteration Speed: A couple of hours per run
  • Run Duration: 40 experiments over 2–3 days
  • Objective Metric: to simplify the outer optimization loop for the agent, we chose a single artificial evaluation metric Post_RL_metric, which is simply numerical_accuracy + format_accuracy (you can of course use other metrics, i.e., using different weights).

Sample trajectory

Below is a sample trajectory logged in sample_runs/RL_results.tsv, showing the agent’s progress. The agent was able to identify better LoRA configurations, rollout temperature, KL penalty, system prompt, etc. to improve the total reward by ~10%.

SFT_results

What’s Next?

We hope this project shows you the power of AI agents in the domain of LLM post-training and inspires you to think about how to leverage them to automate your LLM finetuning workflows using Tunix on TPUs. Please check out the code, sample runs, and program.md templates in the autofinetune GitHub repository, explore the Tunix library, and start building your own autonomous post-training lab today!