mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1419] [CLOSED] bench: replay token IDs and verified windows in serve decode #3442
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#3442
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/1419
Author: @imanu86
Created: 10/7/2026
Status: ❌ Closed
Base:
main← Head:pr/forced-bench📝 Commits (3)
398bc08OPUS-SPLIT-Forza i token generati da una lista (STRATA_FORCE_IDS) nei cicli seriale e in pipeline7954908OPUS-SPLIT-Conta solo sulle righe verificate le scelte del target sostituite dai token forzati4780a0cOPUS-SPLIT-Rigioca le finestre di una traccia di riferimento (STRATA_FORCE_WINDOWS)📊 Changes
1 file changed (+161 additions, -1 deletions)
View changed files
📝
src/program/generate.cpp(+161 -1)📄 Description
This adds opt-in forced-token and verified-window replay controls to the serial and pipelined GEN/GENI serve loops. They are laboratory tools for comparing a fixed continuation when ordinary greedy runs diverge because of arithmetic or expert-placement differences. They do not assess generated-text quality.
STRATA_FORCE_IDS=<file>[;<file>...]: request k uses file k's token IDs, replacing target picks and limitingmax_newto the list length. Files may contain little-endian int32 values or a decimal text list. Requests beyond the file list are not forced.STRATA_FORCE_TRACE=<file>: appendW <request> <position> <rows> <accepted> <row tokens...>for each verified window.STRATA_FORCE_WINDOWS=<file>: replay matching window rows from a reference trace. A match needs the same position and first token and must fit the current window capacity. The drafter still runs. Speculative windows that do not match retain their normal path.strata work:summary reports window widths, accepted/offered drafts, emitted tokens, replaced target picks on verified rows, and replay hits/misses.Scope and interpretation:
The default path keeps normal token selection, but it does gain accounting and the stderr summary. This is not a claim of zero overhead. Equal forced output, window histograms and accepted counts help control the verified workload; they do not prove identical expert residency, cache adaptation, PLE stalls, speculative rollbacks, allocations or overlapping work. Timings still need matched conditions and repeated comparisons. Forced output cannot be used as a correctness or model-quality pass.
These hooks cover the GEN/GENI serial and pipeline loops in this change; no concurrent batch-slot replay or standalone CLI replay coverage is claimed. Inputs are intended to be trusted, validated laboratory fixtures. The current parser has permissive fallback/skip behavior for missing or malformed data; stricter fail-closed fixture validation is a review item, not an implemented guarantee.
Validation:
pr/forced-bench, head4780a0cd6bd33b944243c0862255a2f2c0393232, three commits over82f46a8c8f475f001ad76d92f58f4a4f8ffb0253.git diff --check 82f46a8..HEADpasses.1:191 2:116 3:68 4:146and1:254 2:175 3:75 4:95 5:1. These are evidence of exercised hooks in the fork, not fresh validation of this exact PR head.Suggested replay procedure:
The trace is append-only: use a new path or intentionally cleared file when recording a reference. Inspect the work counters and the rest of the runtime state before interpreting a timing difference.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.