Skip to content

Fix typo get_dispached_metadata #10533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions paddlenlp/transformers/token_dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def combine(self, hidden_states: paddle.Tensor) -> paddle.Tensor:
pass

@abstractmethod
def get_dispached_metadata(self) -> paddle.Tensor:
def get_dispatched_metadata(self) -> paddle.Tensor:
"""Get the metadata of the dispatched hidden_states."""
pass

Expand Down Expand Up @@ -154,7 +154,7 @@ def _indices_to_multihot(self, indices, probs):
multihot_probs[row_indices, valid_indices] = probs[mask]
return multihot_routing_map.cast(paddle.bool), multihot_probs

def get_dispached_metadata(self) -> paddle.Tensor:
def get_dispatched_metadata(self) -> paddle.Tensor:
return self.dispatched_indices, self.dispatched_probs

def get_number_of_tokens_per_expert(self) -> paddle.Tensor:
Expand Down