KEMBAR78
Fix grammatical error in MoE variable name: expert_hitted → expert_hit, hitted_experts → hit_experts by Mihonarium · Pull Request #39959 · huggingface/transformers · GitHub
Skip to content

Conversation

@Mihonarium
Copy link
Contributor

What does this PR do?

Fixes a grammatical error in variable naming across all Mixture of Experts (MoE) implementations. The variables expert_hitted and hitted_experts are grammatically incorrect: the past tense/past participle of "hit" is "hit", not "hitted".

Fixes #39955.

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?

Who can review?

Anyone can review. This is a simple grammatical fix in internal variable naming. No functionality changes.

Changes made

Renamed expert_hittedexpert_hit in:

  • src/transformers/models/gpt_oss/modular_gpt_oss.py
  • src/transformers/models/mixtral/modular_mixtral.py
  • src/transformers/models/ernie4_5_moe/modular_ernie4_5_moe.py
  • src/transformers/models/qwen3_moe/modular_qwen3_moe.py
  • src/transformers/models/gpt_oss/modeling_gpt_oss.py
  • src/transformers/models/mixtral/modeling_mixtral.py
  • src/transformers/models/ernie4_5_moe/modeling_ernie4_5_moe.py
  • src/transformers/models/qwen3_moe/modeling_qwen3_moe.py
  • src/transformers/models/qwen2_moe/modeling_qwen2_moe.py
  • src/transformers/models/minimax/modeling_minimax.py

Renamed hitted_experts -> hit_experts in:

  • src/transformers/integrations/mxfp4.py

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 2025

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

run-slow: ernie4_5_moe, gpt_oss, minimax, mixtral, qwen2_moe, qwen3_moe

Copy link
Member

@Rocketknight1 Rocketknight1 left a comment

Choose a reason for hiding this comment

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

Yep, this is correct. Thank you for the fix!

@Rocketknight1 Rocketknight1 enabled auto-merge (squash) August 6, 2025 15:35
@Rocketknight1 Rocketknight1 merged commit 43b3f58 into huggingface:main Aug 6, 2025
24 checks passed
@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.

@Mihonarium Mihonarium deleted the fix-typo-hitted branch August 6, 2025 17:09
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.

Fix grammatically incorrect variable name "expert_hitted" → "expert_hit" in MoE implementation

3 participants