RepoJournal
Hugging Face

@huggingface

Transformers, Datasets, and the open AI-model layer

Keep up with Hugging Face in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

One email a day. Unsubscribe in one click.

Pick a date

Topics: Python AI / ML Full archive →

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.

One email a day. Unsubscribe in one click.

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

Quick answers

What shipped 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. In total, 4 commits and 3 pull requests landed.
Who contributed to Hugging Face on June 15, 2026?
3 developers shipped this update, including behroozazarkhalili, qgallouedec, and yiyixuxu.
What were the notable Hugging Face updates?
fix: share frozen layers with reference model instead of duplicating in memory, Default SFT loss to chunked_nll, and Point "Coding with AI agents" links at the rendered docs site.

More from @huggingface

Daily updates, in your inbox

Follow Hugging Face

Keep up with Hugging Face in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.

or

One email a day. Unsubscribe in one click. Read a past issue →

Elsewhere on the wire

Want every project, not just this one?

We use privacy-friendly analytics (Google Analytics, IP-anonymized) to see which pages help readers. No ads, and we never sell your data. See our Privacy Policy.