Repository navigation
Require peft>=0.17.0 and drop the target_parameters guards - #7640
Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
|
CI with minimum versions is red for This PR requires marking that test as xfail: #7646 is independent of the merge order and turns the resulting crash into a clear error across the trainers. |
|
nice, thanks! |
| ".[dev]" \ | ||
| "accelerate==1.4.0" \ | ||
| "datasets==4.7.0" \ | ||
| "peft==0.17.0" \ |
|
The minimum-versions job is red on The rest of the job is green (1 failed, 1997 passed), and the collection error from the previous run is gone. https://github.com/huggingface/trl/actions/runs/38547934903/job/115798519219 Investigating. |
|
Investigated: the failure is a bug on I will merge |
This PR raises the peft floor from 0.13.0 (September 2024) to 0.17.0 (August 2025) and removes the guards that floor made necessary.
Part of #7644.
Depends on
Motivation
peft 0.13.0 is 24 months old, so under the criterion in #7116 it can be dropped without further justification. 0.17.0 is the newest release the same criterion allows today, since it is 14 months old and the rule does not require anything younger than 1 year.
LoraConfig.target_parameterswas introduced in peft 0.17.0, so everything #7119 added to keep 0.13 through 0.16 working becomes dead at this floor.Changes
peft>=0.13.0to>=0.17.0in thepeftextra and indevVersion("0.17.0") <=lower bound from the reference-adapter guard in the DPO, GRPO, KTO and RLOO trainers, and the comment sentence explaining ittarget_parameterstoLoraConfigdirectly inget_peft_configagain, instead of only when setrequire_peft_target_parameterstest mark and restore@require_pefton the six tests that used itpeft==0.17.0in the minimum-versions CI jobThe
< Version("0.20.0")upper bound stays: it encodes peft#3340, fixed by peft#3350 in 0.20.0, and 0.17 to 0.19 are still supported.Note
Medium Risk
Raises the supported PEFT floor (breaking for 0.13–0.16 installs) while RL trainer reference-adapter logic for 0.17–0.19 is unchanged aside from simplified version checks.
Overview
Raises the minimum PEFT dependency from
>=0.13.0to>=0.17.0inpyproject.toml(peftextra anddev) and pinspeft==0.17.0in the minimum-versions CI job.Because
LoraConfig.target_parametersexists from 0.17 onward, the PR removes older-version shims: therequire_peft_target_parameterspytest marker (MoE tests use@require_peftagain), unconditionaltarget_parametersinget_peft_config, and the lower bound on the reference-adapter warning in DPO, GRPO, KTO, and RLOO (still warns for PEFT < 0.20.0 whentarget_parametersis set).Reviewed by Cursor Bugbot for commit 12027e1. Bugbot is set up for automated code reviews on this repo. Configure here.