v0.7.5: IPO & KTO & cDPO loss, `DPOTrainer` enhancements, automatic tags for `xxxTrainer`
DPOTrainer enhancements, automatic tags for xxxTrainerDPOTrainerThis release introduces many new features in TRL for DPOTrainer:
DPOTrainerxxxTrainer tagging on the HubNow, trainers from TRL pushes automatically tags trl-sft, trl-dpo, trl-ddpo when pushing models on the Hub
xxxTrainer] Add tags to all trainers in TRL by @younesbelkada in https://github.com/huggingface/trl/pull/1120We encourage users to try out unsloth library for faster LLM fine-tuning using PEFT & TRL's SFTTrainer and DPOTrainer
Docs] Add unsloth optimizations in TRL's documentation by @younesbelkada in https://github.com/huggingface/trl/pull/1119Tests] Add non optional packages tests by @younesbelkada in https://github.com/huggingface/trl/pull/974examples/ by @alvarobartt in https://github.com/huggingface/trl/pull/977eos_token_id and pad_token_id by @MustSave in https://github.com/huggingface/trl/pull/988DataCollatorForCompletionOnlyLM] Add more clarification / guidance in the case tokenizer.pad_token_id == tokenizer.eos_token_id by @younesbelkada in https://github.com/huggingface/trl/pull/992requires_grad to input for non-quantized peft models by @younesbelkada in https://github.com/huggingface/trl/pull/1006core] Fix failing tests on main by @younesbelkada in https://github.com/huggingface/trl/pull/1065SFTTrainer] Fix Trainer when args is None by @younesbelkada in https://github.com/huggingface/trl/pull/1064loss_type in ValueError message by @alvarobartt in https://github.com/huggingface/trl/pull/1067tyro in sft_llama2.py by @vwxyzjn in https://github.com/huggingface/trl/pull/1081peft_module_casting_to_bf16 util method, append_concat_token flag, remove callback PeftSavingCallback by @pacman100 in https://github.com/huggingface/trl/pull/1110description in setup.py by @alvarobartt in https://github.com/huggingface/trl/pull/1101Full Changelog: https://github.com/huggingface/trl/compare/v0.7.4...v0.7.5
Fetched April 7, 2026