Skip to content

Commit

Permalink
Fix mc bugs for loss
Browse files Browse the repository at this point in the history
  • Loading branch information
brian.li committed Nov 2, 2024
1 parent 5720bd1 commit 2702647
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lmms_eval/api/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -1444,8 +1444,12 @@ def process_results(self, doc, results, full_docs=None):
# and this stores our "regular" conditional loglikelihoods
lls = lls[::2]

pred = np.argmax(lls)
pred_norm = np.argmax(lls / completion_len)
# Warning :
# Here may be different from original lm-eval
# since we return the actual loss in many model loglikelihood
# we just use the argmin here
pred = np.argmin(lls)
pred_norm = np.argmin(lls / completion_len)

if self.multiple_input:
gold = self.doc_to_text(doc)
Expand Down

0 comments on commit 2702647

Please sign in to comment.