mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2482] STRATA_ROUTE_TAIL_SKIP=7 vs 0 on an RTX 5080 16 GB (0.1.44, UD-IQ4_XS, 352K real conversation): +6% warm decode, prefill unchanged; the decode hit rate excludes skipped experts #1012
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#1012
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 @enkynakamura on GitHub (Oct 14, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2482
Setup
--kv int8,--rope-scaling yarn --rope-scale 3 --max-context 786432,--expert-cache auto(2401 slots, 5.40 GiB),--vram-reserve-mib 1420,--spec 5 --spec-min-p 0.8,--suffix-draft 0,--pcie-frac 0.33,--resident-budget-gib 55STRATA_IQ_MT_MIN=1 STRATA_IQ_GATHER=1 STRATA_IQ_PREFETCH=4096 STRATA_STAGER_THREADS=8 STRATA_PREFILL_CPU_SHARE=0STRATA_ROUTE_TAIL_SKIP:0vs unset (the engine logsSTRATA_ROUTE_TAIL_SKIP=7 is ON (default)).1. Fixed-token benchmark: 352,130-token real conversation, temperature 0, 512 tokens
A conversation exported from Jan (the desktop chat app, jan.ai, which I use as the OpenAI-compatible client for Strata): 109 messages, Italian, code, tool calls, plus a fixed question; fresh engine, one cold read, then runs that reuse the 352,123-token prefix (decode only). All numbers below are from the engine's own
strata serve: prompt ...lines.2. Real chat use (Jan desktop app as client, temperature 1, long answers)
Requests with more than 4K output tokens, from the same logs:
Same context (224K): 60.7 vs 58.1 (+4.5%) with lower draft acceptance on the skip side. Content differs between requests, so this is only consistent with section 1, not a measurement of its own.
3. The decode hit rate is not comparable between the two settings
In
decode expert cache hit rate: X% (hits / lookups); N more read ... (Y% of all R routed), theroutedtotal is a multiple of 480 in 129 of 129 request lines withTAIL_SKIP=0, and in 0 of 16 lines withTAIL_SKIP=7. My reading (not checked in the code) is that skipped experts are dropped from bothlookupsandrouted. The hit rate then rises because the denominator shrinks, not because the cache serves more experts. On the 352K benchmark it reads 63-66% with the skip and 56-58% without.This matters whenever hit rates are compared across settings (as in the original #2441 report). Reporting skipped experts in the same line (or computing the hit rate over all routed experts) would make them comparable.
4. Output quality (anecdotal)
Two paired generations at temperature 1 (same prompt, one per arm): a ~477K-context conversation summary checked number by number against the conversation, and a 4-part test (two exact-answer math questions, a look-ahead bug in a pandas z-score, and a hardware question with no available data), judged blind. I saw no degradation in either pair. This only rules out an obvious problem, not a small one.
Summary
On a 16 GB card at 200-350K context, the default
TAIL_SKIP=7gave roughly +4-9% decode in use and +6% on the fixed-token run, with no visible quality loss. I am keeping it on. Happy to run more A/B on this machine if useful, for example several no-skip warm runs within one session, or other ranks.@mmhorda commented on GitHub (Oct 15, 2026):
I zlready pointed out in an an another issue.
The quality loss maybe not visible to you, but it is defenitelly mesurable.
@qiuzan2001 commented on GitHub (Oct 15, 2026):
Another data point for the same A/B (
STRATA_ROUTE_TAIL_SKIP=0against the default 7), on a 16 GB Blackwell card under Linux: here the default is +31% short decode and +37% decode after a 6K prompt, prompt speed unchanged.Machine: RTX 5070 Ti 16 GB (PCIe 4.0 x16), Ryzen 7 5800X3D (AVX2, no AVX-512), 80 GiB DDR4-3200, Ubuntu 26.04, driver 595.99.02, CUDA 13.1. Strata 0.1.44.1 source build (
296b59d2), Swift 1.5 IQ3_S, setup's settings at 262,144 tokens (int8 KV, 32,768 cells resident,--spec 4 --spec-min-p 0.5, MTP), 3,838 experts in VRAM. The arms differ only in the environment variable (the default arm logsSTRATA_ROUTE_TAIL_SKIP=7 is ON (default)).Method: a fresh server per arm and round, 4 rounds in the order AB, BA, AB, BA, one discarded warm-up per start; each round eight different short prompts and one 6,345-token prompt, 256 new tokens each, greedy, thinking off. "Pooled" = sum of the engine's
predicted_n/ sum ofpredicted_msover the eight short answers.Draft acceptance was about the same (4,760 of 6,870 with the skip, 4,873 of 7,118 without), and 2 of the 36 answer pairs are byte-identical, as expected since the skip changes answers. Like your table, I left the decode hit-rate lines out: they are not comparable between the two settings. Not tested: a 352K-token real conversation like yours, warm-prefix runs, other ranks (8, 9), or other model sizes.
@enkynakamura commented on GitHub (Oct 15, 2026):
Follow-up with a teacher-forced measurement in my regime (same machine and config as the first post), since the quality question came up.
Method.
STRATA_LOGPOS+STRATA_LOGPOS_TOPK=64, through the verify windows: the 352,068-token conversation is read batched, then a fixed message (two model-written summaries, Italian, numbers and file names) is read through the windows: 7,548 forced tokens including the assistant header (--short-read 16384, cut there with"strata_prefix": {"messages": 109}), one request per fresh engine, temperature 0. Arms: A =STRATA_ROUTE_TAIL_SKIP=0, B = default (7). KL is computed on P's top-64 ids (98.7% of P's mass), both sides renormalised there, so it approximates the full-vocabulary KL.Determinism. Same config and same expert-cache size gives byte-identical logpos files (B3 = B4, 7,548 lines,
cmpequal). One A session (A4) started with ~150 MiB less free VRAM, and--expert-cache autogave 2,306 slots instead of 2,401 (only 1267 MiB free once the slots are written; shrinking the expert cache). That pair therefore shows the size of the cache/CPU rounding change, not run-to-run noise.Reading.
Side note for anyone chasing reproducibility: with
--expert-cache auto, the slot count, and therefore the bits of the answer, depends on how much VRAM other programs hold when the engine starts.Scripts and per-token metrics attached (kl-2482.zip). The raw logpos files are not: their token ids would reproduce the private conversation. Not done: other ranks (8, 9), the full-vocabulary KL, other contexts, other cards.
Next: a paired exact-answer reasoning test (HMMT, temperature 0, fixed cache size) in the same 352K regime, to see whether the different distribution changes task accuracy.
kl-2482.zip
@enkynakamura commented on GitHub (Oct 15, 2026):
Second follow-up: does the different distribution change task accuracy? A paired exact-answer test in the same regime.
Question. The teacher-forced numbers above say that
TAIL_SKIP=7moves the distribution (KL 0.167, one top-1 in ten differs). That alone does not say whether the model reasons worse or only differently, so here is a task check.Method.
hmmt_feb_2026(answers checked against the dataset).\boxed{}" line), then the same conversation as above (353,465 tokens together with the system prompt), then one problem."strata_prefix"pins the checkpoint after the conversation, so each problem resumes from it (cache_n353,465) and only its own tokens are new.max_tokens16,384, problems in the same order in both arms.STRATA_ROUTE_TAIL_SKIP=0, B = default (=7 is ONin the log). Identical config otherwise, with the expert cache set to a fixed size so that both arms get the same one (--expert-cache 2401, which this pack turns into 2,496 slots / 5.62 GiB; withautothe size depends on free VRAM at start, see the note above).Score.
The two hand corrections are both in B:
\sqrt[3]{1-\frac{\sqrt{6}}{3}}, which is exactly(3+\sqrt{6})^{-1/3}(the cubes are equal; sympy agrees to 30 digits). A grading artefact: the grader cannot compare those forms.\boxed{}. A formatting miss by the model, not a wrong result; it counts against B under strict grading.Where the arms disagree (on substance): 2 problems each way.
On the strict automatic grading it is 3 vs 1 (P1 moves to "only A"). Exact McNemar test: p = 0.63 on 3 vs 1, p = 1 on 2 vs 2. No detectable change in accuracy on this set.
SAME ANSWERS, DIFFERENT REASONING. None of the 33 answer pairs is textually identical. Of the 25 problems where both arms gave a boxed answer, 23 have the same answer (the two exceptions: P17, both wrong with different values, and P18). This matches the teacher-forced measurement: the token-level path changes, the outcome mostly does not.
Speed and length.
One B answer (P9) ran into a repetition loop ("999…") until the limit. A also failed P9, stopping withSee the update below.finish=lengthat 7,606 tokens and no content, which I have not looked into. One case each, so it says nothing either way.Limits. 33 problems only show a large effect; a small accuracy change cannot be excluded. One run per arm: earlier runs of this setup were byte-identical for a given config (B3 = B4 above), but that was not re-checked for these generations. The cache was larger than my daily one (2,496 vs 2,401 slots), so the skip may have had fewer misses to act on than in daily use; by how much was not measured.
Summary. In this regime the default skip changes how the model gets there (distribution and wording) but, on HMMT, not whether it gets there: 23 vs 23 on substance, 2 vs 2 on the problems where the arms disagree, with ~11% faster decode. I am keeping it on.
Per-problem table attached (hmmt-2482.csv): answers, grading, tokens, finish reason and speed for both arms.
hmmt-2482.csv
Update on P9. I looked into it: both arms failed it the same way. The model started writing the value as a decimal and repeated one digit until the server's #606 guard (256 identical tokens in a row) ended the reply as
finish=length. A was still in the thinking ("50.000…", 7,606 tokens, no answer), B was in the answer ("49.999…", 13,185 tokens). Both end with exactly 255 identical digits, which matches the guard dropping the 256th token before it is detokenized (the guard's console message was not kept, so this is from the output and the code). Same failure in both arms, not a skip effect.Update 2: determinism and speed noise. I re-ran arm B from a fresh engine start (same config and 2,496 slots, three and a half hours later, with other engine work in between). All 33 replies are byte-identical to the first B run (answer, thinking, token count, drafts accepted), and so are the engine's per-request counters (hit rate, lookups, VRAM exchanges, file reads). So the determinism that Limits calls not re-checked is now checked, and every textual difference between A and B comes from the skip, not from run-to-run noise.
Decode speed did not repeat as exactly: the rerun was slower on 33 of 33 problems, by a median of 1.7%, 10-14% on P1-P6 and 1-2% from P17 on. The engine did the same work both times, so the cause is outside it; I have not identified it. Against A, the rerun gives a median per-problem ratio of 1.08 (faster on 25 of 33) instead of 1.11, and 49.0 min total wall time vs 47.4. So the skip's decode gain on this set is 8-11% depending on which B run is used, and per-problem speed differences up to ~14% can be run-to-run.
@qiuzan2001 commented on GitHub (Oct 16, 2026):
On the method side, for A/Bs like this one, in case it is useful: I have been computing a noise floor per PC from pairs of profile runs with the same settings, and judging each change against it. On an RTX 5070 Ti + 5800X3D (Swift 1.5 IQ3_S) the floor came out at 3.3 % for short chats, 3.0 % for a 32K context and 14.6 % for agent turns (3K to 15K tokens of context), so your +6 % warm decode would be outside the chat floor here, and a 5 % change on agent turns inside it; for the agent turns a sign test over the six turns (6 of 6 in one direction, p = 0.031) is what separates a real small change from the spread. The tool that does this from
tools/strata_profile.pyreports is Strata Profile Studio (Compare view: per workload, per turn, with the settings that differ highlighted). It is not tested on Windows on hardware yet;python3 studio.py --host-probesays what it can read on a given PC.@enkynakamura commented on GitHub (Oct 16, 2026):
Thanks, I tried it, with the engine session as the unit: on this PC the rerun of HMMT arm B (Update 2 above) did identical work in a whole session that was slower, so pairs of requests inside one session would miss that kind of shift.
Setup. 8 fresh server starts in the order A B B A A B B A (the scheme of Strata's
tools/ab_engine.py: one server per arm and round, arms alternating). A =STRATA_ROUTE_TAIL_SKIP=0, B = default (7); same config otherwise (0.1.44, UD-IQ4_XS, a fixed--expert-cachethat gives 2,496 slots as in the HMMT runs, so the slot count does not follow free VRAM). Each session: ab_engine's warm-up and short set (3 chat prompts and the 6,000-word prompt, 256 tokens, greedy, thinking off), then the 352K conversation of the first post (one cold read, then 3 warm 512-token runs on the cached prefix). All 8 sessions logged 2,496 slots, the skip line only in B, and exactly the script's 8 requests on the server's counter.Floor = the largest difference between two sessions with the same settings (your definition, without the 3% minimum; with it, no result below changes side). Effect = B median vs A median. p = exact permutation test over the 8 sessions; with 4 per arm the smallest possible two-sided p is 2/70 = 0.029.
Every decode metric: all 4 B sessions above all 4 A sessions, outside the floor. Prompt reading: inside the floor, as expected for a skip that acts only in verify windows.
Notes:
--expert-cache auto(2,401 slots), one or two sessions per arm and no short set before the conversation; I can't say which of these differences matters. This run is the better-controlled one.Per-request numbers attached ( ab-floor-2482.csv )
Profile Studio: I did not use it, because it reads reports from
tools/strata_profile.py, which I don't find in 0.1.44 or intools/on main. Is it in a PR?@qiuzan2001 commented on GitHub (Oct 16, 2026):
Thank you for the session-level run. Eight fresh server starts in A B B A order, with every decode metric of all four B sessions above all four A sessions and outside the floor, is a cleaner test than pairs of requests inside one session. The Studio's noise floor is also built from whole runs (each profile run is one server session), so a shift between sessions shows up there as noise, as in your rerun; it has no A B B A mode of its own.
On the tool: you are right,
tools/strata_profile.pyis in PR #2660 and not in 0.1.44. Studio 0.1.1 no longer needs it from Strata: it carries a copy of the tool and runs it itself against the running server, with Strata'stools/folder for the shared parts (--strata-root <Strata folder>when the run config is not inside it). The release: https://github.com/qiuzan2001/strata-profile-studio/releases/tag/v0.1.1.@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.