Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
baberabb committed Dec 25, 2024
1 parent 4e1cde1 commit 8f01b52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lm_eval/models/openai_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def parse_logprobs(
outputs = [outputs]
for out in outputs:
for choice, ctxlen in zip(
sorted(out["choices"], key=itemgetter("id")), ctxlens
sorted(out["choices"], key=itemgetter("index")), ctxlens
):
assert ctxlen > 0, "Context length must be greater than 0"
logprobs = sum(choice["logprobs"]["token_logprobs"][ctxlen:-1])
Expand Down

0 comments on commit 8f01b52

Please sign in to comment.