mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #5293] [Engine] dflash2: opt-in boot-time rejection test for the draft confidence (STRATA_DF2_BOOT_PROBE) #5373
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#5373
Loading…
Add table
Add a link
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/5293
Author: @yeyeyeason
Created: 11/5/2026
Status: 🔄 Open
Base:
main← Head:engine/dflash2-boot-probe📝 Commits (1)
3cf88f6[Engine] dflash2: opt-in boot-time rejection test for the draft confidence (STRATA_DF2_BOOT_PROBE)📊 Changes
1 file changed (+159 additions, -7 deletions)
View changed files
📝
src/program/generate.cpp(+159 -7)📄 Description
Problem and result
Implements the agreed revision-3 design from #5271: an opt-in boot-time rejection test for DFlash2's draft confidence (
STRATA_DF2_BOOT_PROBE), the "(b) boot-time rejection test" that the direction vote selected - a start-time check that can reject the estimator's gross--draft-conferrors before the first real request, validated by the replay method of #5275.Result: on the author's 2x 4060 Ti, five fresh boots produce five complete decisions, all "keep" (the box's estimator value is within noise of its neighbor - exactly the case the design says not to touch), with the C0-C0 drift band measuring 3.9-6.4% per boot.
Related discussion: #5271 (design sign-off on revision 2, revision 3 carries the agreed changes), #5275 (the replay method and the acceptance-inversion evidence the threshold's provenance comes from), #5129 / #5213 / #5252 / #5178 (the wrong-static-pick reports this guards against).
Approach
Four synthetic requests queued through the full serve machinery before the loop takes real lines (the server sends nothing until it saw READY): a discarded 128-token warm-up at the same window width as the measured arms, then a C0-C1-C0 sandwich at the conf in force and its CONF_STEPS neighbor. Each arm runs a different counting prompt (count from 1 / 101 / 201 / 301: same shape, no shared cache warming - same-prompt arms were measured warming monotonically from 51.7 to 112.8 tok/s by position alone, which the sandwich cannot absorb). Probe arms emit no protocol lines (T/PP/RESUME/REUSED/DONE gated by
probe_active; the numbers are read at the DONE-side hook instead). The decision: adopt C1 only when it beats both C0 arms on ms/token by more thanmax(8% floor, this boot's C0-C0 gap); one rejection step, no loop. An arm ending below 48 tokens is invalid (greedy continuations differ per conf and boot) - the probe reports inconclusive and keeps the default. The engine cannot distinguish a person's--draft-conffrom the server estimator's, so the env var is the whole opt-in; the pin check stays a server-layer concern (#5178's shape).Gated entirely behind
STRATA_DF2_BOOT_PROBE=on; default off; the default path is byte-identical - every changed line sits behindprobe_activeor the env check. ~160 lines in one file (src/program/generate.cpp), no new files, per the design's implementation surface.Validation
Passed:
ffa80d73+ this change; the diff compiles and links clean).E:\Strata-dev-data\reports\probe-determinism-20261105\(raw boot lines + results.json on the author box; can be attached).Failed: none in the final round.
Not run:
Limits
--pipeline-windowsruns keep MTP silently (the gate proved live on #5271's thread); the probe simply does not run there because DFlash2 is not active.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.