Update modeling_tiny_mixtral.py
Browse files- modeling_tiny_mixtral.py +1 -1
modeling_tiny_mixtral.py
CHANGED
|
@@ -456,7 +456,7 @@ class SparseMOE(nn.Module):
|
|
| 456 |
alpha = 0.01 # auxiliary loss weight (you can make this configurable)
|
| 457 |
load_balancing_loss = alpha * self.num_experts * torch.sum(f_i * P_i)
|
| 458 |
|
| 459 |
-
return final_output
|
| 460 |
|
| 461 |
##final_loss = task_loss + router_loss_weight * router_loss
|
| 462 |
|
|
|
|
| 456 |
alpha = 0.01 # auxiliary loss weight (you can make this configurable)
|
| 457 |
load_balancing_loss = alpha * self.num_experts * torch.sum(f_i * P_i)
|
| 458 |
|
| 459 |
+
return final_output
|
| 460 |
|
| 461 |
##final_loss = task_loss + router_loss_weight * router_loss
|
| 462 |
|