Upload moe_phi3_v.py
Browse files- moe_phi3_v.py +1 -1
moe_phi3_v.py
CHANGED
@@ -347,7 +347,7 @@ class Phi3VForCausalLMMoE(Phi3VForCausalLM):
|
|
347 |
return self.gate(x)
|
348 |
|
349 |
gating_layer = SimpleGatingLayer(self.config.hidden_size, num_experts, layer_dtype=self.layer_dtype).to(self.custom_device)
|
350 |
-
|
351 |
criterion = nn.CrossEntropyLoss()
|
352 |
optimizer = Adam(gating_layer.parameters(), lr=lr)
|
353 |
|
|
|
347 |
return self.gate(x)
|
348 |
|
349 |
gating_layer = SimpleGatingLayer(self.config.hidden_size, num_experts, layer_dtype=self.layer_dtype).to(self.custom_device)
|
350 |
+
|
351 |
criterion = nn.CrossEntropyLoss()
|
352 |
optimizer = Adam(gating_layer.parameters(), lr=lr)
|
353 |
|