Skip to content

Commit

Permalink
disable md5 check assert for CB (#933)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrei-kochin authored Oct 8, 2024
2 parents a5fb3a6 + 14df316 commit 09c5742
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions llm_bench/python/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,13 +308,14 @@ def run_text_generation_genai(input_text, num, model, tokenizer, args, iter_data
log.warning(f"[{num}] Prompt[{prompt_index}]'s md5 {result_md5_list} "
f"is different from md5 of the {num - 1} iteration {prev_md5}")
llm_bench_utils.metrics_print.print_generated(num, warm_up=(num == 0), generated=generated_text[0])
if num == 1:
# if the device is CPU, throw exception
if args['devices'].lower().startswith('cpu') is True:
if not args.get("use_cb", False):
if num == 1:
# if the device is CPU, throw exception
if args['devices'].lower().startswith('cpu') is True:
assert (result_md5_list == prev_md5)
else:
# throw exception
assert (result_md5_list == prev_md5)
else:
# throw exception
assert (result_md5_list == prev_md5)
else:
llm_bench_utils.metrics_print.print_generated(num, warm_up=(num == 0), generated=generated_text[0])

Expand Down Expand Up @@ -814,7 +815,7 @@ def get_argprser():
llm_bench_utils.model_utils.add_stateful_model_arguments(parser)
parser.add_argument("--genai", action="store_true", help="Use OpenVINO GenAI optimized pipelines for benchmarking")
parser.add_argument("--use_cb", action="store_true", help="Use Continuous Batching inference mode")
parser.add_argument("--cb_config", required=False, default=None, help="Path to file with Continuous Batching Scheduler settings")
parser.add_argument("--cb_config", required=False, default=None, help="Path to file with Continuous Batching Scheduler settings or dict")
parser.add_argument(
'--end_token_stopping',
action='store_true',
Expand Down

0 comments on commit 09c5742

Please sign in to comment.