mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
[Feature] bad words support v1 scheduler and specifiy token ids (#3608)
* support bad_words_token_ids * docs * fix test * fix * bad words support kvcache v1 and token ids * fix
This commit is contained in:
@@ -153,6 +153,9 @@ include_stop_str_in_output: Optional[bool] = False
|
||||
bad_words: Optional[List[str]] = None
|
||||
# 禁止生成的词汇列表(例如敏感词),模型会避免输出这些词(默认 None 表示不限制)。
|
||||
|
||||
bad_words_token_ids: Optional[List[int]] = None
|
||||
# 禁止生成的token id列表,模型会避免输出这些词(默认 None 表示不限制)。
|
||||
|
||||
repetition_penalty: Optional[float] = None
|
||||
# 重复惩罚系数,降低已生成 token 的重复概率(>1.0 抑制重复,<1.0 鼓励重复,默认 None 表示禁用)。
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user