From 3eb13ccd8ce16052b2fa82c4aa2b7e7510471cf8 Mon Sep 17 00:00:00 2001 From: Cengguang Zhang Date: Mon, 3 Jun 2024 10:05:43 +0800 Subject: [PATCH] LLM: fix input length condition in deepspeed all-in-one benchmark. (#11185) --- python/llm/dev/benchmark/all-in-one/run.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/llm/dev/benchmark/all-in-one/run.py b/python/llm/dev/benchmark/all-in-one/run.py index 7257a136..d0b3b363 100644 --- a/python/llm/dev/benchmark/all-in-one/run.py +++ b/python/llm/dev/benchmark/all-in-one/run.py @@ -1518,7 +1518,7 @@ def run_deepspeed_optimize_model_gpu(repo_id, # in_len.txt maybe shorter than we need, # use much longer context to make sure input length test_length = min(in_len*2, 8192) - while test_length not in [32, 256, 1024, 2048, 8192]: + while test_length not in [32, 256, 1024, 2048, 8192] and test_length < 8192: test_length = test_length * 2 input_str = open(f"prompt/{test_length}.txt", 'r').read() # As different tokenizer has different encodings,