Skip to content

[Fix] dots1 expert bias routing - #41663

Merged
vasqu merged 2 commits into
huggingface:mainfrom
fjosw:fix/dots1_expert_bias_routing
Dec 2, 2025
Merged

[Fix] dots1 expert bias routing#41663
vasqu merged 2 commits into
huggingface:mainfrom
fjosw:fix/dots1_expert_bias_routing

Conversation

@fjosw

@fjosw fjosw commented Oct 16, 2025

Copy link
Copy Markdown
Contributor

What does this PR do?

This is a follow up to #41647. I went over the model code again and noticed that the dots1 routing apparently also broke in #40132. dots1 seems to be very close in architecture to Deepseek V3 but not explcitly dependent. Not sure if there is a more elegant way to fix this?

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?

@ArthurZucker

@fjosw

fjosw commented Oct 21, 2025

Copy link
Copy Markdown
Contributor Author

Reminder: I think the dots1 model is still broken on main @ArthurZucker, not sure if this PR is the best way to address this, though.

@github-actions

github-actions Bot commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

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

run-slow: dots1

@vasqu vasqu 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, I double checked and this looks correct to me. The selection is affected by the e_score_bias but not the final logits that are then selected.

Imo, we could refactor this later on to be within the router instead! (including deepseek). cc @3outeille since you worked a lot on MoEs recently it might be interesting

@vasqu
vasqu enabled auto-merge (squash) December 2, 2025 14:18
@vasqu
vasqu merged commit 29e8522 into huggingface:main Dec 2, 2025
17 checks passed
@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.

sarathc-cerebras pushed a commit to sarathc-cerebras/transformers that referenced this pull request Dec 7, 2025
SangbumChoi pushed a commit to SangbumChoi/transformers that referenced this pull request Jan 23, 2026
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