Skip to content

Conversation

@younesbelkada
Copy link
Contributor

As per title, huggingface/transformers#26681 introduced new cache mechanism, this PR patches the adaption prompt modeling code to handle the new case as well

cc @BenjaminBossan @pacman100

@younesbelkada
Copy link
Contributor Author

Note this PR is not enough to make the CI green , we still need to figure out a fix for the other failing tests

@HuggingFaceDocBuilderDev

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.

cyyever pushed a commit to cyyever/peft that referenced this pull request Sep 4, 2025
* fix: only load data on main process

* define is_main_process once

Co-authored-by: Younes Belkada <[email protected]>

* avoid re-initializing PartialState on train dataset check

Co-authored-by: Younes Belkada <[email protected]>

* avoid re-initializing PartialState on eval dataset check

Co-authored-by: Younes Belkada <[email protected]>

* process dataset on main first to take advantage of caching

* fix typo in docs

* use decorator to manage state

* Revert "fix typo in docs"

This reverts commit 0880a188812a698f7106853245ce1ba96a036831.

* Revert "Revert "fix typo in docs""

This reverts commit ff7ee33fbeedcd0032b728d86a17cfcb10e43f9b.

* Revert "use decorator to manage state"

This reverts commit 7ac7a45949f621941fedc522f0d2ca7b29367c3a.

* use is_local_main_process instead of is_main_process

* fix: use context manager instead of attribute

Co-authored-by: Younes Belkada <[email protected]>

* Update trl/trainer/sft_trainer.py

Co-authored-by: Younes Belkada <[email protected]>

---------

Co-authored-by: Younes Belkada <[email protected]>
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.

2 participants