Skip to content

Commit e4884df

Browse files
authored
Change interleave option to subsequent (openvinotoolkit#279)
JIRA: CVS-134557
1 parent fa98c77 commit e4884df

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

llm_bench/python/benchmark.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def run_text_generation_benchmark(model_path, framework, device, args, num_iters
183183

184184
# if num_iters == 0, just output warm-up data
185185
proc_id = os.getpid()
186-
if args['interleave'] is True:
186+
if args['subsequent'] is False:
187187
for num in range(num_iters + 1):
188188
for prompt_idx, input_text in enumerate(input_text_list):
189189
if num == 0:
@@ -277,7 +277,7 @@ def run_image_generation_benchmark(model_path, framework, device, args, num_iter
277277

278278
# if num_iters == 0, just output warm-up data
279279
proc_id = os.getpid()
280-
if args['interleave'] is True:
280+
if args['subsequent'] is False:
281281
for num in range(num_iters + 1):
282282
for image_id, image_param in enumerate(input_image_list):
283283
run_image_generation(image_param, num, image_id, pipe, args, iter_data_list, proc_id)
@@ -482,6 +482,12 @@ def get_argprser():
482482
help='if the value is True, input prompts are processed in interleave manner'
483483
'if the value is False (default), input prompts are processed in subsequent manner'
484484
)
485+
parser.add_argument(
486+
'--subsequent',
487+
action='store_true',
488+
help='if the value is True, input prompts are processed in subsequent manner'
489+
'if the value is False (default), input prompts are processed in interleave manner'
490+
)
485491
parser.add_argument('-od', '--output_dir', help='Save the input text and generated text, images to files')
486492
utils.model_utils.add_stateful_model_arguments(parser)
487493

llm_bench/python/utils/model_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def analyze_args(args):
133133
model_args['num_beams'] = args.num_beams
134134
model_args['torch_compile_backend'] = args.torch_compile_backend
135135
model_args['convert_tokenizer'] = args.convert_tokenizer
136-
model_args['interleave'] = args.interleave
136+
model_args['subsequent'] = args.subsequent
137137
model_args['output_dir'] = args.output_dir
138138

139139
model_framework = args.framework

0 commit comments

Comments
 (0)