Skip to content

Sequence Parallel injection as a class#46099

Open
3outeille wants to merge 1 commit into
mainfrom
sp-fix
Open

Sequence Parallel injection as a class#46099
3outeille wants to merge 1 commit into
mainfrom
sp-fix

Conversation

@3outeille
Copy link
Copy Markdown
Member

No description provided.

@3outeille 3outeille requested a review from ArthurZucker May 20, 2026 05:58
@github-actions
Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: apertus, arcee, aria, cohere, cohere2, cwm, deepseek_v2, ernie4_5, eurobert, exaone4, gemma, gemma2, gemma3, glm, glm4, gpt_neox

@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.

@github-actions
Copy link
Copy Markdown
Contributor

View the CircleCI Test Summary for this PR:

https://huggingface.co/spaces/transformers-community/circle-ci-viz?pr=46099&sha=eb018b

Copy link
Copy Markdown
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Can we remove the @ self could make sense as self.embed_tokens , not @self .

Comment on lines +1408 to +1410
# "@self" in an SP plan targets the base module itself. Normalize to "" so
# downstream prefix/lookup logic treats it as the module's own FQN.
sp_plan = self.config.base_model_sp_plan or {}
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.

this should be in the documentation of the argument not here.

Comment on lines +1439 to +1441
# Empty key denotes "this child module itself" (from the "@self" sentinel);
# prefix it to just `name` so it matches the child's FQN, not "{name}.".
self._sp_plan.update({(name if k == "" else f"{name}.{k}"): v for k, v in plan.copy().items()})
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.

nice

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.

3 participants