mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-06-24 17:31:18 +08:00
chore: fix loar for moe model (#608)
This commit is contained in:
parent
b8a348c1b8
commit
494cdf8e96
@ -189,7 +189,6 @@ def train(
|
|||||||
|
|
||||||
state = [model.state, optimizer.state]
|
state = [model.state, optimizer.state]
|
||||||
|
|
||||||
@partial(mx.compile, inputs=state, outputs=state)
|
|
||||||
def step(batch):
|
def step(batch):
|
||||||
# Forward and backward pass
|
# Forward and backward pass
|
||||||
(lvalue, toks), grad = loss_value_and_grad(model, *batch)
|
(lvalue, toks), grad = loss_value_and_grad(model, *batch)
|
||||||
|
Loading…
Reference in New Issue
Block a user