mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-06 09:07:10 +08:00
[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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user