Skip to content

Commit 07ec941

Browse files
committed
adapt script long_context.py
Signed-off-by: Yannick Schnider <[email protected]>
1 parent 58b6de8 commit 07ec941

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/offline_inference/long_context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
trunc = args.trunc_print_len
5757

5858
max_num_seqs = args.max_num_seqs # defines the max batch size
59-
assert args.max_prompt_len < args.max_model_len
59+
assert args.max_prompt_len <= args.max_model_len
6060

6161
if platform.machine() == "arm64":
6262
print("Detected arm64 running environment. "
@@ -122,7 +122,7 @@ def round_up(t):
122122

123123

124124
tokens_to_generate = [
125-
args.max_model_len - round_up(plen) for plen in prompt_lens
125+
args.max_model_len + 1 - round_up(plen) for plen in prompt_lens
126126
]
127127

128128
sampling_params = [

0 commit comments

Comments
 (0)