Skip to content

Commit

Permalink
Call out limitations of Eleuther generation capabilities (pytorch#1251)
Browse files Browse the repository at this point in the history
  • Loading branch information
joecummings authored Aug 2, 2024
1 parent 288ff44 commit 43c7332
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions recipes/eleuther_eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,12 @@ def _model_generate(
) -> torch.Tensor:
curr_batch_size = context.size(0)

if curr_batch_size > 1:
raise ValueError(
f"Got a batch size of '{curr_batch_size}'. Batch size > 1 is not supported for "
"generation. See https://github.com/pytorch/torchtune/issues/1250 for more info."
)

# Setup caches for a given batch size
# Technically this is not necessary, but it's a good way to ensure that
# the caches won't error on a different batch size. In addition, caches
Expand Down

0 comments on commit 43c7332

Please sign in to comment.