Merge branch 'ml-explore:main' into adding-orpo-training

This commit is contained in:
Gökdeniz Gülmez
2025-02-04 11:04:40 +01:00
committed by GitHub
7 changed files with 52 additions and 32 deletions

View File

@@ -140,8 +140,8 @@ def evaluate(
loss: callable = default_loss,
iterate_batches: callable = iterate_batches,
):
all_losses = 0
ntokens = 0
all_losses = mx.array(0.0)
ntokens = mx.array(0)
index_iterator = iter(range(num_batches)) if num_batches != -1 else iter(int, 1)