mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
[BugFix] qwen2.5vl enable_thinking=true bug fix (#3920)
This commit is contained in:
@@ -249,6 +249,16 @@ class QwenVLProcessor(TextProcessor):
|
||||
# Handle continuation of previous generation by appending existing tokens
|
||||
if metadata and metadata.get("generated_token_ids"):
|
||||
self.append_generated_tokens(outputs, metadata["generated_token_ids"])
|
||||
|
||||
enable_thinking = False
|
||||
if metadata:
|
||||
enable_thinking = metadata.get("enable_thinking", False)
|
||||
|
||||
if request.get("chat_template_kwargs"):
|
||||
chat_template_kwargs = request.get("chat_template_kwargs")
|
||||
enable_thinking = chat_template_kwargs.get("enable_thinking", False)
|
||||
request["enable_thinking"] = enable_thinking
|
||||
|
||||
outputs = self.pack_outputs(outputs)
|
||||
|
||||
request["prompt_token_ids"] = outputs["input_ids"].tolist()
|
||||
|
||||
Reference in New Issue
Block a user