[Bugfix][Beam Search] Respect skip_special_tokens during decoding (#56211)
Signed-off-by: lxy-alexander <lxy_alexander@outlook.com> Co-authored-by: OpenAI Codex <noreply@openai.com>
This commit is contained in:
co-authored by
OpenAI Codex
parent
73d2a8cf86
commit
10e8d5614c
@@ -1313,6 +1313,7 @@ class BeamSearchParams(
|
||||
length_penalty: float = 1.0
|
||||
include_stop_str_in_output: bool = False
|
||||
structured_outputs: StructuredOutputsParams | None = None
|
||||
skip_special_tokens: bool = True
|
||||
|
||||
def __post_init__(self) -> None:
|
||||
_verify_num_sequences(self.beam_width, "beam_width")
|
||||
|
||||
Reference in New Issue
Block a user