Repository navigation
Allow models to customize tensor parallel plans - #15197
Open
yzhautouskay wants to merge 1 commit into
Open
yzhautouskay wants to merge 1 commit into
yzhautouskay wants to merge 1 commit into
Conversation
1 of 10 tasks
sayakpaul
approved these changes
Nov 6, 2026
sayakpaul
left a comment
Member
There was a problem hiding this comment.
Thanks!
Could you also preserve the contribution history?
|
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. |
yzhautouskay
force-pushed
the
yzhautouskay/tp-plan-resolution
branch
from
November 6, 2026 14:51
cb1a570 to
feb7dfd
Compare
Contributor
|
Hi @yzhautouskay, thanks for the PR! It does not appear to link an issue it fixes.
See the contribution guide for more details. Please note that PRs without a linked issue are likely to be automatically closed 10 days after this notice. Once the PR links an existing issue, the author box is ticked, or the |
This was referenced Nov 9, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Route TP shard resolution and hook installation through
_get_tp_plan(). It returns the existing class-level plan by default, preserving current behavior.This enables configuration-dependent plans without modifying the class attribute. Cosmos 3 needs this because SiLU uses
gate_projlayers while ReLU2 does not – differs between model flavors. Extracted from #15137, needed here https://github.com/huggingface/diffusers/pull/15137/changes#diff-2e4d21f189d670c5f6d027711540b335373c8ab2eaff5bf10471ec8dc2e945b5R405, as requested in reviewBefore submitting
self-reviewskill on the diff?documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
@sayakpaul
Core library:
Integrations:
HF projects:
-->