Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/transformers/generation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2303,13 +2303,9 @@ def generate(
# others are ignored
if synced_gpus is not None:
logger.warning(f"synced_gpus is not ignored for continuous batching. Got {synced_gpus = }")
num_return_sequences = kwargs.get("num_return_sequences", 1)
num_beams = kwargs.get("num_beams", 1)
if num_return_sequences > 1 or num_beams > 1: # FIXME: remove this once CB supports it (which is planned)
logger.warning(
f"num_return_sequences and num_beams are not supported for continuous batching yet. "
f"Got {num_return_sequences = } and {num_beams = }. "
)
if num_beams > 1: # FIXME: remove this once CB supports num_beams (which is planned)
logger.warning(f"num_beams is not supported for continuous batching yet. Got {num_beams = }. ")

# switch to CB
outputs = self.generate_batch(
Expand Down
Loading