[bug] MTP continues generating past EOS token #54
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When MTP speculative decoding is active, the model sometimes generates past its EOS token, producing hallucinated content (e.g. user turn markers or tool calls) after the response should have ended.
Partial fix in commit
9a0d599(stop-token guard for accepted draft tokens). Safety net added in stable/pre-q4kv commitb124ccf.Acceptance criteria:
Merged via PR #60 (squash). Fix: trim stop token from output_token_ids on 3 early-return finish paths. Verified with Qwen3.6-27B-MXFP4-MTP: 5/5 prompts clean (was 4/5 leaking <|im_end|>).