Skip to content

Conversation

@Cyrilvallez
Copy link
Member

@Cyrilvallez Cyrilvallez commented Nov 10, 2025

What does this PR do?

Fixes #42016. Currently, we replace any number in a parameter name with a * to match the tp_plan. However, params may contain numbers naturally in their name, such as Mixtral's MLPs containing w1, w2 and w3 param names. This means that they were replaced, and thus not detected as needing sharding. So basically they would be invisible from the tp_plan and never sharded 🥵🥵

The regex now checks for . (dots) on each side of the numbers, to only match layers or list names as we need.

Also fixes a few TP-plans, that were detected wrong by the test 🙃🙃

Copy link
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.

Missing a big test ! mega important!

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

@Cyrilvallez Cyrilvallez changed the title [TP] Fix parameter detection issue [TP] Fix parameter detection issue and some invalid TP-plans Nov 11, 2025
@github-actions
Copy link
Contributor

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

run-slow: apertus, aria, deepseek_v2, doge, flex_olmo, gemma3, glm4v_moe, qwen3_next, t5gemma

@Cyrilvallez Cyrilvallez merged commit c4cfc2e into main Nov 13, 2025
24 checks passed
@Cyrilvallez Cyrilvallez deleted the fix-tp branch November 13, 2025 14:44
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.

Load Mixtral-8x22B-Instruct-v0.1 lead to OOM

4 participants