Skip to content

PEFT x Dtensor-based TP integration - #48485

Merged
michaelbenayoun merged 12 commits into
huggingface:mainfrom
michaelbenayoun:peft_tp_sync
Sep 23, 2026
Merged

michaelbenayoun merged 12 commits into
huggingface:mainfrom
michaelbenayoun:peft_tp_sync

Conversation

@michaelbenayoun

@michaelbenayoun michaelbenayoun commented Sep 2, 2026 •

Copy link
Copy Markdown
Member

CPU CI GPU run-slow

What does this PR do?

The PEFT integration was no up-to-date.
Working on support for the new DTensor-based API in the PEFT repo: huggingface/peft#3614.

cc @BenjaminBossan @3outeille

@michaelbenayoun michaelbenayoun changed the title TP PEFT x Dtensor-based TP integration Sep 2, 2026
@HuggingFaceDocBuilderDev

Copy link
Copy Markdown

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.

@BenjaminBossan

Copy link
Copy Markdown
Member

IIUC, we should wait for huggingface/peft#3614 to be merged and then check that the PEFT integration in Transformers works with this PR before merging, right?

@michaelbenayoun

Copy link
Copy Markdown
Member Author

@BenjaminBossan yes works for me to do it the suggested order.

Comment thread src/transformers/integrations/peft.py Outdated
_maybe_shard_state_dict_for_tp(self, adapter_state_dict, adapter_name)
if has_tp_adapters and not is_peft_greater_or_equal("0.20.1", accept_dev=True):
raise ValueError(
"Loading a tensor-parallel PEFT adapter requires peft >= 0.20.1, please upgrade your peft "

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can set the min version to 0.21.0. We will most likely not have a patch release at this point, and even if we did, the TP support wouldn't fit a patch release.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@ArthurZucker ArthurZucker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@github-actions

Copy link
Copy Markdown
Contributor

CI recap

Dashboard: View test results in Grafana
Latest run: 35323608915:1
Result: success | Jobs: 16 | Tests: 190,603 | Failures: 0 | Duration: 17h 10m

@michaelbenayoun
michaelbenayoun added this pull request to the merge queue Sep 23, 2026
Merged via the queue into huggingface:main with commit 935f7ab Sep 23, 2026
113 checks passed
@michaelbenayoun
michaelbenayoun deleted the peft_tp_sync branch September 23, 2026 12:30
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.

4 participants