google/tunix

A Lightweight LLM Post-Training Library

What it solves

Tunix is a lightweight library designed to simplify and accelerate the post-training of Large Language Models (LLMs). It addresses the complexity of scaling post-training workflows—such as supervised fine-tuning and reinforcement learning—specifically for high-performance hardware like TPUs.

How it works

Built on JAX, Tunix acts as an intermediate layer between core JAX utilities (like Flax, Optax, and Orbax) and optimized model implementations (such as MaxText). It integrates with high-performance inference engines like vLLM and SGLang-JAX for efficient rollouts, and uses Pathways for seamless multi-host distributed training across thousands of devices.

Who it’s for

It is intended for AI researchers and developers who need to refine LLMs using JAX and want to leverage TPU acceleration for scalable, stable, and efficient post-training.

Highlights

  • Diverse Training Algorithms: Supports Supervised Fine-Tuning (SFT), Direct Preference Optimization (DPO), PPO, and Group Relative Policy Optimization (GRPO).
  • Agentic RL: Provides specialized support for multi-turn tool use, asynchronous rollout for high-throughput trajectory collection, and trajectory batching.
  • TPU Optimization: Native integration with MaxText for high-performance kernels and vLLM/SGLang-JAX for fast rollout.
  • Scalability: Supports multi-host distributed training and fault-tolerant checkpointing via Pathways.

Related

  • Project
  • Project
  • Project
  • Project
  • Project