47 model prices
  1. Home
  2. Releases
  3. TRL
  4. 1.16.0

TRL 1.16.0 release notes

TRL 1.16.0 was released on October 15, 2026. The latest version is 1.19.0.

v1.16.0 ยท ยท 43 listed changes

Release notes

Features

๐Ÿ› ๏ธ TRL now trains on AWS Trainium

The fused LM head from v1.15 is what made Neuron tractable; the remaining gaps are closed here. There is a guide to go with it.

Neuron recompiles once per input shape, so an unpadded run stalls about a minute on every new sequence length. pad_to_multiple_of now defaults to "auto": 128 on Neuron, None elsewhere, so nothing changes on GPU. Trainium2, Qwen3-0.6B SFT, 20 steps: 130 s with the default against 260 s without.

๐ŸŒณ Tree attention for AsyncGRPO

AsyncGRPO now packs every micro-batch row as a prefix tree instead of a flat sequence. Multi-turn and multi-generation rollouts repeat a lot of prefix: on a shared prompt, those tokens used to be forwarded once per row. Tree packing forwards them once.

rollout 0:  [ prompt ] [ completion A ]              prompt โ”€โ”€โ”ฌโ”€โ”€ completion A โ”€โ”€ later turn
rollout 1:  [ prompt ] [ completion B ]        =>             โ””โ”€โ”€ completion B
rollout 2:  [ prompt ] [ completion A ] [ โ€ฆ ]

Chains without a fork collapse into segments, and each segment's queries attend to the K/V gathered along its root-to-segment path in a single FA3 varlen call. No mask tensor: every layer except attention runs once per unique token, and only K/V is duplicated along shared prefixes.

Qwen3-1.7B, 32K tokens per rollout, forward + backward:

layout packing ratio sequence packing tree packing peak GiB
shared prompt 1.00 8677 ms 8737 ms (0.99ร—) 35.2 โ†’ 35.2
shared prompt 2.29 8266 ms 4341 ms (1.90ร—) 35.2 โ†’ 18.0
shared prompt 3.37 8179 ms 2755 ms (2.97ร—) 35.2 โ†’ 13.6
nested fork 1.60 8557 ms 6217 ms (1.38ร—) 35.2 โ†’ 23.8
nested fork 3.56 8172 ms 2635 ms (3.10ร—) 35.2 โ†’ 13.5

There is no packing option to choose: with nothing shared a tree row is exactly the old sequence packing, at a ~1% cost.

by @AmineDiro in https://github.com/huggingface/trl/pull/7328

Muse Spark Open

Support for meta-models/Muse-Spark-Open-816B-A42B: the tiny-model script, coverage in the VLM tests (SFT, DPO, KTO, chat-template utils, fused LM head), and a LoRA SFT example on 8 nodes of 8ร—H100 with DistributedConfig(fsdp_size=64, ep_size=8), token dispatch and packing. Measured at 14.2 s/step, 131k tokens/step, 40.2 GB per GPU.

Needs transformers>=5.20.0; the adapter save additionally needs transformers#49500 with peft 0.21.2.

by @qgallouedec in https://github.com/huggingface/trl/pull/7536

AMD GPUs in the async trainers
Tool-call arguments typed by the tool's JSON schema

parse_response now receives the tools, so tool-call arguments come back typed from the tool's own schema instead of whatever the raw parse produced.

by @qgallouedec in https://github.com/huggingface/trl/pull/7650

Other
Removals and requirement bumps

Fixes

Clearer errors

A sweep making failure modes explicit instead of crashing deep in the stack, all by @albertvillanova:

Documentation

CI

Real objects, not mocks. The bulk of this cycle, applying the repo's testing rule across the suite, all by @albertvillanova: run the GRPO entropy mask tests on a real trainer instead of a Mock (#7566), the teacher logprob tests on a real trainer instead of a MagicMock (#7579), build real GOLD trainers in the init (#7582), input preparation (#7614), on-policy generation (#7613, #7615), output decoding (#7633), ULD helper (#7634) and no-backend tokenizer (#7635) tests, check GOLD dataset preparation through the trainer (#7632), and build real async trainers in the rollout state checkpoint tests (#7583)

Coverage, all by @albertvillanova: test SFT (#7552) and DPO/KTO/Reward/GRPO/RLOO (#7601) on a model split across devices, test fp16 training across six trainers (#7572)

Experimental suite on main, all by @albertvillanova: run the experimental tests on pushes to main (#7675), nightly (#7681), on demand (#7678) and when their Makefile target or dependencies change (#7680), and report failures to Slack (#7676)

Other, by @albertvillanova unless otherwise noted: use Python 3.13 by default in CI by @qgallouedec in https://github.com/huggingface/trl/pull/7648, remove the slow test infrastructure (#7604), rename the distributed smoke tests to distributed tests (#7631), skip the kernel tests when Triton is not installed (#7563), guard the aiohttp import in the experimental async rollout workers (#7578), drop use_cpu and bf16 settings the CPU fixture already covers (#7612), re-record the sft_fa2 invariant reference after the fused LM head by @qgallouedec (#7591), plus warning filters in #7586, #7588, #7590, #7645, #7727

New Contributors

Full Changelog: https://github.com/huggingface/trl/compare/v1.15.0...v1.16.0

Source: GitHub release v1.16.0

Newer: 1.17.0Older: 1.15.0TRL