v0.7.3:`IterativeTrainer`, NEFTune and major bugfixes for `DPOTrainer` and Distributed Training
IterativeTrainer, NEFTune and major bugfixes for DPOTrainer and Distributed TrainingIn this release we introduce two new features, IterativeTrainer from @gaetanlop and NEFTune, together with important bugfixes for distributed training.
Iterative fine-tuning is a training method that enables to perform custom actions (generation and filtering for example) between optimization steps. In TRL we provide an easy-to-use API to fine-tune your models in an iterative way in just a few lines of code.
Read more about it here: https://huggingface.co/docs/trl/iterative_sft_trainer
NEFTune is a technique to boost the performance of chat models and was introduced by the paper “NEFTune: Noisy Embeddings Improve Instruction Finetuning” from Jain et al. it consists of adding noise to the embedding vectors during training. According to the abstract of the paper:
SFTTrainer] Adds NEFTune into SFTTrainer by @younesbelkada in https://github.com/huggingface/trl/pull/871NEFTune] Make use of forward hooks instead by @younesbelkada in https://github.com/huggingface/trl/pull/889NEFTune] Make use of forward hooks instead by @younesbelkada in https://github.com/huggingface/trl/pull/889Read more about it here
Major bugfixes have been addressed to tackle many issues with distributed training and gradient checkpointing.
DPO] fix DPO + GC issues by @younesbelkada in https://github.com/huggingface/trl/pull/927core / DDP] Fix RM trainer + DDP + quantization + propagate gradient_checkpointing_kwargs in SFT & DPO by @younesbelkada in https://github.com/huggingface/trl/pull/912The DPOTrainer now comes with multiple enhancements and bugfixes! Check them out below
reward_modeling.py by @vwxyzjn in https://github.com/huggingface/trl/pull/890tyro version by @brentyi in https://github.com/huggingface/trl/pull/928SFTTrainer] Make sure to not conflict between transformers and TRL implementation by @younesbelkada in https://github.com/huggingface/trl/pull/933CI] Fix CI with new transformers release by @younesbelkada in https://github.com/huggingface/trl/pull/946Full Changelog: https://github.com/huggingface/trl/compare/v0.7.2...v0.7.3
Fetched April 7, 2026