Hugging Face’s TRL v1.13.0 makes long-context training feel less like an expedition. It includes a runnable example for training beyond one million tokens, alongside a chunked-loss optimisation that cuts reported memory use and improves throughput in several profiles.
Hugging Face Watch analysis
What happened
The new guide demonstrates Qwen3-8B training at 1,048,576 tokens per step on a single 8×H100 node. The release notes report 380 seconds per step and 56.2 GB per GPU in bf16, with instructions built around chunked negative log-likelihood, gradient-checkpointing offload and YaRN RoPE. The example uses full attention and does not support packing.
The release also fixes the chunked language-model projection so bf16 inputs stay on tensor cores instead of taking an fp32 path. In the cited 8×H100 profile, peak memory for one chunk falls from 5.99 GB to 3.03 GB, while end-to-end token throughput rises by between 1.20× and 1.69× across the listed models and training setups.
Our top picks
- Million-token recipe
A runnable path now exists for training book-length sequences, with the hardware and configuration constraints spelled out. - Less memory per chunk
The revised projection avoids a large fp32 weight copy and lowers reported peak memory. - Faster training loops
The release reports gains from 1.20× to 1.69× across several model and fine-tuning profiles. - Fused losses move in-house
Several DPO, KTO, GRPO and JSD losses are now available within TRL. - PPO exits the building
PPOTrainer and its associated legacy components have been removed, although older pinned installations remain available. - Newer serving support
TRL adds vLLM 0.28.0 support and raises minimum versions for some dependencies.
Why it matters
Long-context training is usually constrained by memory, throughput and a configuration maze that looks designed by a committee of GPUs. TRL now gives practitioners a concrete million-token example, plus an optimisation that could make chunked losses cheaper across more ordinary fine-tuning jobs.
The numbers are release-note measurements, not an independent benchmark. They are useful for planning, but teams should reproduce them on their own models, hardware and sequence mixes before promising miracles to finance.
Our read
This is a substantial developer release, not just a changelog tidy-up. If you work on long-context training or TRL-based preference optimisation, read the migration notes, check the dependency floors and benchmark the new chunked path against your current workload.
What to watch
- Whether the million-token recipe becomes practical beyond the documented 8×H100 setup.
- Compatibility fallout from the raised peft and deepspeed requirements.
- Migration needs for projects still importing PPO components.
- Whether the reported tensor-core gains hold under mixed precision and different vocabulary sizes.
Discussion spark: Which matters more for your work: TRL’s million-token recipe, the chunked-loss speed-up, or the removal of legacy PPO support?
Sources and evidence
- v1.13.0 (10 September 2026, 00:50 UTC)
not affiliated with or endorsed by Hugging Face