[GH-ISSUE #5136] [Engine] Route tail skip is on by default and changes answers; the switch is not in the Advanced table #2405

Open
opened 2026-11-04 01:59:01 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @HelloItMeMort on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5136

Area: Engine. The last section is a Terminal finding (strata_cli, strata_control) and can be split into a [TUI] issue if one-problem-per-thread is preferred.

Summary

STRATA_ROUTE_TAIL_SKIP is enabled at rank 7 by default on CUDA builds and on HIP gfx1200/gfx1201. An expert that is not resident and that every token of a verify window routes at rank 7 or lower is neither copied nor computed: its row is zeroed and the survivors keep the router's weights, without renormalisation (src/core/expert_source.cpp:4941-4944, 5163-5166). The text the server returns is therefore not the text the same engine returns with the switch off, on the same weights, with the same seed.

Answer changes are answer changes. A default that changes what the model says is not a tuning choice to be debated on speed: a serving default must not alter output unless the user asks for it. AGENTS.md states that standard — "A new feature is opt-in, and the default path stays byte-identical to the last release" — and CONTRIBUTING.md repeats it. The off switch exists (=0), so the behaviour is understood to be separable; it is still what every user gets without asking for it.

The finding is about the code, not about one machine: it is a source-level property of the serve start-up, and it holds across the configurations listed below.

Why it is wrong

  • The skip keys on live cache state. It fires only for experts that are non-resident at dispatch (expert_source.cpp:4958 reads d.host_res[...] >= 0 and does not skip a resident expert), and residency is the GPU expert cache, which the adaptive swaps move during the run (generate.cpp:12216-12217, --adapt-every / --adapt-swaps). The same prompt with the same seed can therefore differ at two points in one server's lifetime, and differs between machines with different VRAM or cache size.
  • Which family was installed decides it. setup.py:4107-4108 writes STRATA_ROUTE_TAIL_SKIP=0 into the run config for Unsloth packs outside the RAM-budget mode and writes nothing for any other family.
  • The engine already concedes the dependency. The switch is disabled for batched slots because "a window then mixes requests, and one request's skip would depend on another's tokens" (generate.cpp:12171-12172). That is treated as a correctness problem in --batch and as a default everywhere else.
  • The repository treats =0 as the behaviour of record. tools/quant_quality.py:40 pins it off in FIXED_ENV, so the quality yardstick will not measure with the default on; bench/results/2026-10-20-0.2.1-idle-gpu/README.md:45 and bench/results/2026-10-12-p40-sm61-kernels/README.md:154 require off before two builds' answers can be compared; setup itself opts the largest installed group of CUDA configs out. #2482 and #2523 are both runs of =7 against =0, i.e. the community already treats the rank as the user's choice.
  • The sibling knobs are handled the opposite way. STRATA_KVA and STRATA_ROUTE_PRIOR also change answers, and both ship off with a plain-words warning — "Off by default: answers about long documents can miss or mix up details" (strata_control/speed_switches.py:38-43). Route tail skip ships on, unnamed and undescribed. Nothing technical separates them.
  • The opt-in shape is already in the codebase. When the skip was found to move NVFP4 answers, that case was made opt-in and now prints STRATA_ROUTE_TAIL_SKIP=7 turns it on (generate.cpp:12203-12204, docs/NVFP4.md:68-69). This asks for the same treatment where it was never examined.

Additionally, no papers have been authored on the potential effects of skipping tails. This feature should have never been implemented without proper neural network architecture experience.

How the default is applied

Read from commit ffa80d73133ea5c548aefe57889a16e8085a938f (2026-11-02), Strata 0.2.10, engine 0.1.56. generate.cpp:12168-12215 resolves the default at serve start-up and calls set_tail_skip_rank(7) at :12209. The engine's own convention is unset-means-off (expert_source.cpp:4848-4863, unset gives 0); the serve start-up is the single place that overrides it.

The default 7 applies when all of the following hold (generate.cpp:12198-12201):

Condition Source
STRATA_ROUTE_TAIL_SKIP is unset generate.cpp:12174
not every expert is resident in VRAM generate.cpp:12166-12167
under 90% of experts are in the GPU cache — 60% on a HIP layer split — moved by STRATA_TAIL_SKIP_MAX_CACHED generate.cpp:12179-12190
--batch is 0 generate.cpp:12198
CUDA, or HIP on gfx1200/gfx1201 (decode_defaults_arch_ok()) generate.cpp:2400-2409
no peer tier or helper GPU generate.cpp:12199
no NVFP4 expert in the pack generate.cpp:12193-12201

docs/DETAILS.md:1049 files the switch under "On by default", and its own row ends with "Answers differ slightly from a run without it."

The switch cannot be reached from the product

It is an environment key, so it is not in the engine's --help, and the Terminal's Advanced table builds its rows from exactly three sources (strata_cli/launch/params.py:171-201): parsed --help (parse_help, :99-120, which accepts only lines beginning with --), the tuner's arms (env_params, :122-133, from tune_knobs.ARMS) and the speed switches (switch_params, :136-142, from speed_switches.SWITCHES). The key is in none of them:

speed_switches env names: DS4_ATTN_SLAB, DS4_COPY_HUGETLB, DS4_COPY_PIN, DS4_DEFAULTS, DS4_FAST_ATTN,
                          DS4_STORE_PUT, DS4_STORE_SPARE, STRATA_DEFAULTS, STRATA_KVA,
                          STRATA_PCIE_FRAC_DEFAULT, STRATA_ROUTE_PRIOR
tune_knobs ARMS env:      STRATA_PIN_BY_NEED

So the value the server is actually running has no row, and the only route is "+ Add a setting by name…", labelled "for flags of newer engine versions" (strata_cli/launch/screens.py:1318). What that returns:

name:        STRATA_ROUTE_TAIL_SKIP
default:     off        <- the server is running rank 7
yours:       0
description: (not in this engine's list: newer flag or a typing mistake)
known:       False      <- rendered in the error colour, screens.py:1316

The one screen meant to show what a launch does tells the user the setting is off and that the correct name is a typo. check_name (params.py:203-210) returns early unless the name begins with --, so environment keys get no "did you mean" help at all while mistyped flags do.

Expected vs actual

Expected: strata launch with nothing set computes every expert the router selected, and its answer is the answer the same engine gives with STRATA_ROUTE_TAIL_SKIP=0. Answers do not depend on cache occupancy or on the installed family. The Advanced table lists the setting, its real default and what it does to answers.

Actual: the server runs the skip at rank 7 unless the user finds an environment variable the product never showed them, and the answers differ from the same build with the switch off. The setting is absent from the Advanced table; typed correctly, it is labelled a newer flag or a typing mistake and its default column reads off.

Reproduce

The interface half, in a source checkout, with no GPU:

python -c "import sys; sys.path.insert(0,'.'); from strata_cli.launch import params as P; \
h='usage: strata serve\n  --kv <q4_0|k8v4>  KV cache (default: q4_0)\n\n'; \
[print(vars(r)) for r in P.build_rows(h,[],None,{},{},{'STRATA_ROUTE_TAIL_SKIP':'0'})]"

The engine half is the start-up strings at generate.cpp:12203-12214 and the counter at generate.cpp:19062-19064; a server on a covered card that never set the variable prints

strata serve: STRATA_ROUTE_TAIL_SKIP=7 is ON (default): a missed expert that every token of a verify window routes at rank 7 or lower is skipped
strata serve: route tail skip: <n> missed experts skipped (<m> entries) since the start

What must change

  1. Unset means 0: tail_default_ok is false when the environment does not name the switch, so strata launch serves the weights as given. The opt-in is untouched — =7 (1-9) still turns it on and prints the existing line. Nobody loses speed for not asking.
  2. Any answer-changing default prints which state the server runs in, on every backend, including the plain-off case, which is currently silent.
  3. Any answer-changing default has a row in the Advanced table and in the app's Expert settings, saying in plain words what it does to answers. Concretely: add STRATA_ROUTE_TAIL_SKIP to speed_switches.SWITCHES or tune_knobs.ARMS, and judge a name unknown only when it begins with --, so environment keys the engine honours are not reported as typos.
  4. docs/DETAILS.md:1049 moves out of "On by default", and docs/QUANTS.md:158 says the setting is opt-in.

Per-launch opt-in through a serve flag is an acceptable shape. A silent default is not.

Reproduction status

  • Reproduced locally (source checkout, no GPU): the Advanced-table behaviour above, plus the key's absence from speed_switches.env_names() and tune_knobs.ARMS, plus the two switch sentences quoted from strata_control/speed_switches.py.
  • Unconfirmed static analysis: the start-up default (generate.cpp:12168-12215) and the skip path (expert_source.cpp:4941-4944, 5163-5166), read from source at ffa80d73. The two log lines above confirm them on hardware; no engine was run for this report.
  • Not run: GPU execution, a before/after answer comparison, any timing. No speed claim is made in either direction.

This concerns the default only. =7 stays available and unchanged for anyone who wants the speed; the question is who decides — the user, or the launch. SYCL and Metal are out of scope: neither tree contains the switch.

Same class, already open here: #4402 (STRATA_ROUTE_PRIOR default-on for ≤13 GiB cards, repetition loops) and #5000 (asks for the routing choice to be logged at start-up and for a per-VRAM default). #1884 is the V100 report that produced the current 90% carve-out. #2482 and #2523 measured =7 against =0 as a user choice. Searching ROUTE_TAIL_SKIP and "tail skip" in the tracker found no open issue asking about the default itself, which is why this is a new thread rather than a comment on those.

Originally created by @HelloItMeMort on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5136 **Area:** Engine. The last section is a Terminal finding (`strata_cli`, `strata_control`) and can be split into a `[TUI]` issue if one-problem-per-thread is preferred. ## Summary `STRATA_ROUTE_TAIL_SKIP` is enabled at rank 7 by default on CUDA builds and on HIP gfx1200/gfx1201. An expert that is not resident and that every token of a verify window routes at rank 7 or lower is neither copied nor computed: its row is zeroed and the survivors keep the router's weights, without renormalisation (`src/core/expert_source.cpp:4941-4944, 5163-5166`). The text the server returns is therefore not the text the same engine returns with the switch off, on the same weights, with the same seed. Answer changes are answer changes. A default that changes what the model says is not a tuning choice to be debated on speed: a serving default must not alter output unless the user asks for it. `AGENTS.md` states that standard — *"A new feature is opt-in, and the default path stays byte-identical to the last release"* — and `CONTRIBUTING.md` repeats it. The off switch exists (`=0`), so the behaviour is understood to be separable; it is still what every user gets without asking for it. The finding is about the code, not about one machine: it is a source-level property of the serve start-up, and it holds across the configurations listed below. ## Why it is wrong - **The skip keys on live cache state.** It fires only for experts that are non-resident at dispatch (`expert_source.cpp:4958` reads `d.host_res[...] >= 0` and does not skip a resident expert), and residency is the GPU expert cache, which the adaptive swaps move during the run (`generate.cpp:12216-12217`, `--adapt-every` / `--adapt-swaps`). The same prompt with the same seed can therefore differ at two points in one server's lifetime, and differs between machines with different VRAM or cache size. - **Which family was installed decides it.** `setup.py:4107-4108` writes `STRATA_ROUTE_TAIL_SKIP=0` into the run config for Unsloth packs outside the RAM-budget mode and writes nothing for any other family. - **The engine already concedes the dependency.** The switch is disabled for batched slots because *"a window then mixes requests, and one request's skip would depend on another's tokens"* (`generate.cpp:12171-12172`). That is treated as a correctness problem in `--batch` and as a default everywhere else. - **The repository treats `=0` as the behaviour of record.** `tools/quant_quality.py:40` pins it off in `FIXED_ENV`, so the quality yardstick will not measure with the default on; `bench/results/2026-10-20-0.2.1-idle-gpu/README.md:45` and `bench/results/2026-10-12-p40-sm61-kernels/README.md:154` require off before two builds' answers can be compared; setup itself opts the largest installed group of CUDA configs out. #2482 and #2523 are both runs of `=7` against `=0`, i.e. the community already treats the rank as the user's choice. - **The sibling knobs are handled the opposite way.** `STRATA_KVA` and `STRATA_ROUTE_PRIOR` also change answers, and both ship off with a plain-words warning — *"Off by default: answers about long documents can miss or mix up details"* (`strata_control/speed_switches.py:38-43`). Route tail skip ships on, unnamed and undescribed. Nothing technical separates them. - **The opt-in shape is already in the codebase.** When the skip was found to move NVFP4 answers, that case was made opt-in and now prints `STRATA_ROUTE_TAIL_SKIP=7 turns it on` (`generate.cpp:12203-12204`, `docs/NVFP4.md:68-69`). This asks for the same treatment where it was never examined. Additionally, no papers have been authored on the potential effects of skipping tails. This feature should have never been implemented without proper neural network architecture experience. ## How the default is applied Read from commit `ffa80d73133ea5c548aefe57889a16e8085a938f` (2026-11-02), Strata 0.2.10, engine 0.1.56. `generate.cpp:12168-12215` resolves the default at serve start-up and calls `set_tail_skip_rank(7)` at `:12209`. The engine's own convention is unset-means-off (`expert_source.cpp:4848-4863`, unset gives 0); the serve start-up is the single place that overrides it. The default 7 applies when all of the following hold (`generate.cpp:12198-12201`): | Condition | Source | | --- | --- | | `STRATA_ROUTE_TAIL_SKIP` is unset | `generate.cpp:12174` | | not every expert is resident in VRAM | `generate.cpp:12166-12167` | | under 90% of experts are in the GPU cache — 60% on a HIP layer split — moved by `STRATA_TAIL_SKIP_MAX_CACHED` | `generate.cpp:12179-12190` | | `--batch` is 0 | `generate.cpp:12198` | | CUDA, or HIP on gfx1200/gfx1201 (`decode_defaults_arch_ok()`) | `generate.cpp:2400-2409` | | no peer tier or helper GPU | `generate.cpp:12199` | | no NVFP4 expert in the pack | `generate.cpp:12193-12201` | `docs/DETAILS.md:1049` files the switch under **"On by default"**, and its own row ends with *"Answers differ slightly from a run without it."* ## The switch cannot be reached from the product It is an environment key, so it is not in the engine's `--help`, and the Terminal's Advanced table builds its rows from exactly three sources (`strata_cli/launch/params.py:171-201`): parsed `--help` (`parse_help`, `:99-120`, which accepts only lines beginning with `--`), the tuner's arms (`env_params`, `:122-133`, from `tune_knobs.ARMS`) and the speed switches (`switch_params`, `:136-142`, from `speed_switches.SWITCHES`). The key is in none of them: ```text speed_switches env names: DS4_ATTN_SLAB, DS4_COPY_HUGETLB, DS4_COPY_PIN, DS4_DEFAULTS, DS4_FAST_ATTN, DS4_STORE_PUT, DS4_STORE_SPARE, STRATA_DEFAULTS, STRATA_KVA, STRATA_PCIE_FRAC_DEFAULT, STRATA_ROUTE_PRIOR tune_knobs ARMS env: STRATA_PIN_BY_NEED ``` So the value the server is actually running has no row, and the only route is "+ Add a setting by name…", labelled *"for flags of newer engine versions"* (`strata_cli/launch/screens.py:1318`). What that returns: ```text name: STRATA_ROUTE_TAIL_SKIP default: off <- the server is running rank 7 yours: 0 description: (not in this engine's list: newer flag or a typing mistake) known: False <- rendered in the error colour, screens.py:1316 ``` The one screen meant to show what a launch does tells the user the setting is off and that the correct name is a typo. `check_name` (`params.py:203-210`) returns early unless the name begins with `--`, so environment keys get no "did you mean" help at all while mistyped flags do. ## Expected vs actual **Expected:** `strata launch` with nothing set computes every expert the router selected, and its answer is the answer the same engine gives with `STRATA_ROUTE_TAIL_SKIP=0`. Answers do not depend on cache occupancy or on the installed family. The Advanced table lists the setting, its real default and what it does to answers. **Actual:** the server runs the skip at rank 7 unless the user finds an environment variable the product never showed them, and the answers differ from the same build with the switch off. The setting is absent from the Advanced table; typed correctly, it is labelled a newer flag or a typing mistake and its default column reads `off`. ## Reproduce The interface half, in a source checkout, with no GPU: ```sh python -c "import sys; sys.path.insert(0,'.'); from strata_cli.launch import params as P; \ h='usage: strata serve\n --kv <q4_0|k8v4> KV cache (default: q4_0)\n\n'; \ [print(vars(r)) for r in P.build_rows(h,[],None,{},{},{'STRATA_ROUTE_TAIL_SKIP':'0'})]" ``` The engine half is the start-up strings at `generate.cpp:12203-12214` and the counter at `generate.cpp:19062-19064`; a server on a covered card that never set the variable prints ```text strata serve: STRATA_ROUTE_TAIL_SKIP=7 is ON (default): a missed expert that every token of a verify window routes at rank 7 or lower is skipped strata serve: route tail skip: <n> missed experts skipped (<m> entries) since the start ``` ## What must change 1. Unset means 0: `tail_default_ok` is false when the environment does not name the switch, so `strata launch` serves the weights as given. The opt-in is untouched — `=7` (1-9) still turns it on and prints the existing line. Nobody loses speed for not asking. 2. Any answer-changing default prints which state the server runs in, on every backend, including the plain-off case, which is currently silent. 3. Any answer-changing default has a row in the Advanced table and in the app's Expert settings, saying in plain words what it does to answers. Concretely: add `STRATA_ROUTE_TAIL_SKIP` to `speed_switches.SWITCHES` or `tune_knobs.ARMS`, and judge a name unknown only when it begins with `--`, so environment keys the engine honours are not reported as typos. 4. `docs/DETAILS.md:1049` moves out of "On by default", and `docs/QUANTS.md:158` says the setting is opt-in. Per-launch opt-in through a serve flag is an acceptable shape. A silent default is not. ## Reproduction status - **Reproduced locally** (source checkout, no GPU): the Advanced-table behaviour above, plus the key's absence from `speed_switches.env_names()` and `tune_knobs.ARMS`, plus the two switch sentences quoted from `strata_control/speed_switches.py`. - **Unconfirmed static analysis:** the start-up default (`generate.cpp:12168-12215`) and the skip path (`expert_source.cpp:4941-4944, 5163-5166`), read from source at `ffa80d73`. The two log lines above confirm them on hardware; no engine was run for this report. - **Not run:** GPU execution, a before/after answer comparison, any timing. No speed claim is made in either direction. ## Limits and related work This concerns the default only. `=7` stays available and unchanged for anyone who wants the speed; the question is who decides — the user, or the launch. SYCL and Metal are out of scope: neither tree contains the switch. Same class, already open here: #4402 (`STRATA_ROUTE_PRIOR` default-on for ≤13 GiB cards, repetition loops) and #5000 (asks for the routing choice to be logged at start-up and for a per-VRAM default). #1884 is the V100 report that produced the current 90% carve-out. #2482 and #2523 measured `=7` against `=0` as a user choice. Searching `ROUTE_TAIL_SKIP` and "tail skip" in the tracker found no open issue asking about the default itself, which is why this is a new thread rather than a comment on those.
Author
Owner

@HelloItMeMort commented on GitHub (Nov 3, 2026):

This, among many other "features" that sacrifice quality for speed, is why I'm using Infernix. But not everyone has a Blackwell/50-series card, so it's unfortunate that the most popular alternative has many silent defaults that affect quality without informing the user.

<!-- gh-comment-id:6610209310 --> @HelloItMeMort commented on GitHub (Nov 3, 2026): This, among many other "features" that sacrifice quality for speed, is why I'm using Infernix. But not everyone has a Blackwell/50-series card, so it's unfortunate that the most popular alternative has many silent defaults that affect quality without informing the user.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2405
No description provided.