Design only, CPU-only analysis; nothing measured on the server. Finds that the 55.3 GB sealed memfd is read only for the 16.0 GB of PLE rows
and that ~39 GB of it is an unread level-2 re-encoding of shard 0 (estimate, census task T1).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merges the decode, kernels and CPU/platform reviews of Strata 41cf05a0..870aedd9 into one ranked
port list for Qwen3.8-Flash-Next IQ3_S + KAR + MTP on the 5090 and the 3080 (correctness and
hygiene 4.x, decode 5.x, prefill 6.x, laptop 7.x), with the state of each row from main and the
local branches (upstream-fixes, draft-vocab, models-move), the contradictions between the reviews
resolved, a paragraph on what upstream does not give (no 200+ tok/s at 245k), and the next ports
in order with the GPU they need. Every number is marked measured, claimed by upstream, estimate
or unverified. Old rows updated: 2.1 (default OFF, no e2e gain), 3.1 (not the cause of the 5090
gap), 3.3 (pa-pcie35 slightly worse), 2.6 (closed), 2.2, 3.2, 3.4 (pointers).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds Options::recovery to tool_output and an opt-in setting, `tool_call_recovery` (config key) / STRATA_TOOL_CALL_RECOVERY=1
(environment, wins over the file; 0/false turns it off; anything else stops the start). It is off unless set, is read once at
start, logs "tool_call_recovery is ON (experimental)" at start, and logs every call it accepts. It is NOT part of the default
contract and has not passed a quality gate (docs/api-contract.md, "Tool-call recovery (experimental)").
With it on, a call for a DECLARED tool written next to the template form is read as the call (upstream 3fcb2106, #3441):
* <parameter=NAME> where <function=NAME> belongs; <=NAME>, <function:NAME>, <function =NAME> or <NAME> after <tool_call>;
* {"name": ..., "arguments": {...}} inside <tool_call>, also in a Markdown fence, arguments possibly a JSON string;
* a bare <function=NAME> ... </function> at the start of a line outside a code fence and inline code (a stray </tool_call>
after it is dropped); the Markdown state is tracked over the text that has left the stream buffer, so streamed and whole
readings agree;
* a second call in the same <tool_call>;
* for array/object arguments, brackets left open at the end and a bare string where an object member belongs (dropped).
An undeclared name stays an error in every form. Streaming: a batch is delivered when its </tool_call> arrives, a bare call when
the text after it shows it is over or at the end.
With the option off the reading is byte for byte the step-3 reading. The corpus test now reads every specimen twice (off and on)
and lists the failures of each; every streamed cut agrees with the whole reading in both. Recovery rate on the 41 Qwen specimens:
off 24/41 (58.5 %), on 30/41 (73.2 %); the 6 specimens that need recovery: off 0/6, on 6/6. That is code reach on upstream's
failure corpus, not a rate for real sessions. strata-control lib 339 passed (new: 3 recovery tests, 1 config test), corpus and the
quoted-value shapes pass with the option on and off.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Four shapes that ended in response.failed (or 502 tool_call_parse_failed) are now calls, each logged on stderr as
"tool call accepted beyond the template form (closers supplied: N, arguments repaired: M, ...)":
* </function> left out: a </parameter> followed by </tool_call> ends the value and the call, but only when no </parameter>
followed by <parameter= or </function> ends the value (upstream d7113273, #4427/#4077). A streamed response delivers such
a call when the generation ends, not at its </tool_call>: only the end can tell it from </parameter></tool_call> quoted
inside a value.
* </tool_call> left out: the call is whole when the next <tool_call><function=NAME> follows its </function>, or when its
</function> ends a generation that stopped by itself (finish stop). A generation cut by the token limit never gets this.
* A call inside the reasoning (no </think>): a normal stop whose text ends on whole calls of declared tools, the first at
the start of a line outside a code fence and inline code, is reasoning (completed) followed by those calls (upstream
805ebe17/d7113273, #804). The calls' markup was already streamed as reasoning deltas; the final reasoning item ends before it.
* Damaged array/object arguments of a parameter declared array or object (not a union with string): a trailing or doubled
comma, single quotes, Python True/False/None, extra closing brackets, and an array written as a JSON string of itself are read
as written (upstream _Lenient, A4). Nothing is invented or dropped; open brackets and bare strings are not repaired here.
Undeclared tool names: upstream returns the call as text and counts it. That is NOT adopted. Text without a call ends an
agent's turn as if it were the answer, while a failed response is retried by the client (docs/e2e-run.md records a session that
survived one such failure), and native_tools_sdet / backend_worker_http pin the refusal. An undeclared tool is still an error;
it is never run and never published.
API: tool_output::{Options, Notes, Parsed, parse_with, calls_at_end}, Incremental::{with_options, finish_after, notes};
parse_complete and Incremental::new keep their strict default reading. Documented in docs/api-contract.md ("Tool-call
parsing") and docs/tool-call-corpus.md.
Corpus: 24 of 41 specimens read as upstream expects (13 before this commit). New unit tests cover each shape whole and
streamed; strata-control lib 334 passed, native_tools_sdet 14 passed, existing tests unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tool_output::find_parameter_end ended a value at the first </parameter> followed by <parameter= or </function>, so a write
whose content quoted a whole call (a file that documents the format, a heredoc, a test) was published with content cut at the
quote and the rest as plain text, whole and streamed, without any error (upstream #4078, fixed there in 77794e34 and b72f56e0).
It now follows upstream's quote rule: a close inside a call the value itself quotes (more quoted <function=NAME> openers
followed by <parameter= or </function> than </function> closers before it) is part of the value. One forward pass over the
value. Incremental also stops re-trying candidate call ends it has already rejected.
A call whose value quotes an opener and never closes it is now unterminated (an error) instead of being cut at the first
plausible close, so a long write that quotes a call and is itself cut by the token limit is not published truncated.
Deliberately not taken from upstream: a value that reopens its own parameter (</parameter><parameter=content> inside content).
Upstream reads it as text; here it is byte for byte a parameter written twice, which desktop-core's
native_tools_sdet::unknown_incomplete_duplicate_or_late_invalid_call_refuses_entire_output requires to be refused, and merging
the two into one argument would hide a malformed call. It stays an error (duplicate tool parameter), listed as known failure.
Regression tests: specimens 4078-nested-call and 4078-heredoc and the quoted-value shapes "quoted call", "quoted call at the
end" and "heredoc" of the ported corpus failed on the previous commit and pass here (13 of 41 specimens, 5 of 6 shapes), plus a
unit test for the cut outer call. The 8 existing tool_output tests and the 14 native_tools_sdet tests pass unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* scripts/e2e/decode/draftvocab-ab.sh: speedtrain3-ab shape, one binary in every arm, counterbalanced
base/en order, arms dv-base, dv-en, dv-en-eqslots; spec-stats give tokens per round, accepted/offered and
the accepted-length histogram; validity rejects fallback, missing or unexpected draft-vocab log lines
* scripts/e2e/decode/draftvocab-id.sh: teacher-forced replay with LELEKA_ORIGINAL_SERVE_RT_DIR set (the older
identity jobs draft over the full head), A/A floor, en against default, optional LELEKA_SPEC=3 control
* docs/experiments/2026-10-30-draft-vocab-en.md: what upstream does (format, digests, selection, default off),
our status, the port, expectations, what is not verified
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds the 49 specimens of Strata upstream's serve/test_tool_corpus.py (MIT, provenance and licence in
control-plane/tests/fixtures/tool_corpus/NOTICE.md; reporter handles removed) and the six quoted-call value shapes of
serve/test_quoted_call_values.py as control-plane/tests/tool_corpus.rs. 41 specimens are Qwen-form and run against
tool_output (whole through parse_complete, streamed through Incremental in pieces of 1/3/7 and cut at every character);
the 8 DSML specimens are skipped, there is no DSML parser here.
On main 11 of 41 specimens and 2 of 6 quoted value shapes are read as upstream expects. The rest are listed in
KNOWN_FAILURES / KNOWN_QUOTED_FAILURES (strict both ways: a listed specimen that starts passing fails the test) and in
docs/tool-call-corpus.md. No parser change in this commit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Desk review of the 145 engine commits in the range that touch CUDA kernels, prefill, KV,
memory planner, sm_120/sm_86 switches and build flags, with the port decision per series,
defaults changed upstream, bug fixes to take, and the order of work. Nothing was built or run.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Item table (SHAs, claimed gain with source, lossless/lossy, whether we have it,
applicability to the 5090 server and the 3080 laptop, effort, estimate, priority),
defaults changed upstream, bug fixes to take, negative results, and a model-free
probe showing that control-plane/src/tool_output.rs truncates a string argument that
quotes a tool call. No model or GPU run.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Table of every relevant upstream commit or series in speculation, tiers, window
kernels and routing, with claim sources, losslessness and gate, whether we have
it, effort, estimated gain and priority; defaults that changed; bug fixes to
take; pin-level features missing from the plan; recommended order; what may
explain upstream's tokens per round and round time. Read-only analysis, nothing
built or run.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Rewrite the 5090 server model paths in 30 repo files (scripts, tools, docs) from the old
locations (/home/para/leleka-gates, $HOME/leleka-gates, /data/models) to
/home/para/work/leleka/models/..., add the AGENTS.md workspace rule and the move record
docs/experiments/models-move.md. Not merged: the smoke test is pending.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Needed for the slot gain: the slabs save physical bytes the Context never charged, so the
budget must rise by about that much. Smoke with this budget: ~11,568 slots, lowest free VRAM
1,035 MiB. Also the systemd unit template, the config and reconfigure tests, and the docs.
Preflight now needs 31,299 MiB free at start (was 30,720; idle 5090 reports 32,110).
Revert by restoring 32212254720. Owner confirmation required before merge.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The reserve cut was not the cause (the budget was) but it is unproven on the card; per the conservative rule only the slab ships by default. The job runs
both arms with E2E_GPU_BUDGET 31,300 MiB (the slab's savings need budget headroom; the base is card-bound at either value) and RUN_TAG lets a rerun sit beside the
earlier run directories.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs/experiments/vram-footprint-5090.md: stage-by-stage account from the speedtrain-ab logs (882 MiB of the 2.27 GiB gap is driver rounding, 324 MiB a second token
table, ~1 GiB the prompt/MoE/MTP side), the three reductions with estimated slots, the candidates not done, what is not verified.
slots-footprint-ab.sh: base-noseed vs slots-noseed (and the alias arm, and a short ledger arm), 100 ms card sampler, FOOTPRINT.txt per run.
slots-id.sh: replay with a static tier and an equal fixed slot count; the footprint changes must not move a logit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Seed OFF is a profile setting only: the engine default (seed on) and the laptop profile are unchanged. Placement-class change, NOT bit-identical; it does not fit the strict Original
envelope (p99 <= 0.22, max <= 0.43) and neither does the control; it meets the relative criterion on 1,717 teacher-forced rows (p99 0.2500 vs control 0.2278, max 0.7567 vs 0.6751,
flips 2.10 % vs 2.59 %; limits 1.5x control and 2.8 %). Gain: 108.1 -> 137.2 tok/s decode over turns 1-4 of the frozen 245k session (3 runs per arm). Revert: remove the key or set
LELEKA_ORIGINAL_SERVE_SEED=on in the operator environment. Test: only_the_server_profile_turns_the_prompt_routing_seed_off; leleka-deploy tests 125 passed in WSL.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
LELEKA_ORIGINAL_SERVE_SEED_MAX_ROWS stays available (default 0 = no cap, behaviour unchanged); the earlier commit's default of 4096 is removed and the docs say so.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
At 45k-247k prompt tokens the seed (default on, keep 0) replaced the ranked profile's resident set by the prompt's top experts and cost 25-35 % of decode on the frozen
245k session: VRAM share 80-85 % against 93-96 % with the seed off, windows 0-20 serving ~240 CPU + ~245 PCIe experts against 23-79 + 13-60, 17.5-20 against 13.4-15.4 ms per round,
107-110 against 132-149 tok/s (turns 1-4; one run each, bin-e2e4, upstream profile). Behaviour for prompts up to 4096 routed rows is unchanged. Placement-only; greedy ids can differ (GPU/CPU rounding).
Not yet measured with this binary; the paired evidence is the env switch run of the same code path.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
CPU-only audit of causes (b) compiler/optimizer and (c) settings of the decode gap against vanilla Strata 0.2.6. Measured, read-from-source and
estimated figures are labelled; the A/B arms are in scripts/e2e/decode/parity-audit-ab.sh and are queued by the orchestrator.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
No default changes. scripts/e2e/prefix_tail_equivalence.py scores the `reply` prefix-cache tail live: record an agent session against the reply
arm (history built from its own output, so it resumes from its own reply checkpoint), replay the exact request bodies on a cold server
(--prefix-cache-mib 0), and judge greedy identity of every output item, tool-call integrity of each arm (declared name, call_id, JSON arguments
against the tool schema, streamed deltas == done == item, response.completed), restore evidence (cached_tokens) and, with --control, cold-vs-cold
determinism. Verdicts PASS / FAIL_* / INCONCLUSIVE_*. Two sequential phases because one 5090 cannot hold two serve instances.
Tested on in-process fake servers (15 tests); it has NOT been run against the engine. The plan (scripts/e2e/prefix_tail_equivalence_plan.md)
also records the open numeric-gate decision (q_tail_gate needs teacher-forced captures).
docs/prefix-cache.md: the stale "EXPERIMENTAL: off by default" lines now agree with the measured paragraph, and both say that the
rtx5090-32g profile sets the tail while the live equivalence gate is open.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Per-round component tables of vanilla Strata 0.2.6 (default, DT-only, tail skip off)
and of the pinned ours build over the 5-turn 245k session, the per-component gap
table (all rows INCONCLUSIVE: no A/A series), and the measured causes: request
cold-start burst of expert misses, late-window hit rate, cache size, draft cost.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Server access and layout, the wave-1 ours pin (ffb264e0 + bin-e2e4, tree equality
evidence), secrets handling, workload commands and source snapshot hash, model
digest mapping with server sha256 outputs, non-privileged cache-state resets,
machine locks and holder queue, run hygiene SC11-SC14, measured per-arm overhead
of ours on the 5090 (dedicated GPU slot not run: gpu.lock held by STRA-267).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
New page docs/experiments/2026-10-28-s0-7-vanilla-arms.md: binary provenance and digest of the
vanilla engine on the 5090 server, the CPU-family lines at the pin (generate.cpp 3485/3687),
one class and a pin file:line for each row of the digest section 1.3, row (b) as a literal
one-variable list, Linux launch commands verified by three start-ups and one short request,
the Windows command marked UNVERIFIED-ON-WINDOWS, the vanilla_cpu_family block.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Read-only audit page: one class and evidence row per profile key (27 + 27),
serve_tuning admitted sets, 51 serve-path and 14 prefill-chunk-path switch
names, vanilla cross-reference to STRA-247, findings for the second wave.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>