Skip to content

Commit

Permalink
output token size should be same as infer count in greedy search
Browse files Browse the repository at this point in the history
  • Loading branch information
wgzintel committed May 27, 2024
1 parent 1a98078 commit d8ffa7f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llm_bench/python/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ def run_text_generation(input_text, num, model, tokenizer, args, iter_data_list,
if bench_hook is not None:
tm_list = bench_hook.get_time_list()
tm_infer_list = bench_hook.get_time_infer_list()
if args['num_beams'] == 1 and generated_token_size != len(tm_infer_list):
log.warning(f'Output token size({generated_token_size}) is not equal to infer count({len(tm_infer_list)})')
iter_data = gen_iterate_data(
num,
input_token_size * args['batch_size'],
Expand Down

0 comments on commit d8ffa7f

Please sign in to comment.