Skip to content

Commit

Permalink
Merge branch 'mlcommons:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh authored Jul 8, 2024
2 parents 0718769 + 4a77003 commit 387013c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions language/mixtral-8x7b/evaluate-accuracy.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def main():
if preds:
result = metric.compute(
predictions=preds, references=targets, use_stemmer=True, use_aggregator=False)
result = {k: round(np.mean(v) * 100, 4) for k, v in result.items()}
result = {k: float(round(np.mean(v) * 100, 4)) for k, v in result.items()}
prediction_lens = [len(pred) for pred in preds]

else:
Expand Down Expand Up @@ -212,7 +212,7 @@ def main():

result = {
**result,
'gen_len': np.sum(prediction_lens),
'gen_len': int(np.sum(prediction_lens)),
'gen_num': gen_num,
'gen_tok_len': gen_tok_len,
'tokens_per_sample': round(gen_tok_len / gen_num, 1),
Expand Down

0 comments on commit 387013c

Please sign in to comment.