[GH-ISSUE #3327] [Engine] the same build is not run-to-run identical at temperature 0 on long answers (RTX 4090) - how should an end-to-end bit-identity check be done? #1348

Closed
opened 2026-11-04 01:50:33 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @Dmitry-B on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3327

Observation, not a bug claim: on this machine the generated text of the same binary and the same
configuration
differs between starts, so an end-to-end comparison of two builds by their answers cannot
demonstrate (or refute) "bit-identical". Release notes and community reports use that phrase as a gate for
new switches, and we cannot measure it on a live server here. We would like to know what the intended
end-to-end check is, since the repository's parity harnesses are kernel-level.

Problem

One build, one config, fixed prompts, temperature: 0, chat_template_kwargs.enable_thinking: false, the
learned expert profile pinned to an identical copy for every start: 2 of 6 prompts come back identical
when the server is started twice.

Environment

Strata e88ee39d (0.2.0-beta, engine 0.1.45.3, engine/BUILD.json src hash 25c992dfc5c6cb06), built
from source on the machine (CUDA arch [89]). Ubuntu 26.04.1, kernel 7.0.0-38, NVIDIA 615.71.09,
CUDA 13.4, RTX 4090 24 GB, Ryzen 9 7950X, 46 GiB RAM. Model: Flash-Next IQ3_XXS, 204,800-token context,
INT8 KV, packed experts, --expert-cache auto --prefill auto --spec 4 --mtp --pool-workers 10,
--pcie-frac 0.00.

Reproduce

python identity-gate.py --arm def --arm def --rounds 2 --long-words 1500

What the script does (it starts its own server per arm, like tools/ab_engine.py, port 8090, the
production service stopped): builds the config from the working one, removes --expert-profile-save and
--expert-profile-save-every, and copies --expert-profile to a fresh identical copy for every start, so
no arm inherits routing state from a previous one. Then one warm-up request and the same six requests per
arm, in the same order: the three short prompts of tools/ab_engine.py, one arithmetic question, one
short code task, and ab_engine.long_prompt(1500). SHA-256 of the returned text is compared. (Script is
mine, not from the repository; the prompts are the repository's own fixtures.)

Actual (first two rounds of the control arm, one build)

prompt start 1 start 2 identical
short chat 0 (merge two sorted lists) len 894 len 894 yes
arithmetic (one number) len 3 len 3 yes
short code task (Fibonacci) len 690 len 738 no, first difference at char 1
short chat 1 (refrigerator) len 1417 len 1420 no
short chat 2 (ten tips) len 1121 len 1137 no
long (summarize a word list) len 640 len 768 no

The differences are not truncations: they start inside the first sentence or two and then the texts
diverge ("…consisting of coils both inside and outside the appliance…" vs "…consisting of an evaporator
coil inside the fridge and…"). With two switch arms measured against the same baseline the counts land in
the same range as the control (5 of 12 and 6 of 12 comparisons matching, control 4 of 12), so on this
machine nothing can be said about whether a switch changes the output.

Short, strongly constrained answers (one number, a short deterministic function) do reproduce; anything
longer than a couple of sentences does not.

What is ruled out

Not the saved expert profile: with --expert-profile-save/--expert-profile-save-every removed and the
loaded profile replaced by a fresh byte-identical copy for every start, the divergence stays. (With the
working configuration, where the profile is rewritten during the run, 4 of 7 prompts differed - so the
profile makes it worse, it is not the cause.) Not the prompt text and not the sampling parameters: they
are fixed, greedy, thinking off.

What was not tested

Which part of the pipeline is non-reproducible. Plausible candidates, named as hypotheses only: the
adaptive expert tier computing the same expert on the host and on the GPU in different runs (different
floating-point paths, near-ties flip), the speculative/MTP verification path, kernels that reduce with
atomics.

Question

The repository demonstrates bit-identity with kernel- and feature-level harnesses
(src/kernels/cpu/*_parity.cpp, src/kernels/bf16_gemv_parity.cpp, bench/micro/fusions_parity.cu,
tools/conversation_cache_parity.py, tools/split_mtp_batch_parity.py) and evidence files such as
bench/results/2026-10-12-p40-sm61-kernels/dequant-wide-parity.txt. Is there an intended end-to-end
way to show it on a running server - a set of switches that makes serving reproducible (a fixed expert
tier, no adaptive overlap), a reference server configuration used for such claims, or a tool that compares
logits/tokens rather than text? With that, we can attach this kind of evidence to our own reports; without
it, on this hardware an answer-based gate measures the machine, not the change.

Reproduction status

Reproduced locally: the control arm was run twice as separate server starts at the same commit, and the
same divergence appears for two other arms and across rounds of the same arm (six starts in total, three
configurations).

Originally created by @Dmitry-B on GitHub (Oct 20, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/3327 Observation, not a bug claim: on this machine the generated text of the **same binary and the same configuration** differs between starts, so an end-to-end comparison of two builds by their answers cannot demonstrate (or refute) "bit-identical". Release notes and community reports use that phrase as a gate for new switches, and we cannot measure it on a live server here. We would like to know what the intended end-to-end check is, since the repository's parity harnesses are kernel-level. ## Problem One build, one config, fixed prompts, `temperature: 0`, `chat_template_kwargs.enable_thinking: false`, the learned expert profile pinned to an identical copy for every start: 2 of 6 prompts come back identical when the server is started twice. ## Environment Strata `e88ee39d` (0.2.0-beta, engine 0.1.45.3, `engine/BUILD.json` src hash `25c992dfc5c6cb06`), built from source on the machine (CUDA arch `[89]`). Ubuntu 26.04.1, kernel 7.0.0-38, NVIDIA 615.71.09, CUDA 13.4, RTX 4090 24 GB, Ryzen 9 7950X, 46 GiB RAM. Model: Flash-Next IQ3_XXS, 204,800-token context, INT8 KV, packed experts, `--expert-cache auto --prefill auto --spec 4 --mtp --pool-workers 10`, `--pcie-frac 0.00`. ## Reproduce ```bash python identity-gate.py --arm def --arm def --rounds 2 --long-words 1500 ``` What the script does (it starts its own server per arm, like `tools/ab_engine.py`, port 8090, the production service stopped): builds the config from the working one, removes `--expert-profile-save` and `--expert-profile-save-every`, and copies `--expert-profile` to a fresh identical copy for every start, so no arm inherits routing state from a previous one. Then one warm-up request and the same six requests per arm, in the same order: the three short prompts of `tools/ab_engine.py`, one arithmetic question, one short code task, and `ab_engine.long_prompt(1500)`. SHA-256 of the returned text is compared. (Script is mine, not from the repository; the prompts are the repository's own fixtures.) ## Actual (first two rounds of the control arm, one build) | prompt | start 1 | start 2 | identical | |---|---|---|---| | short chat 0 (merge two sorted lists) | len 894 | len 894 | yes | | arithmetic (one number) | len 3 | len 3 | yes | | short code task (Fibonacci) | len 690 | len 738 | no, first difference at char 1 | | short chat 1 (refrigerator) | len 1417 | len 1420 | no | | short chat 2 (ten tips) | len 1121 | len 1137 | no | | long (summarize a word list) | len 640 | len 768 | no | The differences are not truncations: they start inside the first sentence or two and then the texts diverge ("…consisting of coils both inside and outside the appliance…" vs "…consisting of an evaporator coil inside the fridge and…"). With two switch arms measured against the same baseline the counts land in the same range as the control (5 of 12 and 6 of 12 comparisons matching, control 4 of 12), so on this machine nothing can be said about whether a switch changes the output. Short, strongly constrained answers (one number, a short deterministic function) do reproduce; anything longer than a couple of sentences does not. ## What is ruled out Not the saved expert profile: with `--expert-profile-save`/`--expert-profile-save-every` removed and the loaded profile replaced by a fresh byte-identical copy for every start, the divergence stays. (With the working configuration, where the profile is rewritten during the run, 4 of 7 prompts differed - so the profile makes it worse, it is not the cause.) Not the prompt text and not the sampling parameters: they are fixed, greedy, thinking off. ## What was not tested Which part of the pipeline is non-reproducible. Plausible candidates, named as hypotheses only: the adaptive expert tier computing the same expert on the host and on the GPU in different runs (different floating-point paths, near-ties flip), the speculative/MTP verification path, kernels that reduce with atomics. ## Question The repository demonstrates bit-identity with kernel- and feature-level harnesses (`src/kernels/cpu/*_parity.cpp`, `src/kernels/bf16_gemv_parity.cpp`, `bench/micro/fusions_parity.cu`, `tools/conversation_cache_parity.py`, `tools/split_mtp_batch_parity.py`) and evidence files such as `bench/results/2026-10-12-p40-sm61-kernels/dequant-wide-parity.txt`. Is there an intended **end-to-end** way to show it on a running server - a set of switches that makes serving reproducible (a fixed expert tier, no adaptive overlap), a reference server configuration used for such claims, or a tool that compares logits/tokens rather than text? With that, we can attach this kind of evidence to our own reports; without it, on this hardware an answer-based gate measures the machine, not the change. ## Reproduction status Reproduced locally: the control arm was run twice as separate server starts at the same commit, and the same divergence appears for two other arms and across rounds of the same arm (six starts in total, three configurations).
Author
Owner

@Niko1221 commented on GitHub (Oct 26, 2026):

Your finding is right: with the IQ packs the CPU rounds one-token and multi-token groups differently, so two starts can end in different but equally good answers. 0.2.6 documents the settings for byte-identical runs in docs/DETAILS.md (Reproducible output): STRATA_IQ_MT_MIN=1 and, in the engine args, --prompt-cache 0 --adapt-swaps 0 --pcie-frac 0. Please repeat your two-start test with those; --adapt-swaps 0 is the one missing from your config. If the six prompts are still not identical, tell us the first prompt that differs and we will look for another source. For our own gates we compare with fixed expert-cache slots (the identity gate uses --expert-cache 1500) so the resident set does not depend on VRAM.

<!-- gh-comment-id:6423257780 --> @Niko1221 commented on GitHub (Oct 26, 2026): Your finding is right: with the IQ packs the CPU rounds one-token and multi-token groups differently, so two starts can end in different but equally good answers. 0.2.6 documents the settings for byte-identical runs in docs/DETAILS.md (Reproducible output): STRATA_IQ_MT_MIN=1 and, in the engine args, --prompt-cache 0 --adapt-swaps 0 --pcie-frac 0. Please repeat your two-start test with those; --adapt-swaps 0 is the one missing from your config. If the six prompts are still not identical, tell us the first prompt that differs and we will look for another source. For our own gates we compare with fixed expert-cache slots (the identity gate uses --expert-cache 1500) so the resident set does not depend on VRAM.
Author
Owner

@Dmitry-B commented on GitHub (Oct 26, 2026):

Re-ran the two-start test with the settings from docs/DETAILS.md ("Reproducible output") — they work.

We repeated the two-start test with those settings on the same machine and the same build: 23 pairs (46 server starts). Your diagnosis is right, and one part of our original report here was wrong. Below: the numbers, the first prompt that differs, which switch is load-bearing, what the settings cost, the correction, two questions, and the limits of these runs.

1. What was run

One pair = two independent server starts of the same build and the same config (the script starts its own
serve/server.py on a second local port, 8090, with the production service stopped, the way
tools/ab_engine.py does), the
same fixed corpus sent to both starts, greedy sampling (temperature: 0,
chat_template_kwargs.enable_thinking: false, as in tools/ab_engine.py), 256 new tokens per request, and
SHA-256 over the whole returned text. 23 pairs = 46 starts in six sessions, run from 23:08 to 01:10 on
the machine's local clock over the night of 2026-10-26 to 2026-10-27; the session headings below are those
local times, and the log file names carry the same stamps.

Build, unchanged during all sessions (checked after the last one): engine 0.1.51, source build on this
machine, BUILD.json src id a88a598cd60d6ee1, engine/strata md5 cdf8aae7d3baa13bb1e274f8006384a8.
Strata v0.2.6, commit 4b9e05a2a806a3fe24f7b2560d98626c37dade35. So every comparison below is one build
against itself.

Hardware: RTX 4090 24 GB (23,028 MiB, sm_89), Ryzen 9 7950X, 47,579,476 kB RAM, Ubuntu 26.04.1, driver
615.71.09, CUDA 13.4. Model Qwen3.8-Flash-Next IQ3_XXS (…-GSQ-RCO-IQ3_XXS-00001/00002-of-00002.gguf,
native pack, --kv int8, --resident-experts, --spec 4 --mtp <draft directory: dense.bin md5 a16efaf4…, draft_vocab.bin md5 18b68403…> --spec-min-p 0.50, --prefill auto → chunk 8192 with a 96-slot ring,
--pool-workers 10, --max-context 204800, --vision, draft_vocab: cyrillic, reasoning_effort: low
(overridden per request), experimental speed projection on: --control-vector-scaled <projection gguf>:1.0 --control-vector-layer-range 4 44 --cvec-mode project --cvec-dir per-layer, and STRATA_PF_FUSED=1.

Frozen state for every start: the learned expert profile is not written (expert_profile_save and
expert_profile_save_every are removed from the config, not only the flags — see §6) and --expert-profile
points to a fresh copy of data/expert-profile.bin (md5 ff1bc6544d3f2f0013e3e376632d33a8) made per start,
which the engine confirms (profile /tmp/ident_…).

Three arms, so that each part of your set is isolated. Everything else is identical in all three, including
--pcie-frac 0.00, which our working config already carries — it is shared, not one of the isolated
variables. What each arm adds on top of that shared configuration:

arm added on top of the shared configuration env
your set --expert-cache 1500 --prompt-cache 0 --adapt-swaps 0 STRATA_IQ_MT_MIN=1
MT only --expert-cache 1500 STRATA_IQ_MT_MIN=1
slots only --expert-cache 1500 —

The fixed-slot part of the gate is in effect in every start: the engine logs expert cache 1980 slots, 3.25 GiB of VRAM in all 46 starts, no other value. For contrast, our working config with --expert-cache auto picked between 3,014 and 7,874 slots in the starts recorded in its own log — which is exactly the
dependency you wanted removed. The slots only and MT only arms really do run with the adaptive tier and
the prompt cache active (adaptive swaps exchange them with the GPU cache (no file reads) in their engine
logs); in the your set arm the same line reads adaptive swaps off.

2. Result

arm pairs pairs where the two starts differed request checks differing checks
your set 5 0 32 0
MT only (STRATA_IQ_MT_MIN=1) 6 0 36 0
slots only (--expert-cache 1500) 12 6 (50 %) 76 24

Per session, so the counts can be checked against the logs:

time your set MT only slots only
23:08 1 pair, all 6 hashes equal — 1 pair — 4 of 6 requests differ
23:17 — 1 pair, identical —
23:42 1 pair, identical 1 pair, identical 1 pair, identical
23:58 — 2 pairs, identical 4 pairs — 1 differs (2 requests)
00:32 2 pairs, identical 2 pairs, identical 4 pairs — 2 differ (4 requests each)
01:00 (prompt path, §4) 1 pair, identical — 2 pairs — both differ (5 requests each)

3. The first prompt that differs (you asked for this)

Corpus order and what happened in the slots only arm over 12 pairs. Labels 0-2 and long are the
fixtures from tools/ab_engine.py; arithmetic, code and the two pp… requests are ours. Prompt token
counts are the engine's own usage.prompt_tokens.

label prompt prompt tokens differed
chat0 "Write a Python function that merges two sorted lists…" (ab_engine 0) 34 0 / 12
chat1 "Explain in two paragraphs how a refrigerator moves heat…" (ab_engine 1) 27 5 / 12
chat2 "List ten practical tips for learning a new language…" (ab_engine 2) 29 5 / 12
arithmetic our own: a one-line arithmetic question answered with a single number 31 0 / 12
code our own: in Russian, "write a Python function returning the n-th Fibonacci number in linear time, plus one test" 39 6 / 12
long ab_engine.long_prompt(1500) 1623 6 / 12
pp1500w long_prompt(1500) with the answer capped at 24 tokens 1623 0 / 2
pp6000w long_prompt(6000) with the answer capped at 24 tokens 6345 2 / 2

In five of the six flipped pairs the first differing prompt in corpus order is chat1; in the sixth it is
code. Nothing differs in the your set or MT only arms, in any pair, on any of these prompts.

An answer that is just a number never differed: the same SHA-256 in all 52 recorded starts of this prompt —
46 here (all three arms) plus the 6 from our October run in this issue.

4. Prompt path: our first version of the test did not test it at all

Our earlier corpus stopped at a 1623-token prompt, i.e. one chunk (the working chunk is 8192), so the
exact_pp half of your gate was untouched. Added pp1500w and pp6000w, same fixture, short answers so
that the prompt path is what is being compared:

long_prompt(1500), 24-token answer long_prompt(1500), 256-token answer long_prompt(6000) = 6345 tokens, 24-token answer
slots only 2 pairs, identical 2 pairs, both differ 2 pairs, both differ (921d0f63… vs 0d84853…)
your set 1 pair, identical 1 pair, identical 1 pair, identical

6345 tokens is still one chunk, so this is not a chunk-boundary effect; it is the prompt path at a length we
had not tried. The same prompt with a short answer is stable at 1623 tokens and flips at 6345. With a long
answer the same 1623-token prompt already flips through decode. Two consequences for anyone measuring here:
a flip rate read off a short-prompt corpus is a floor, and "short answers reproduce, longer ones do not" was
too simple — it depends on prompt length and answer length, and both thresholds are below what we now know
flip.

5. Which switch is load-bearing on this machine

--expert-cache 1500 alone is necessary and not sufficient: two starts of the same build with the resident
set fixed still differ in 6 of 12 pairs. With STRATA_IQ_MT_MIN=1 added, 6 of 6 pairs identical — including
the arm where the adaptive tier and the prompt cache are running. That matches your diagnosis and the code:
src/kernels/cpu/native_expert.cpp:432 reads STRATA_IQ_MT_MIN with a default of 2, and at 1 the CPU path
takes the multi-token kernel for a single token too (native_expert.cpp:280, whose comment says the choice
"can depend on how many drafts a verify window held"; the same effect is what docs/DETAILS.md:317
describes as "uses the multi-token kernels for every group, so the answer no longer depends on drafting").
With --spec 4 --mtp the verify window is not the same size run to run, and these runs do read the RAM expert
tier (expert tiers: GPU 47,996 hits this request; since the start RAM 57,732 blobs in one of them), so the
default path can compare two different roundings depending on how the drafts landed. That is the mechanism
your answer describes; what our runs establish is the effect, not the exact kernel path — with --resident- experts most expert work is on the GPU, and we have not traced which of the CPU kernels these particular
requests reach.

We are not claiming --prompt-cache 0 and --adapt-swaps 0 are unnecessary. Every pair here is a cold
start: nothing is carried between requests, and the state those two flags protect is exactly the state this
test never creates. They are also what stops the engine from writing the profile between runs (§6), so
inside a session they do work we did not measure.

6. A correction to what we wrote in this issue

We wrote that the saved expert profile is ruled out, because we removed --expert-profile-save /
--expert-profile-save-every and re-copied the loaded profile per start. That was wrong for our configs.
The save is configured there by the config keys expert_profile_save / expert_profile_save_every, and
learned_profile_args() in serve/server.py (#477) both appends --expert-profile-save to the engine args
and, when the learned profile's shape matches, replaces the load path with the learned file
(args[i] = save). So our October control started each run from a profile the previous run had written, and
part of what that run measured was carry-over, not engine nondeterminism. (That control's engine log was
overwritten, so the October run cannot be reconstructed character by character; this statement is from the
code and the config structure, and the mechanism was active.)

Your advice does stop the writing — the engine's own start message says saving needs the adaptive tier
("--expert-profile-save needs the adaptive tier (--adapt-every and --adapt-swaps above 0) … nothing will
be saved"). But the load path stays redirected to whatever earlier runs wrote. A config that carries
expert_profile_save runs any gate on its learned profile, not on the --expert-profile file it names. Our
three arms run on the static profile, which is the routing state the numbers above describe. One sentence in
the "Reproducible output" paragraph would save the next person this: removing the flag from the arguments
does not take the profile out of the comparison.

7. What your set costs here (decode tok/s)

One client, a fixed expository request (in Russian: "write a coherent ~300-word note on how a heat pump
works and why it is more efficient than an electric heater"), 300 new tokens, thinking off, temperature 0,
three runs per config, two independent probe sessions (the second one also covers the MT-only config, which
the first session did not include). Individual runs and medians, not just the best one; the first run of each
config is always lower (cold caches), which is why the median is used.

config probe A, 23:30-23:34 probe B, 23:42 median of the two
working (--expert-cache auto) 94.18 / 116.52 / 117.21 → 116.52 110.60 / 123.01 / 129.15 → 123.01 119.8 (×1.00)
1500 slots, nothing else 73.08 / 86.53 / 86.04 → 86.04 70.32 / 78.97 / 81.34 → 78.97 82.5 (×0.69)
1500 slots + STRATA_IQ_MT_MIN=1 72.39 / 83.20 / 81.16 → 81.16 63.32 / 83.02 / 82.93 → 82.93 82.0 (×0.69)
your whole set 61.66 / 62.06 / 61.67 → 61.67 60.27 / 63.60 / 65.23 → 63.60 62.6 (×0.52)

STRATA_IQ_MT_MIN by itself could not be measured: −5.7 % in one session, +5.0 % in the other, with the
same config otherwise. That is inside our own probe's band, so the honest statement is that no cost was
measurable — consistent with the −1…−3 % in DETAILS.md, not with a measured number. What does cost: the
small fixed expert cache (×0.69) and --prompt-cache 0 (×0.76 on top of that, ×0.52 overall).
--pcie-frac 0 is not in this delta because our working config already carries it.

The band itself, which our earlier speed numbers did not state: the median of the same config moved by
+5.6 % (working), −8.2 % (1500 slots), +2.2 % (MT only) and +3.1 % (your set) between the two sessions.
Within one session, individual runs scatter more — up to −19 % on the first run after engine start.

8. Two questions

  1. --expert-cache 1500 reports expert cache 1980 slots, 3.25 GiB of VRAM in every start. The number is
    stable, so the gate works, but 1500 is not what an outside reporter sees in a log. Is 1500 counted in
    blobs, or rounded up by the engine? If the identity gate names a fixed flag, it would help to name the
    log line a reporter should see, so "the gate is in effect" can be told apart from "the engine overrode
    me". Related: none of the reproducibility switches (STRATA_IQ_MT_MIN, --prompt-cache 0,
    --adapt-swaps 0) is echoed in the engine's start log — only the parity tools print them
    (src/kernels/cpu/iq_avx2_parity.cpp:558). Echoing them once at start would make community "bit-identical"
    claims checkable by anyone.
  2. What is the complete fixed setting vector a report has to match before "bit-identical to version X"
    means the same thing as your gate? Our configs carry three answer-changing things your paragraph does not
    name: STRATA_PF_FUSED=1 — for the native packs this is env-only opt-in (src/prefill/moe_fused.cu:690,
    requested(); without the env, enabled() at 679 and the comment at 678 leave only the dense/Q2_0
    kernels on) — the experimental speed projection (--cvec-mode project --cvec-dir per-layer, layers 4-44),
    and draft_vocab: cyrillic plus the locally prepared MTP draft. They are identical across all our starts,
    so they do not affect the cross-start result, but they do mean our "identical" is identical for this
    configuration
    , not a reproduction of your gate.

9. Limits of these runs

  • Cold starts only. No conversation cache, no resumed turn, no adaptive tier that has been running for a
    while — the state --prompt-cache 0 and --adapt-swaps 0 protect. The repository already has tools for
    that half (tools/conversation_cache_parity.py, conversation_cache_isolation.py); we did not run them.
  • 6 prompts (8 in the prompt-path session), not your ten, and no exact_pp 4K/20K at 20K
    (docs/DETAILS.md:1054); answers capped at 256 / 24 tokens.
  • Text compared, not token ids or logits — a drift that never reaches the emitted text is invisible here.
  • One model, one quantization (IQ3_XXS), one machine; no IQ3_S / Q2_0, no --batch, no CPU-only path.
  • Speed measured with our own probe (one client, 300 tokens), not with strata bench run or
    tools/strata_bench.py: comparable inside this report, not comparable with other reports.
  • If your gate means exactly 1500 resident slots, we measured a slightly different gate (§8.1).
  • And the half that matters most for your own claims is still ahead: this verifies that one build reproduces
    itself between starts, not that two builds are bit-identical to each other.

10. What we will do next

Run the same pairs across two engine builds (0.1.48.1 and 0.1.51, the pair from #4212) under your set, which
is the bit-identity half of that benchmark's claims, and correct that PR's "Limits" section, which currently
says the noise band was not measured — it now is (§7). The gate script, the config generator, the probe, the
three configs (with api_key and the MCP bearer token removed) and the per-pair logs are ready; if you want
them in the repository rather than in this thread, say so and they go in as
bench/results/2026-10-26-community-rtx4090-identity-gate/ in a results-only PR.

<!-- gh-comment-id:6429109821 --> @Dmitry-B commented on GitHub (Oct 26, 2026): **Re-ran the two-start test with the settings from `docs/DETAILS.md` ("Reproducible output") — they work.** We repeated the two-start test with those settings on the same machine and the same build: 23 pairs (46 server starts). Your diagnosis is right, and one part of our original report here was wrong. Below: the numbers, the first prompt that differs, which switch is load-bearing, what the settings cost, the correction, two questions, and the limits of these runs. ## 1. What was run One **pair** = two independent server starts of the same build and the same config (the script starts its own `serve/server.py` on a second local port, 8090, with the production service stopped, the way `tools/ab_engine.py` does), the same fixed corpus sent to both starts, greedy sampling (`temperature: 0`, `chat_template_kwargs.enable_thinking: false`, as in `tools/ab_engine.py`), 256 new tokens per request, and SHA-256 over the whole returned text. **23 pairs = 46 starts in six sessions**, run from 23:08 to 01:10 on the machine's local clock over the night of 2026-10-26 to 2026-10-27; the session headings below are those local times, and the log file names carry the same stamps. Build, unchanged during all sessions (checked after the last one): engine `0.1.51`, source build on this machine, `BUILD.json` src id `a88a598cd60d6ee1`, `engine/strata` md5 `cdf8aae7d3baa13bb1e274f8006384a8`. Strata `v0.2.6`, commit `4b9e05a2a806a3fe24f7b2560d98626c37dade35`. So every comparison below is one build against itself. Hardware: RTX 4090 24 GB (23,028 MiB, `sm_89`), Ryzen 9 7950X, 47,579,476 kB RAM, Ubuntu 26.04.1, driver 615.71.09, CUDA 13.4. Model Qwen3.8-Flash-Next IQ3_XXS (`…-GSQ-RCO-IQ3_XXS-00001/00002-of-00002.gguf`, native pack, `--kv int8`, `--resident-experts`, `--spec 4 --mtp <draft directory: dense.bin md5 a16efaf4…, draft_vocab.bin md5 18b68403…> --spec-min-p 0.50`, `--prefill auto` → chunk 8192 with a 96-slot ring, `--pool-workers 10`, `--max-context 204800`, `--vision`, `draft_vocab: cyrillic`, `reasoning_effort: low` (overridden per request), experimental speed projection on: `--control-vector-scaled <projection gguf>:1.0 --control-vector-layer-range 4 44 --cvec-mode project --cvec-dir per-layer`, and `STRATA_PF_FUSED=1`. Frozen state for every start: the learned expert profile is **not** written (`expert_profile_save` and `expert_profile_save_every` are removed from the config, not only the flags — see §6) and `--expert-profile` points to a fresh copy of `data/expert-profile.bin` (md5 `ff1bc6544d3f2f0013e3e376632d33a8`) made per start, which the engine confirms (`profile /tmp/ident_…`). Three arms, so that each part of your set is isolated. Everything else is identical in all three, including `--pcie-frac 0.00`, which our working config already carries — it is shared, not one of the isolated variables. What each arm adds on top of that shared configuration: | arm | added on top of the shared configuration | env | |---|---|---| | **your set** | `--expert-cache 1500 --prompt-cache 0 --adapt-swaps 0` | `STRATA_IQ_MT_MIN=1` | | **MT only** | `--expert-cache 1500` | `STRATA_IQ_MT_MIN=1` | | **slots only** | `--expert-cache 1500` | — | The fixed-slot part of the gate is in effect in every start: the engine logs `expert cache 1980 slots, 3.25 GiB of VRAM` in all 46 starts, no other value. For contrast, our working config with `--expert-cache auto` picked between 3,014 and 7,874 slots in the starts recorded in its own log — which is exactly the dependency you wanted removed. The `slots only` and `MT only` arms really do run with the adaptive tier and the prompt cache active (`adaptive swaps exchange them with the GPU cache (no file reads)` in their engine logs); in the `your set` arm the same line reads `adaptive swaps off`. ## 2. Result | arm | pairs | pairs where the two starts differed | request checks | differing checks | |---|---:|---:|---:|---:| | your set | 5 | **0** | 32 | 0 | | MT only (`STRATA_IQ_MT_MIN=1`) | 6 | **0** | 36 | 0 | | slots only (`--expert-cache 1500`) | 12 | **6 (50 %)** | 76 | 24 | Per session, so the counts can be checked against the logs: | time | your set | MT only | slots only | |---|---|---|---| | 23:08 | 1 pair, all 6 hashes equal | — | 1 pair — 4 of 6 requests differ | | 23:17 | — | 1 pair, identical | — | | 23:42 | 1 pair, identical | 1 pair, identical | 1 pair, identical | | 23:58 | — | 2 pairs, identical | 4 pairs — 1 differs (2 requests) | | 00:32 | 2 pairs, identical | 2 pairs, identical | 4 pairs — 2 differ (4 requests each) | | 01:00 (prompt path, §4) | 1 pair, identical | — | 2 pairs — both differ (5 requests each) | ## 3. The first prompt that differs (you asked for this) Corpus order and what happened in the `slots only` arm over 12 pairs. Labels 0-2 and `long` are the fixtures from `tools/ab_engine.py`; `arithmetic`, `code` and the two `pp…` requests are ours. Prompt token counts are the engine's own `usage.prompt_tokens`. | label | prompt | prompt tokens | differed | |---|---|---:|---:| | `chat0` | "Write a Python function that merges two sorted lists…" (ab_engine 0) | 34 | 0 / 12 | | `chat1` | "Explain in two paragraphs how a refrigerator moves heat…" (ab_engine 1) | 27 | 5 / 12 | | `chat2` | "List ten practical tips for learning a new language…" (ab_engine 2) | 29 | 5 / 12 | | `arithmetic` | our own: a one-line arithmetic question answered with a single number | 31 | 0 / 12 | | `code` | our own: in Russian, "write a Python function returning the n-th Fibonacci number in linear time, plus one test" | 39 | 6 / 12 | | `long` | `ab_engine.long_prompt(1500)` | 1623 | 6 / 12 | | `pp1500w` | `long_prompt(1500)` with the answer capped at 24 tokens | 1623 | 0 / 2 | | `pp6000w` | `long_prompt(6000)` with the answer capped at 24 tokens | 6345 | 2 / 2 | In five of the six flipped pairs the first differing prompt in corpus order is `chat1`; in the sixth it is `code`. Nothing differs in the `your set` or `MT only` arms, in any pair, on any of these prompts. An answer that is just a number never differed: the same SHA-256 in all 52 recorded starts of this prompt — 46 here (all three arms) plus the 6 from our October run in this issue. ## 4. Prompt path: our first version of the test did not test it at all Our earlier corpus stopped at a 1623-token prompt, i.e. one chunk (the working chunk is 8192), so the `exact_pp` half of your gate was untouched. Added `pp1500w` and `pp6000w`, same fixture, short answers so that the prompt path is what is being compared: | | `long_prompt(1500)`, 24-token answer | `long_prompt(1500)`, 256-token answer | `long_prompt(6000)` = 6345 tokens, 24-token answer | |---|---|---|---| | slots only | 2 pairs, identical | 2 pairs, both differ | **2 pairs, both differ** (`921d0f63…` vs `0d84853…`) | | your set | 1 pair, identical | 1 pair, identical | 1 pair, identical | 6345 tokens is still one chunk, so this is not a chunk-boundary effect; it is the prompt path at a length we had not tried. The same prompt with a short answer is stable at 1623 tokens and flips at 6345. With a long answer the same 1623-token prompt already flips through decode. Two consequences for anyone measuring here: a flip rate read off a short-prompt corpus is a floor, and "short answers reproduce, longer ones do not" was too simple — it depends on prompt length and answer length, and both thresholds are below what we now know flip. ## 5. Which switch is load-bearing on this machine `--expert-cache 1500` alone is necessary and not sufficient: two starts of the same build with the resident set fixed still differ in 6 of 12 pairs. With `STRATA_IQ_MT_MIN=1` added, 6 of 6 pairs identical — including the arm where the adaptive tier and the prompt cache are running. That matches your diagnosis and the code: `src/kernels/cpu/native_expert.cpp:432` reads `STRATA_IQ_MT_MIN` with a default of 2, and at 1 the CPU path takes the multi-token kernel for a single token too (`native_expert.cpp:280`, whose comment says the choice "can depend on how many drafts a verify window held"; the same effect is what docs/DETAILS.md:317 describes as "uses the multi-token kernels for every group, so the answer no longer depends on drafting"). With `--spec 4 --mtp` the verify window is not the same size run to run, and these runs do read the RAM expert tier (`expert tiers: GPU 47,996 hits this request; since the start RAM 57,732 blobs` in one of them), so the default path can compare two different roundings depending on how the drafts landed. That is the mechanism your answer describes; what our runs establish is the effect, not the exact kernel path — with `--resident- experts` most expert work is on the GPU, and we have not traced which of the CPU kernels these particular requests reach. We are **not** claiming `--prompt-cache 0` and `--adapt-swaps 0` are unnecessary. Every pair here is a cold start: nothing is carried between requests, and the state those two flags protect is exactly the state this test never creates. They are also what stops the engine from writing the profile between runs (§6), so inside a session they do work we did not measure. ## 6. A correction to what we wrote in this issue We wrote that the saved expert profile is ruled out, because we removed `--expert-profile-save` / `--expert-profile-save-every` and re-copied the loaded profile per start. **That was wrong for our configs.** The save is configured there by the config keys `expert_profile_save` / `expert_profile_save_every`, and `learned_profile_args()` in `serve/server.py` (#477) both appends `--expert-profile-save` to the engine args and, when the learned profile's shape matches, replaces the load path with the learned file (`args[i] = save`). So our October control started each run from a profile the previous run had written, and part of what that run measured was carry-over, not engine nondeterminism. (That control's engine log was overwritten, so the October run cannot be reconstructed character by character; this statement is from the code and the config structure, and the mechanism was active.) Your advice does stop the writing — the engine's own start message says saving needs the adaptive tier ("`--expert-profile-save` needs the adaptive tier (`--adapt-every` and `--adapt-swaps` above 0) … nothing will be saved"). But the **load** path stays redirected to whatever earlier runs wrote. A config that carries `expert_profile_save` runs any gate on its learned profile, not on the `--expert-profile` file it names. Our three arms run on the static profile, which is the routing state the numbers above describe. One sentence in the "Reproducible output" paragraph would save the next person this: removing the flag from the arguments does not take the profile out of the comparison. ## 7. What your set costs here (decode tok/s) One client, a fixed expository request (in Russian: "write a coherent ~300-word note on how a heat pump works and why it is more efficient than an electric heater"), 300 new tokens, thinking off, temperature 0, three runs per config, two independent probe sessions (the second one also covers the MT-only config, which the first session did not include). Individual runs and medians, not just the best one; the first run of each config is always lower (cold caches), which is why the median is used. | config | probe A, 23:30-23:34 | probe B, 23:42 | median of the two | |---|---|---|---| | working (`--expert-cache auto`) | 94.18 / 116.52 / 117.21 → **116.52** | 110.60 / 123.01 / 129.15 → **123.01** | 119.8 (×1.00) | | 1500 slots, nothing else | 73.08 / 86.53 / 86.04 → **86.04** | 70.32 / 78.97 / 81.34 → **78.97** | 82.5 (×0.69) | | 1500 slots + `STRATA_IQ_MT_MIN=1` | 72.39 / 83.20 / 81.16 → **81.16** | 63.32 / 83.02 / 82.93 → **82.93** | 82.0 (×0.69) | | your whole set | 61.66 / 62.06 / 61.67 → **61.67** | 60.27 / 63.60 / 65.23 → **63.60** | 62.6 (**×0.52**) | `STRATA_IQ_MT_MIN` by itself could not be measured: −5.7 % in one session, +5.0 % in the other, with the same config otherwise. That is inside our own probe's band, so the honest statement is that no cost was measurable — consistent with the −1…−3 % in DETAILS.md, not with a measured number. What does cost: the small fixed expert cache (×0.69) and `--prompt-cache 0` (×0.76 on top of that, ×0.52 overall). `--pcie-frac 0` is not in this delta because our working config already carries it. The band itself, which our earlier speed numbers did not state: the median of the same config moved by +5.6 % (working), −8.2 % (1500 slots), +2.2 % (MT only) and +3.1 % (your set) between the two sessions. Within one session, individual runs scatter more — up to −19 % on the first run after engine start. ## 8. Two questions 1. `--expert-cache 1500` reports `expert cache 1980 slots, 3.25 GiB of VRAM` in every start. The number is stable, so the gate works, but 1500 is not what an outside reporter sees in a log. Is 1500 counted in blobs, or rounded up by the engine? If the identity gate names a fixed flag, it would help to name the log line a reporter should see, so "the gate is in effect" can be told apart from "the engine overrode me". Related: none of the reproducibility switches (`STRATA_IQ_MT_MIN`, `--prompt-cache 0`, `--adapt-swaps 0`) is echoed in the engine's start log — only the parity tools print them (`src/kernels/cpu/iq_avx2_parity.cpp:558`). Echoing them once at start would make community "bit-identical" claims checkable by anyone. 2. What is the complete fixed setting vector a report has to match before "bit-identical to version X" means the same thing as your gate? Our configs carry three answer-changing things your paragraph does not name: `STRATA_PF_FUSED=1` — for the native packs this is env-only opt-in (`src/prefill/moe_fused.cu:690`, `requested()`; without the env, `enabled()` at 679 and the comment at 678 leave only the dense/Q2_0 kernels on) — the experimental speed projection (`--cvec-mode project --cvec-dir per-layer`, layers 4-44), and `draft_vocab: cyrillic` plus the locally prepared MTP draft. They are identical across all our starts, so they do not affect the cross-start result, but they do mean our "identical" is identical **for this configuration**, not a reproduction of your gate. ## 9. Limits of these runs - Cold starts only. No conversation cache, no resumed turn, no adaptive tier that has been running for a while — the state `--prompt-cache 0` and `--adapt-swaps 0` protect. The repository already has tools for that half (`tools/conversation_cache_parity.py`, `conversation_cache_isolation.py`); we did not run them. - 6 prompts (8 in the prompt-path session), not your ten, and no `exact_pp 4K/20K` at 20K (docs/DETAILS.md:1054); answers capped at 256 / 24 tokens. - Text compared, not token ids or logits — a drift that never reaches the emitted text is invisible here. - One model, one quantization (IQ3_XXS), one machine; no IQ3_S / Q2_0, no `--batch`, no CPU-only path. - Speed measured with our own probe (one client, 300 tokens), not with `strata bench run` or `tools/strata_bench.py`: comparable inside this report, not comparable with other reports. - If your gate means exactly 1500 resident slots, we measured a slightly different gate (§8.1). - And the half that matters most for your own claims is still ahead: this verifies that one build reproduces itself between starts, not that two builds are bit-identical to each other. ## 10. What we will do next Run the same pairs across two engine builds (0.1.48.1 and 0.1.51, the pair from #4212) under your set, which is the bit-identity half of that benchmark's claims, and correct that PR's "Limits" section, which currently says the noise band was not measured — it now is (§7). The gate script, the config generator, the probe, the three configs (with `api_key` and the MCP bearer token removed) and the per-pair logs are ready; if you want them in the repository rather than in this thread, say so and they go in as `bench/results/2026-10-26-community-rtx4090-identity-gate/` in a results-only PR.
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#1348
No description provided.