Skip to content

Variable name mismatch on MixtralExperts.forward() #41984

@kwonmha

Description

@kwonmha

System Info

latest(current) transformers on github

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

https://github.com/huggingface/transformers/blame/b9f90dc388fd415a2ba2a6a31a372f451d4a4eed/src/transformers/models/mixtral/modular_mixtral.py#L164-L171
top_k_index, top_k_weights are used on function definition, selected_experts , routing_weights are used on function docstring.

Expected behavior

It would be better if their name match.

It may be a minor issue but it is having impact on every other models inherits this code block.
@ArthurZucker

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