Skip to content

Commit

Permalink
Fix merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
OyvindTafjord committed Sep 22, 2023
1 parent 0ddab2b commit ef0d437
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions eval/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ def get_next_word_predictions(model, tokenizer, prompts, candidate_token_ids=Non
attention_mask = attention_mask.cuda()

batch_logits = model(input_ids=batch_input_ids, attention_mask=attention_mask).logits[:, -1, :]
if candidate_token_ids is not None:
batch_logits = batch_logits[:, candidate_token_ids]
batch_probs = torch.softmax(batch_logits, dim=-1)
if candidate_token_ids is not None:
batch_probs = batch_probs[:, candidate_token_ids]
Expand Down

0 comments on commit ef0d437

Please sign in to comment.