Skip to content

Commit

Permalink
make func
Browse files Browse the repository at this point in the history
Signed-off-by: Mayank Mishra <[email protected]>
  • Loading branch information
mayank31398 committed Sep 12, 2024
1 parent b2c19d7 commit 94a1b46
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dolomite_engine/hf_models/mixins/moe/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,14 @@ def forward(

hidden_states = outputs[0]
outputs = outputs[1:]

if output_router_logits:
all_router_logits += (outputs[0],)
outputs = outputs[1:]

if output_aux_loss:
total_aux_loss = total_aux_loss + outputs[0]
outputs = outputs[1:]
aux_loss = outputs[0]
total_aux_loss = total_aux_loss + aux_loss

hidden_states = self.ln_f(hidden_states)

Expand Down

0 comments on commit 94a1b46

Please sign in to comment.