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>
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>
leleka_qsa_topk_wide (also _sample/_wide_failed, measured and not used) in qsa_late.cu; leleka_qsa_topk_cluster in the new sealed asset qsa_cluster.cu (sm_90+,
no sm_86 companion); cuLaunchKernelEx plumbing for KernelModule and the verifier window (Launch.cluster); policy.qsa.cluster_topk. Same ids as qsa_topk_ref in
every model-free case (continuous, heavy tailed, tied, all equal; prompt tiles of 256 rows and decode calls of 1..5 rows up to 261,500 tokens).
LELEKA_QSA_TOPK=wide (prompt, from 10,000 blocks) and LELEKA_QSA_CLUSTER=1 (decode window) switch them on; defaults off until their R gate.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Brings the Rust/CUDA port of the Strata mode17 serve path together with the
CPU/iGPU/NPU gpt-oss runtime that main gained meanwhile.
Control plane: the Qwen tokenizer is the implementation behind the Qwen35
variant of codec::TextCodec (qwen(), encode_prompt() widen the trait; QwenCodec
derefs to the tokenizer), so control-token marks, images, chat template, the
runtime backend and vision keep their behavior, while the gpt-oss/Harmony path
and the worker pool keep main's. Config carries the union of fields; extra_workers
is rejected together with runtime, lazy_load, idle_unload_s and vision; the
gpt-oss family refuses top_k/min_p/penalties (its GEN line has no such keys).
leleka-kar-codec takes f16_bits_to_f32 from leleka-quant-core (identical code).
Workspace members and default-members are the union of both sides.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The sealed chain_window assets conflicted: bringup sealed a new chain_window.ptx (entry chain_gr_down_t2w8_nb4, c9ccd81) while upstream-p0
clamped the q8_1 scale and sum in the opt-in chain swiglu+quantize entry (4654f01, plan row 1.1). Resolved from the bringup sealed file:
only chain_swiglu_quant_kernel was replaced (scripts/q8/splice_ptx.py), every other byte stays as sealed; the entry text is byte for byte what
scripts/q8/rebuild_quantizer_ptx.sh compiles from the merged chain_window.cu (nvcc 13.2.86, checked on the server).
Regenerated, not merged by hand: the pin in original_verify_window_chain.rs (scripts/q8/repin.py), and the sm_86 companions, MANIFEST.json and
sm86_table.rs (scripts/gpu-bringup/sm86_assets.py build: 132 companions, check OK). The six other quantizer PTX and their companions equal
upstream-p0's. docs/upstream-port-plan.md: rows 0.1-0.5, 1.1, 1.2 from upstream-p0, row 0.6 from bringup, merge note on row 1.1.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A q8_1 block stores d = amax / 127 and the sum of its 32 activations as fp16: one massive activation (amax > 8.3 M, or a sum past 65504)
rounded to inf and the dot products then read inf * 0 = NaN (NonFiniteMmqOutput here, "!!!!" upstream). The quantizers now clamp both
to the largest finite half and keep the codes inside int8 (strata/kernels/q8_1_finite.hpp); a NaN input still gives a NaN sum.
Finite blocks are stored bit for bit as before.
Sites: head_quant (mtp_original_full_head_native, native_head_native), mtp_original_quantize (mtp_original_tail, mtp_original_full_checks),
quantize_q8_1_kernel (mtp_original_full_head_iq, native_head_iq: the routed experts' input and SwiGLU output) and the opt-in chain
swiglu+quantize (chain_window). Not taken: the MMQ prompt quantizers (ggml quantize_mmq_q8_1, mtp_prefill_q8), which upstream did not clamp.
The sealed PTX are patched entry by entry (scripts/q8): three were built with CUDA 13.0.88, which is not installed, and a recompile
renames the hashed anonymous-namespace entries; only the quantizer entries change, every other byte is the sealed one. Pins, the seal
plan digests and the sm_86 companions (sm86_assets.py build) follow. tools/q8-probe compares old and new PTX on the GPU.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
No harness of ours reads the Original's logits dump (they use STRATA_LOGPOS rows, residual dumps and token outputs); the manual recipe in
docs/gpu-bringup.md now says to check the file first, because the pinned reference build predates the fix and writes a lying header on
native packs. scripts/quality/logits_dump_check.py refuses such a file.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Documented tree replacement (the history has no git-subtree metadata): 3-way merge of the old subtree
(570201a:engine/strata) against upstream 41cf05a06a25dd29103b7b27a2279a3f60c21876 (2026-10-25), merge base =
the old pin d9ab8435 (tree-identical to upstream 5b734e42; d9ab8435 is not an ancestor of upstream main).
Local patches re-applied by hand where they conflicted (15 files): STRATA_CUDA_STATIC profile, experimental KAR
experts and KAR PLE arms, keyless V-only arm (now beside upstream's K8V4 hybrid KV and fused norm+rope). Details,
conflict table and left-out files are in docs/upstream.md.
Left out (weights, captures, logs, media): new bench/results (2022 files), binary media and app assets (61),
docs/work/evidence (24), *.bin / *.gguf data files, and the 7 files the first import already left out.
scripts/build-cpu.sh: build the 11 CPU tests upstream registered since the old pin (they ran as "Not Run").
Checked: build-cpu.sh 16/16 ctest in WSL; sm_86 CUDA objects of the patched files compile, also with the KAR
macros on. No GPU run, no quality gate.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
With --mtp-rt-dir the retained MTP weights come from the RT bank, whose buffers are not the pinned pack's MoE-cache matrices, so the pointer
identity check of record_original_scalar_draft_kv always failed (InvalidProjectionShape -> CudaExecution -> response.failed) on every
prompt that takes the short-tail scalar fallback (first request of a Codex session; a resumed prefix with a tiny tail). Found by the reference-config
Codex reruns 943c/945c, which died on it; the first 23 requests of 945c decoded at 138.8 tok/s weighted.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>