mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5502] [Benchmark] thorough tuning sweeps 16 arms of ~60 documented knobs — measured wins exist outside its surface #5473
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#5473
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?
Originally created by @gdevenyi on GitHub (Nov 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5502
Problem
strata launch --tune thoroughplans its candidates from a fixed list: 16 startup arms + 3 per-request knobs, filtered by machine class,BOUNDSandNEVER(strata_control/tune_knobs.py, control 0.1.57 — static analysis, trivially checkable). The engine anddocs/DETAILS.mddocument roughly 60 runtime knobs with measured effects. Several documented, previously-measured knobs are structurally unreachable by the tuner:STRATA_ROUTE_TAIL_SKIPis never swept. Setup writes=0whenever the experts fit in RAM, and no arm ever tries 7 against it — yet 0.1.42's own history measured +10–24% decode with it on, KL-checked.STRATA_HC_UPMIX,STRATA_DEQUANT_WIDE,STRATA_ATTN_DAILY,STRATA_QSA_ROWS,STRATA_QSA_SPLIT_ATTN,STRATA_SPEC_PROB, …) are never benchmarked per machine, even though the project's history shows per-arch sets paying 2–18% (#3659, #5459 pattern).--ple-io(ram/mmap/direct) is chosen by a static RAM rule, never measured per machine. It is the single largest RAM lever in the engine (~28.8 GB table) and can be speed-neutral.q4_0/k8v4are classed "quality", so a speed-goal tune never reports their trade to a user who would accept it.--pool-coreswith a fixed CPU list is not inNEVER, and it cost 26–29% decode on both of my machines — nothing warns a user who sets it by hand.Net effect: a user who runs thorough tuning on a RAM-rich machine gets "your defaults are already the fastest" while double-digit wins sit outside the tuner's surface. That is the exact result I got on two machines.
Environment
Evidence (my own runs; paired candidate/baseline boots interleaved on the same day, 3 pairs per confirmed number, geometric mean of decode/code-gen/4K/30K-prefill tok/s; ~150 boots per machine; per-run JSONL retained; the harness drives the same
serve.server+ engine stack the tuner uses)STRATA_HC_UPMIX=1+--ple-io direct)--ple-io directvsram(alone)STRATA_DEQUANT_WIDE=1--pool-coresfixed list--pool-tasks 6--kv q4_0For contrast, thorough tuning on machine A the same day returned
default_confirmedwith 6.3% run-to-run spread — every win in the table above was outside what it examined. Full per-metric tables and both confirm runs are in the JSONL logs; happy to attach sanitized copies.Proposed behavior (opt-in; the default path stays byte-identical)
ramvsmmapvsdirect(+ the row-cache/inflight variant), since the current choice is a static RAM check, not a measurement.NEVERrows for--pool-coresfixed lists and small--pool-taskson many-core CPUs, with the measured reason.--tune-allow-quality) that sweeps quality-classed knobs (kv q4_0/k8v4) and reports the documented perplexity trade alongside the speed result, instead of hiding them from a speed-goal tune.Tradeoffs
Thorough runtime roughly doubles with the families above (more restarts); the existing paired-machinery in
autotune.pyalready handles the noise problem, which is real (6–8% household spread on both machines). Quality arms must never fire without the explicit flag. Arch-gating needs the samefactsmechanismcondition_holdsalready uses.Limits / not tested
q4_0and tail-skip: the numbers I cite for quality are the project docs' and 0.1.42 history's, not mine; I measured speed and answer-changing status only.Reproduction status: reproduced on both machines listed above.
Related: #5136 (tail-skip switch visibility), #5232 (
strata tuneUX), #3659 / #5459 (per-arch switch-set scope agreements — the same pattern this proposal would extend into the tuner).