Skip to content

Conversation

greg-kwasniewski1
Copy link
Contributor

@greg-kwasniewski1 greg-kwasniewski1 commented Sep 11, 2025

Fixes #40813

Second linear layer in Starcoder2s MLP c_proj should be row-sharded and not column-sharded. Otherwise, column-sharding both c_fc and c_proj results in incorrect sharding and tensor shape mismatch.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

Signed-off-by: greg-kwasniewski1 <213329731+greg-kwasniewski1@users.noreply.github.com>
Copy link
Contributor

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

run-slow: starcoder2

@Rocketknight1
Copy link
Member

cc @Cyrilvallez maybe?

Copy link
Member

@Cyrilvallez Cyrilvallez left a comment

Choose a reason for hiding this comment

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

Indeed! Should absolutely be rowwise, thanks a lot for the catch!

@Cyrilvallez Cyrilvallez merged commit c65fea0 into huggingface:main Sep 15, 2025
15 checks passed
ErfanBaghaei pushed a commit to ErfanBaghaei/transformers that referenced this pull request Sep 25, 2025
…l. (huggingface#40814)

Signed-off-by: greg-kwasniewski1 <213329731+greg-kwasniewski1@users.noreply.github.com>
vijayabhaskar-ev pushed a commit to vijayabhaskar-ev/transformers that referenced this pull request Oct 2, 2025
…l. (huggingface#40814)

Signed-off-by: greg-kwasniewski1 <213329731+greg-kwasniewski1@users.noreply.github.com>
yuchenxie4645 pushed a commit to yuchenxie4645/transformers that referenced this pull request Oct 4, 2025
…l. (huggingface#40814)

Signed-off-by: greg-kwasniewski1 <213329731+greg-kwasniewski1@users.noreply.github.com>
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.

Incorrect sharding configuration for Starcoder2 model
3 participants