[Bug fix] Fix pd for x1 thinking (#4433)

This commit is contained in:
chenjian
2025-10-16 12:03:45 +08:00
committed by GitHub
parent 8e392f0ea6
commit 670aaa3f83
5 changed files with 14 additions and 8 deletions
@@ -216,10 +216,7 @@ def post_process_normal(
model_output.reasoning_index,
)
stop_wo_think = (
(sampler_output.sampled_token_ids == model_output.eos_token_id.T).any(axis=1, keepdim=True)
| (model_output.reasoning_index == 0)
) & (model_output.need_think_end > 0)
stop_wo_think = ((model_output.reasoning_index == 0)) & (model_output.need_think_end > 0)
stop_wo_think = stop_wo_think & thinking_mask
sampler_output.sampled_token_ids = paddle.where(