Skip to content

Commit

Permalink
greedy_until() fix (#344)
Browse files Browse the repository at this point in the history
Co-authored-by: Nathan Habib <30601243+NathanHB@users.noreply.github.com>
Co-authored-by: Clémentine Fourrier <22726840+clefourrier@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 8, 2024
1 parent e51be17 commit 2f03df0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lighteval/models/nanotron_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ def greedy_until(
else:
# Longest context in the current split is the first item (since we sort reversed)
context_enc = dataset[0][1].tokenized_context
max_gen = max(item[1].generation_size for item in dataset)
max_gen = max(item.generation_size for item in dataset)
max_input_length = min(len(context_enc) + max_gen, self.max_length)

batch_size = self._get_batch_size(
Expand Down

0 comments on commit 2f03df0

Please sign in to comment.