mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
[Logprobs]Support prompt_logprobs and max_logprobs (#4897)
* add prompt logprobs * trigger ci * fix unitest * Update fastdeploy/config.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update fastdeploy/entrypoints/llm.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update fastdeploy/engine/sampling_params.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update tests/engine/test_sampling_params.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update tests/engine/test_sampling_params.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * fix max_logprobs --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -227,8 +227,8 @@ class ModelConfig:
|
||||
self.think_end_id = args.get("think_end_id", -1)
|
||||
self.im_patch_id = args.get("image_patch_id", -1)
|
||||
self.line_break_id = args.get("line_break_id", -1)
|
||||
if self.max_logprobs == -1 and hasattr(self, "vocab_size"):
|
||||
self.max_logprobs = self.vocab_size
|
||||
if self.max_logprobs < -1:
|
||||
raise ValueError(" The possible values for max_logprobs can't be less than -1 ")
|
||||
|
||||
self._post_init()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user