Skip to content

Commit 90cc890

Browse files
committed
Add extra inference call for issue #173
Signed-off-by: Tin H To <tinto@us.ibm.com>
1 parent fc3a30f commit 90cc890

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

aiu_fms_testing_utils/scripts/drive_paged_programs.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,18 @@ def __load_validation_info(
421421
**extra_kwargs,
422422
)
423423

424+
# do an extra inference call to workaround the issue on z/OS where the first inference
425+
# result is always incorrect during multi-AIU (issue 173)
426+
extract_validation_information(
427+
model,
428+
input_ids,
429+
max_new_tokens,
430+
post_iteration_hook=None,
431+
last_n_tokens=64,
432+
prefill_chunk_size=args.prefill_chunk_size,
433+
**extra_kwargs,
434+
)
435+
424436
if USE_DISTRIBUTED:
425437
# wait for rank0 to be finished as it is the only one generating the criteria json
426438
# this is needed since otherwise we may run into a race condition

0 commit comments

Comments
 (0)