[XPU]add enable_logprob (#5279)

* [XPU]Update document

* [XPU]Update documentation

* [XPU]add enable_logprob

* Fix code style issues

* “doc”

* “docs”

* “doc”

* Fix code style via pre-commit

---------

Co-authored-by: root <root@gajl-bbc-onlinec-com-1498354.gajl.baidu.com>
This commit is contained in:
qw86972190
2025-12-02 15:32:28 +08:00
committed by GitHub
parent c563eca791
commit 6048ea37bd
7 changed files with 315 additions and 14 deletions

View File

@@ -503,8 +503,8 @@ class EngineArgs:
# if self.dynamic_load_weight:
# self.enable_prefix_caching = False
if self.enable_logprob:
if not current_platform.is_cuda():
raise NotImplementedError("Only CUDA platform supports logprob.")
if not current_platform.is_cuda() and not current_platform.is_xpu():
raise NotImplementedError("Only CUDA and XPU platforms support logprob.")
if self.speculative_config is not None and self.logprobs_mode.startswith("processed"):
raise NotImplementedError("processed_logprobs not support in speculative.")
if self.speculative_config is not None and self.max_logprobs == -1: