Owner-precondition checklist with read-only commands, SC3 stop/resume rules,
schema floors from monitor.sh and lap_run.sh, enforced.power.limit divergence,
exposure budget. No script or setting is changed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
LELEKA_PREFILL_QSA_PREFETCH, LELEKA_PREFILL_GDN_POOL and LELEKA_PREFILL_MOE_SPAN_CACHE now default on (=0 restores the old path). R hash of every prefill chunk and top-16 rows
identical on 945-codex-crm (108 chunks) and night5-long-256k (34 chunks); paired replay at chunk 8192: prefill chunk time at >= 100k -2.8 % (QSA -6.2 %, MoE -3.5 %, GDN at noise).
Real-stack A/B (rest-e2e-ab2) queued, not yet measured. docs/upstream-port-plan.md section "Closing the host gaps between dependent phases".
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Activates the ASUS Turbo scheme, turns off sleep/hibernate/display-off/lock-display-off on mains power and prints the GPU power limit.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
(a) LELEKA_PREFILL_QSA_PREFETCH: the prior-KV prefix copy of a QSA layer (up to 147 MB) starts on a side stream at the beginning of the layer
(event after the compute stream, copy, event the layer's own copy_prefix waits on) instead of between the indexer and the attention.
(b) LELEKA_PREFILL_GDN_POOL: the two 3.1 MB GDN state buffers per layer and chunk (ping-pong scratch, mirror spare) come from a small pool instead of
cuMemAlloc / cuMemFree, and the downloaded state is scanned for finiteness once instead of twice. Same values, same refusals.
(c) LELEKA_PREFILL_MOE_SPAN_CACHE: the resolved bank spans and formats of every admitted (layer, expert) are kept per bank, so later chunks skip the
per-expert binding walk (moe.spans); eligibility and format checks are unchanged.
Replay arm flags !qpf/!noqpf !gpool/!nogpool !mspan/!nomspan. Identity: R hash of every prefill chunk and top-16 rows equal (docs/upstream-port-plan.md).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The prompt-end tail and some grid points were refused against the admit floor (soft + reserve) while the host read 8.9 GiB: on Windows the
mapped expert pages count as used, and the periodic trim only runs below the soft floor. Which checkpoint was lost varied from run to
run (turn 2 reused 43,008 / 36,864 tokens). Now the refusal is re-judged once after Governor::available_after_relief. after_prefill /
after_decode always log their outcome with available / additional / floor; the admit line of the prompt-end tail is no longer behind
LELEKA_PREFIX_TRACE. Smoke under the shipped defaults: 7 grid points + tail admitted, turn 2 cached_tokens 45,765.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The smoke (leleka up --native --preset workstation, no tuning flags) reaches ready, prints the cpu/gpu lines and borrows 2016 of 2234
slots at chunk 6144; turn 2 reuses 43,008 tokens (grid), not 45,761. Profile description made accurate; tail stays prompt.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Paired 256k sessions on this laptop (docs/laptop-vs-vanilla.md sections 4, 10, 11, 12): prefill 110 -> 176-290 tok/s, TTFT sum about
2,100 s -> 998-1,083 s. Gates: 6144 changes the rounding order of the prompt path and has NO quality gate yet (q_pair / residual-hash arms
2048 vs 6144 not run); the tail mode and the context move no number. prefill_capacity_for_budget lowers the chunk when the budget cannot
lend it (14+ GiB 8192, 13 6144, 12 3072, else 2048). Tests updated; leleka-deploy 120 unit + e2e pass. Also: section 11 (vanilla with
STRATA_ROUTE_TAIL_SKIP=0: 9.0-13.0 tok/s, wall 1,417 s).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The shipped profile left both at 2048. Paired 256k session on the 5090 (same text, 5 turns): TTFT sum 131 s at 2048, 55-60 s at 8192
(night5 / night6 / rest-full / tune-A), decode unchanged. Tests and docs follow the new default.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Per-expert cost of both modes as moving averages; start with the pass (cold cache), compare after 16 samples each, switch on a 3 % margin,
probe the other mode every 16th group. LELEKA_CPU_PREFETCH=on|off stay hard overrides; Linux keeps the pass. Seven model-free unit tests.
Not run on the GPU (power cap).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The pass (PrefetchVirtualMemory on 3 ranges per missed expert, then a touching phase) ran before the compute and took 70-75 ms of a
165 ms window; the compute faults the pages in itself, overlapped with its work. LELEKA_CPU_PREFETCH=on|off, and
LELEKA_CPU_PREFETCH_OFF_FILE / LELEKA_NO_TRIM_FILE for A/B inside one engine. scripts/e2e/decode_ab.py: decode-only A/B at depth.
docs/laptop-vs-vanilla.md section 7.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cpu_kernel_report probes every logical CPU (pinned thread, cpuid/xgetbv), groups identical ones and names the family chosen for the
process plus the STRATA_* switches that changed it, with a warning when cores differ in AVX-512. gpu_kernel_report lists every CUDA device
with compute capability, SM count, memory and the kernel set it loads (sealed sm_120, pinned sm_86 companions, or none) and the MMQ
launch policy. Logging only.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
cpu_kernel_report probes every logical CPU (pinned thread, cpuid/xgetbv), groups identical ones and names the family chosen for the
process plus the STRATA_* switches that changed it, with a warning when cores differ in AVX-512. gpu_kernel_report lists every CUDA device
with compute capability, SM count, memory and the kernel set it loads (sealed sm_120, pinned sm_86 companions, or none) and the MMQ
launch policy. Logging only.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A client that resends the history without the reply's reasoning continues from the prompt end; superseding it by the decode-end tail made
every such turn resume from the last grid point and re-read up to a block of tokens (4.8k-5.6k per turn in the 256k session).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A client that resends the history without the reply's reasoning continues from the prompt end; superseding it by the decode-end tail made
every such turn resume from the last grid point and re-read up to a block of tokens (4.8k-5.6k per turn in the 256k session).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Per-layer cache: 48 x quota slots of each layer's blob (1.94 MiB average) where the uniform plan gave slots of the largest blob (2.54 MiB): same VRAM, about 30 % more
resident experts (night5: 8,702 slots in 21.58 GiB; vanilla Strata 12,575 in 23.87 GiB). LELEKA_ORIGINAL_SERVE_PER_LAYER_SIZED=0 keeps the uniform plan.
Defaults flipped after gate I (7 arms, 1,502 forced rows with zero deviation, prefill chunk hashes equal up to the cache cut) and gate R (QSA stage -4..-6 %, decode window
-8..-10 % per round, replay of night5-long-256k): LELEKA_QSA_CLUSTER=0, LELEKA_QSA_TOPK=fast, LELEKA_PREFILL_GDN_NOSTORE=0 switch them off.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Keeps the last layers' pages cached across chunks of a cyclic scan; only which pages the cache keeps changes.
docs/laptop-vs-vanilla.md: first draft.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The workstation preset counted logical processors: 12 workers on the 8-core laptop, 5 spinning unpinned. Now 7 (as vanilla).
The 16-core server stays at 15.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The KAR PLE rows of a chunk (16 per token, three random 4 KiB reads each) were read before the chunk started, through
clones of one synchronous handle, which the I/O manager runs one request at a time: 5-12 s of every 6144-token chunk.
Rows now read on independent file objects (ReOpenFile) and the next chunk's rows are fetched on a thread while this
chunk computes. Packets are a function of the archive bytes only; LELEKA_PLE_AHEAD_VERIFY=1 compares each with a direct
read (0 mismatches in 2 live turns). Default on for Windows, LELEKA_PLE_AHEAD=on|off.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
leleka_prefill_gdn_out_norm_y16 writes the same y16 and status words as leleka_prefill_gdn_out_norm and leaves y alone (nothing reads it after the launch);
LELEKA_PREFILL_GDN_NOSTORE. Overrides for paired passes in one process: set_prefill_gdn_override (sealed / kh / two-barrier recurrence), set_qsa_topk_override,
set_qsa_cluster_override, set_prefill_gdn_nostore_override; replay arm flags !orig !kh !rec !wide !fast !cluster !nocluster !nostore !store.
sm_86 companions regenerated (prefill_stage, qsa_late; qsa_cluster is sm_90+ and documented as not built).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>