{"slug": "autonomous-llm-post-training-with-tunix-on-tpus", "title": "Autonomous LLM post-training with Tunix on TPUs", "summary": "The autofinetune project applies autonomous research loops to LLM post-training, using Google's Tunix library, Gemma models, and Cloud TPUs orchestrated with Antigravity CLI and Gemini Flash 3.7. In a supervised fine-tuning case study, an AI agent autonomously tuned LoRA rank/alpha, optimizer, and learning rate for google/functiongemma-270m-it on the google/mobile-actions dataset; in a second case study built on Tunix's official GRPO example training Gemma 3 1B for math reasoning on GSM8K, the agent improved total reward by approximately 10% by identifying better LoRA configurations, rollout temperature, KL penalty, and system prompt. The project's code, sample runs, and program.md templates are available in the autofinetune GitHub repository.", "body_md": "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.\n\nThis is no longer a fantasy. Earlier this year, the [autoresearch](https://github.com/karpathy/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](https://github.com/windmaple/autofinetune): applying autonomous research loops to LLM post-training (Supervised Fine-Tuning and Reinforcement Learning via GRPO), using Google’s full AI stack—[Tunix](https://github.com/google/tunix), Gemma, and Cloud TPUs orchestrated with [Antigravity CLI](https://antigravity.google/product/antigravity-cli) and Gemini Flash 3.7.\n\nIn 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.\n\nTraditional post-training involves a repetitive, manual cycle:\n\n*attn_vec_einsum*\nAs demonstrated in `autoresearch`, we can now automate this whole process with the power of AI agents:\n\n`program.md`` run.py``results.tsv`.\nIn the first experiment in [autofinetune](https://github.com/windmaple/autofinetune/tree/main/FunctionGemma-SFT), we took the same SFT setup in our previous [blog](https://developers.googleblog.com/easy-functiongemma-finetuning-with-tunix-on-google-tpus/) and extended it by creating the autoresearch loop to optimize [google/functiongemma-270m-it](https://huggingface.co/google/functiongemma-270m-it) on the [google/mobile-actions](https://huggingface.co/datasets/google/mobile-actions) dataset.\n\nThe agent was given boundaries in [program.md](https://github.com/windmaple/autofinetune/blob/main/FunctionGemma-SFT/program.md):\n\nHere is a sample trajectory from [sample_runs/SFT_results.tsv](https://github.com/windmaple/autofinetune/blob/main/sample_runs/SFT_results.tsv) demonstrating how the agent hill climbed.\n\nAs 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.\n\nSupervised fine-tuning is only a simple test. For our second case study, we took the official [GRPO example](https://github.com/google/tunix/blob/main/examples/grpo_gemma.ipynb) 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.\n\n`Post_RL_metric`, which is simply `numerical_accuracy + format_accurac` y (you can of course use other metrics, i.e., using different weights).\nBelow is a sample trajectory logged in [sample_runs/RL_results.tsv](https://github.com/windmaple/autofinetune/blob/main/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%.\n\nWe 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**](https://github.com/windmaple/autofinetune), explore the [** Tunix library**](https://github.com/google/tunix), and start building your own autonomous post-training lab today!", "url": "https://wpnews.pro/news/autonomous-llm-post-training-with-tunix-on-tpus", "canonical_source": "https://developers.googleblog.com/autonomous-llm-post-training-with-tunix-on-tpus/", "published_at": "2026-09-11 14:44:42.831759+00:00", "updated_at": "2026-09-11 14:44:44.777290+00:00", "lang": "en", "topics": ["large-language-models", "ai-agents", "ai-research", "ai-tools", "mlops"], "entities": ["autofinetune", "Tunix", "Gemma", "Cloud TPUs", "Antigravity CLI", "Gemini Flash 3.7", "google/functiongemma-270m-it", "google/mobile-actions"], "alternates": {"html": "https://wpnews.pro/news/autonomous-llm-post-training-with-tunix-on-tpus", "markdown": "https://wpnews.pro/news/autonomous-llm-post-training-with-tunix-on-tpus.md", "text": "https://wpnews.pro/news/autonomous-llm-post-training-with-tunix-on-tpus.txt", "jsonld": "https://wpnews.pro/news/autonomous-llm-post-training-with-tunix-on-tpus.jsonld"}}