Repository navigation
Certify one grammar candidate for eligible greedy sampling - #2519
Merged
Merged
Conversation
leehack
marked this pull request as ready for review
December 1, 2026 04:54
Contributor
|
Chat app preview removed for |
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.
Summary
topK. The chain keeps the requestedtopKand the existing sampler order.Changelog
Production-readiness scope
temp <= 0and typical sampling, XTC and dynamic temperature disabled.topK1–64.Completeness checklist
PR type guidance
topKcertificate or skipped the wrapper altogether. Tests verify the wrapper argument and the following native sampler.Test Plan
On the current head, the 28 grammar routing unit rows, focused formatting, root analysis and the platform-boundary check passed on macOS arm64. The two new rows at
temp: 0.01andtemp: 0.1both failed the audit mutationtemp <= 0→temp < 0.5by receiving wrapper K=1 instead of K=40.The checklist below preserves local validation from the original implementation head
29dfcd364f. Current-head CI and independent review are tracked separately.dart run tool/prepare_workspace.dartpython3 tool/ci/check_format.py,dart analyzeanddart run tool/testing/check_platform_boundaries.dartdart test -p vm -j 1 --exclude-tags local-only --coverage=coverage(16,795 passed, 136 skipped)coverage-liblocal row (93.85% line coverage, 70% required)Matrix Evidence
Broad local test and model results below are from
29dfcd364f. The current-head delta is one test-only commit and a clean merge ofmain. The sampler implementation is byte-identical to the audited version.static-format-analyzeroot-vmroot-chromecoverage-libstructured-output-adversarialdocs-sitehigh-risk-exact-head-independent-qaModel SHA-256
0a2fac16f388b4839f075dedb681357aec3e73a96bd66b413e462b6853550c99. On four warm K=40 comparisons, wrapper sampling took 1.09–1.26 ms/token and the full mask took 20.34–22.50 ms/token. K=1 with the wrapper took 1.07–1.12 ms/token.Review Notes
29dfcd364f. The current head adds two unit rows and mergesmain. The pinned llama.cpp runtime installs a no-op named?top-kfor K=0 andtop-kfor positive K. The real unit chain verifies that both occupy the slot immediately after grammar.0a336e14b1a775420f1e1ea053fbe1e66f0d1762.High-risk regression review
backendRuntime)29dfcd364f. Current-head review is pending.0a336e14b1a775420f1e1ea053fbe1e66f0d1762/e168d24e016deb51aa64a5f933200061ad42da62.temp < 0.5mutation now fails both near-zero positive-temperature rows.typicalP: 0.9at K=40 and K=0xtcProbability: 0.5dynatempRange: 0.5temp: 0.8temp: 0.01andtemp: 0.1