Repository navigation
tools: device check that drafted output equals plain under seeded sampling - #5249
Merged
Merged
Conversation
ashhart
force-pushed
the
lead/draft-parity-check
branch
2 times, most recently
from
November 27, 2026 10:05
a83201f to
2d02c16
Compare
This was referenced Nov 27, 2026
ashhart
force-pushed
the
lead/draft-parity-check
branch
from
November 27, 2026 13:00
2d02c16 to
859d860
Compare
ashhart
added a commit
that referenced
this pull request
Nov 27, 2026
ashhart
added a commit
that referenced
this pull request
Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drafts must never change output. Until now nothing checked that on a device under sampling, and #5223 showed the gap: a checkpoint without MTP weights starts with no drafts, so a drafted run can pass while testing nothing.
tools/draft_parity.pystarts the same native server binary twice on one local checkpoint, first with its default drafts and then with--no-drafts, and sends identical requests: two prompts (or your own via--prompts), seeds 0, 1 and 1234 at temperature 1.0 / top_p 0.95, plus a greedy cell each. Generated token-id arrays must match exactly. The check refuses to report a pass when the drafted run accepted no drafts, and--require-mtpalso requires the startup MTP label.report.jsonand the exit status are the result: 0 pass, 1 a divergence, 2 setup or evidence problems. It binds loopback only and prints no local paths or names.A registered entry exists (
zig build device-draft-parity -- MODEL --binary BIN --output DIR), pluszig build test-draft-parity-hostfor the comparison and refusal logic, with startup and request timeout regressions. Engine code is untouched.First use, on an M3 Ultra with
TensorFold/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-MLX-4bitatd9d758fb(MTP + copies, about 1,100 of 1,700 drafted tokens accepted): current main passes every cell, including a German summary prompt. That is evidence for #5223 on that chip only, not a fix.