[Feature] support prompt repetition_penalty (#2954)

* [Feature] support prompt repetition_penalty (#2806)

* [Bug Fix] fix bug of prompt penalty (#2888)
This commit is contained in:
ming1753
2025-07-22 19:42:33 +08:00
committed by GitHub
parent 535a15ab8f
commit 69be77c8c0
8 changed files with 305 additions and 64 deletions

View File

@@ -57,6 +57,12 @@ def _create_default_sampling_metadata(
top_p=paddle.full(shape=[batch_size, 1],
fill_value=0.7,
dtype="float32"),
prompt_ids=paddle.full(shape=[batch_size, max_seq_len],
fill_value=0,
dtype="int64"),
prompt_lens=paddle.full(shape=[batch_size, 1],
fill_value=5,
dtype="int64"),
step_idx=paddle.full(shape=[batch_size, 1],
fill_value=0,
dtype="int64"),