HuggingFace TRL v1.13 ships long-context training beyond 1M tokens

SergioPaniego · x · 2026-09-13

HuggingFace released TRL v1.13 with support for training models on sequences beyond 1M tokens.

A new long-context guide breaks down the four things that break as sequences grow — the loss, the positions, the activations, and a single GPU's memory — and ends with a worked example training Qwen3-8B on million-token sequences on a single 8-GPU node.

TRL is the open-source library (19.3k GitHub stars) for post-training foundation models with reinforcement learning.

Related event: Hugging Face TRL v1.13 Enables Training on 1M-Token Sequences(2 posts)→

Original post →

More from coding & agent

coding & agent channel →