[bug] Tool response token leakage (#17 reopen) #56
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?
Issue #17 was about tool response tokens leaking into output. Check if this is still reproducible on current main, especially with MTP enabled (which generates tokens in pairs and may miss multi-token stop sequences).
Acceptance criteria:
PR #60 (issue #54) fixes the <|im_end|> leak. The structural token leak (user markers) from MTP heads is a separate issue. Needs server-level testing with tool calling to reproduce and fix. The 4B mxfp4 test model is broken (produces token 0). Cannot verify without a working MTP model at smaller size.
Merged via squash (PR #63). Root cause:
_mtp_stepbypassed_get_output_parser_session(), so Harmony models had no channel-aware token filtering during MTP generation. Fix: route all MTP token emission through parser session with 3 extracted helpers. 81/82 scheduler tests pass (1 pre-existing failure on boundary snapshots).