Raise error for long prompt (#273)

This commit is contained in:
Lily Liu
2023-06-30 18:48:49 -07:00
committed by GitHub
parent 598dc4b79a
commit dafd924c1f
5 changed files with 42 additions and 11 deletions
+4
View File
@@ -186,14 +186,18 @@ class SchedulerConfig:
a single iteration.
max_num_seqs: Maximum number of sequences to be processed in a single
iteration.
max_seq_len: Maximum length of a sequence (including prompt
and generated text).
"""
def __init__(
self,
max_num_batched_tokens: int,
max_num_seqs: int,
max_seq_len: int
) -> None:
self.max_num_batched_tokens = max_num_batched_tokens
self.max_num_seqs = max_num_seqs
self.max_seq_len = max_seq_len
_STR_DTYPE_TO_TORCH_DTYPE = {