Skip to content

a small bug in qwen3_moe #41085

@shiwanghua

Description

@shiwanghua

System Info

idx, top_x = torch.where(expert_mask[expert_idx].squeeze(0))

The names of the first and second variables should be exchanged:

top_x, idx = torch.where(expert_mask[expert_idx].squeeze(0))

In the subsequent code, replace the topk with idx and vice versa.

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

wrong name meaning

Expected behavior

change the codes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions