Skip to content

Conversation

@wyycommu
Copy link

@wyycommu wyycommu commented Dec 1, 2025

Due to the PEFT version not being specified, the latest version peft==0.18.0 was installed by default, causing the following error:
(as is mentioned in this issue )

  File ".venv\Lib\site-packages\peft\tuners\lora\model.py", line 26, in <module>
    from transformers.pytorch_utils import GradientCheckpointingLayer
ImportError: cannot import name 'GradientCheckpointingLayer' from 'transformers.pytorch_utils'

or

  File ".venv\Lib\site-packages\peft\tuners\lora\model.py", line 26, in <module>
    from transformers.modeling_layers import GradientCheckpointingLayer
ModuleNotFoundError: No module named 'transformers.modeling_layers'

Downgrading PEFT to version 0.15.0 resolves this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant