mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
Fix wrong batch size of thinking_mask (#4296)
Co-authored-by: K11OntheBoat <“ruianmaidanglao@163.com”> Co-authored-by: xiegegege <46314656+xiegegege@users.noreply.github.com>
This commit is contained in:
@@ -196,7 +196,7 @@ def post_process_normal(
|
||||
"""Post-processing steps after completing a single token generation."""
|
||||
# handle vl:
|
||||
if model_output.think_end_id != -1:
|
||||
thinking_mask = model_output.enable_thinking
|
||||
thinking_mask = model_output.enable_thinking[: sampler_output.sampled_token_ids.shape[0]]
|
||||
exists_think_end = (sampler_output.sampled_token_ids == model_output.think_end_id) & thinking_mask
|
||||
paddle.assign(
|
||||
paddle.where(
|
||||
|
||||
Reference in New Issue
Block a user