Tunix, From the Inside

Tunix is post-training in JAX: SFT, DPO, GRPO and PPO, distillation, and agentic RL, on Flax NNX models, with rollouts served by its own sampler or by vLLM and SGLang. The track starts with a recipe you run on a Colab TPU and ends inside the cluster object that wires meshes, trainers, and rollout workers together.

Phase 1 — Run it first

Two upstream notebooks that run on a Colab TPU, and the article on what a recipe is made of.

Phase 2 — The cluster

RLCluster owns the meshes, the trainer, the reference and reward models, and the rollout workers.

Phase 3 — The learner

The loop that turns completions into a training signal, and the GRPO learner that specialises it.

Phase 4 — Rollouts

Three ways to generate completions, and how the trainer’s weights reach the rollout backend after every update.

Phase 5 — Agentic RL

Rollouts that call tools: an async producer of trajectories and the learner that consumes them.

Phase 6 — SFT and PEFT

The supervised side: the PEFT trainer, LoRA through qwix, and DPO.

Browse the full library