Multi-Turn Agentic Reinforcement Learning with Tunix and Gemma 4 on Google TPUs
Multi-Turn Agentic Reinforcement Learning with Tunix and Gemma 4 on Google TPUs
This post shows how to train a multi-turn, tool-using LLM agent with Tunix's agentic reinforcement learning pipeline on a single Cloud TPU v6e-8, using Gemma 4 E2B in thinking mode to play the 6x6 Plane Strike board game. The pipeline is built from four components: a BaseTaskEnv subclass, a Gemma4ChatTemplateParser subclass for native tool declarations and in-turn tool responses, a ConversationAgentBase subclass, and a GRPOLearner with asynchronous vllm-tpu rollouts. After 100 steps of agentic GRPO, the agent's win rate rises from 9.4% on held-out boards to about 95%, with average game length falling from 22.44 to roughly 16 strikes.
Source: Google Developers Blog · developers.googleblog.com