Skip to content

Commit 3ff80a2

Browse files
adding comment
1 parent 697731a commit 3ff80a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

recipes/eleuther_eval.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def _model_generate(
131131
maybe_padded_context = torch.nn.functional.pad(
132132
context,
133133
(0, 0, 0, self._batch_size - curr_batch_size),
134-
value=self._tokenizer.eos_id,
134+
value=self._tokenizer.eos_id, # pad with one of the tokenizer's stop tokens so generation can stop early
135135
)
136136

137137
temperature = generation_kwargs.get("temperature", 0.0)

0 commit comments

Comments
 (0)