Fix test_eos_token_id_int_and_list_top_k_top_sampling
#22826
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
In #22204, I updated the expected value in
test_eos_token_id_int_and_list_top_k_top_sampling
to pass theCircleCI
. However, the daily CI fails with that new value. It turns out that we need a seed that could give the same (generation) output (at minimum, the same output length) on both CPU/GPU machines. The difference is very likely coming from somehow larger numerical differences after certain generation steps.remark
With seed
0
, the outputgenerated_tokens[0]
is:cpu
:[ 40, 416, 79, 12, 230, 89, 231, 432, 301, 212, 933, 225, 33, 33, 846]
gpu
:[ 40, 416, 79, 12, 230, 89, 231, 432, 301, 212, 933, 225, 476, 682, 319, 832, 873, 853, 873, 832]