Skip to content

Fix PEFT gradient checkpointing with frozen input embeddings#42494

Closed
Aaraviitkgp wants to merge 2 commits intohuggingface:mainfrom
Aaraviitkgp:fix-peft-gradient-checkpointing
Closed

Fix PEFT gradient checkpointing with frozen input embeddings#42494
Aaraviitkgp wants to merge 2 commits intohuggingface:mainfrom
Aaraviitkgp:fix-peft-gradient-checkpointing

Conversation

@Aaraviitkgp
Copy link
Copy Markdown
Contributor

@Aaraviitkgp Aaraviitkgp commented Nov 29, 2025

error: #42489
I have added a fallback check in gradient_checkpointing_enable, if the PEFT flag is missing, the code now checks if the input embeddings are frozen. If they are, it explicitly calls enable_input_require_grads().

@qgallouedec

@Aaraviitkgp
Copy link
Copy Markdown
Contributor Author

Aaraviitkgp commented Nov 29, 2025

@qgallouedec Th test_processors and test_tokenization error seem to have nothing to do with pr, is there a issue in ci pipeline, it happened before in my other pr aswell.

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