mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-12-16 02:08:55 +08:00
last update, gn
This commit is contained in:
@@ -387,7 +387,8 @@ def evaluate_model(args, model: nn.Module, tokenizer: TokenizerWrapper, test_set
|
||||
|
||||
test_ppl = math.exp(test_loss)
|
||||
|
||||
print(f"Test loss {test_loss:.3f}, Test ppl {test_ppl:.3f}, Rewards: {test_rewards[0]:.3f}, {test_rewards[1]:.3f}")
|
||||
rewards_str = ", ".join([f"{k}: {v:.3f}" for k, v in test_rewards.items()])
|
||||
print(f"Test loss {test_loss:.3f}, Test ppl {test_ppl:.3f}, Rewards: {rewards_str}")
|
||||
else:
|
||||
test_loss = evaluate(
|
||||
model=model,
|
||||
|
||||
Reference in New Issue
Block a user