RepoJournal
Hugging Face

@huggingface

Transformers, Datasets, and the open AI-model layer

Pick a date

The Wire · Showcase

TRL FIXES MEMORY LEAK IN REFERENCE MODEL HANDLING, DEFAULTS SFT LOSS TO FASTER CHUNKED ALGORITHM

By RepoJournal · Filed · About Hugging Face

Two critical training optimizations landed in TRL overnight: frozen layers now share memory instead of duplicating, and the default SFT loss switches to chunked_nll for 30-40% faster training on most architectures.

The reference model fix [1] addresses a subtle but costly bug in `create_reference_model` where frozen shared layers were being deepcopied then never actually reassigned, leaving duplicate parameters in memory. This tanks performance when you're trying to freeze layers to save VRAM in DPO or preference-tuning workflows. The memory leak is fixed in the same PR, so frozen layers now properly share parameters with the reference model. Meanwhile, the SFT trainer's default loss switches from 'nll' to 'chunked_nll' [2], which benchmarks show cuts training time 30-40% without accuracy loss on most model sizes, with automatic fallback to 'nll' when using Liger kernels. In the diffusers repo, the team fixed broken anchor links in the contributor guide [3] that were pointing to GitHub's symlink rendering instead of the actual docs site. These are the changes that compound: better training performance, lower memory footprint, clearer onboarding for new contributors.

Action items

References

  1. [1] fix: share frozen layers with reference model instead of duplicating in memory ↗ huggingface/trl
  2. [2] Default SFT loss to chunked_nll ↗ huggingface/trl
  3. [3] Point "Coding with AI agents" links at the rendered docs site ↗ huggingface/diffusers

FAQ

What changed in Hugging Face on June 15, 2026?
Two critical training optimizations landed in TRL overnight: frozen layers now share memory instead of duplicating, and the default SFT loss switches to chunked_nll for 30-40% faster training on most architectures.
What should Hugging Face teams do about it?
Upgrade TRL if you're training preference models or using num_shared_layers - redeploy with the reference model fix [ref:5] • Update SFT training configs to verify chunked_nll is your new default [ref:3], especially if you're running multi-GPU training • Update any internal docs linking to diffusers CONTRIBUTING.md - anchor links now resolve correctly [ref:1]
Which Hugging Face repositories shipped on June 15, 2026?
huggingface/trl, huggingface/diffusers

Related across the cluster

For your repos

The showcase is a teaser.
Your wire is the product.

Same engine. Different stack. Below: what changes when the wire is yours.

Showcase wire

  • 14 famous open source orgs
  • One wire per day
  • Public, generic
  • Read on the web, when you remember

Your wire

  • Up to 1,500 of your repos - orgs, deps, vendors
  • Morning and evening briefs
  • Action items routed to your team
  • Slack delivery, email, breaking-news CVE alerts

Want a hands-on demo first? Ask a current user for an invite link.