TRL v1.15's fused Triton kernel enables up to 6.9× longer training sequences on the same GPU

_lewtun · x · 2026-10-11

Hugging Face's TRL v1.15.0 ships a fused LM head Triton kernel that never materializes the [batch, seq, vocab] logits tensor, instead tiling hidden states through the LM head to directly produce per-token log-probs and entropy. It's on by default.

Max trainable sequence lengths on the same GPU (bf16, 79GiB, batch size 1):

At 8,192 tokens, peak memory drops 52–82% and steps get 2.3–10.9% faster. Supported across SFT, DPO, KTO, GRPO, RLOO and Distillation trainers.

Related event: Hugging Face ships TRL v1.15: fused LM head cuts VRAM up to 82%, extends sequences 6.9x(6 posts)→

Original post →

More from Research

Research channel →