[FixBug] compute early stopping with real batch size (#3418)

* [FixBug] compute early stopping with real batch size

* update

* fix test_sampler
This commit is contained in:
Zero Rains
2025-08-19 13:09:21 +08:00
committed by GitHub
parent 3a7a20d191
commit 8b12c80f90
4 changed files with 69 additions and 6 deletions

View File

@@ -57,6 +57,7 @@ def _create_default_sampling_metadata(
bad_words_token_ids=paddle.full(shape=[batch_size], fill_value=-1, dtype="int64"),
eos_token_ids=paddle.full(shape=[batch_size], fill_value=-2, dtype="int64"),
min_p=paddle.randn([batch_size]),
seed=paddle.to_tensor([[2025]]),
)
return fake_sampling_metadata