Owner method: a step closes on a measured section delta plus identity; the set A/B (spd-sqa, M against M+QSA+shared) checks the set for regression.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Teacher-forced gate spd-sqid1: P2 (SIDE_MIXER), P3 (SIDE_QSA), P4 (SIDE_SHARED) against P1: 2057 top-16 logprob rows bit-identical, 0 argmax flips, draft trace 518/518 identical. The A/A arm did not open (InputAllocation) in any process, so no A/A floor.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
kar_source none passes no --kar-archive-*/--kar-provenance, loads qwen4exp-native-mtp-v1, skips the kar step and the archive checks, rejects --kar-fd.
Engine env of the new profile: LELEKA_PLE_DIRECT=0 (page cache instead of O_DIRECT). Default profiles unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
chat template (prompt bytes): ChatTemplate.render (#843) drops completed empty assistant turns
(no text after strip, no picture, no tool calls; the final message is kept; STRATA_KEEP_EMPTY_TURNS=1
keeps them) before the template runs. prompt.rs now does the same in Renderer::render and in the typed
render_with_images path. diff_chat_template: 136/3000 -> 0 (also 2 x 12000). chat_template_oracle.json
regenerated from the Original; one responses.rs test asserted the old behaviour.
gguf: block_geometry knows the APR trellis types 143-146 (PTQ1_0, TQ2_T, TQK6, TQK7); gguf_headers.json
regenerated. diff_gguf_header: 188/400 -> 0.
native pack: NATIVE_PLE_KEY gained IQ3_XXS/IQ4_XS (#381); NVFP4 expert tails and prism.hadamard experts
are refused (not ported, the runtime reads neither). diff_native_pack f16_nan uses a quiet NaN (numpy's
widening of a signaling NaN differs between builds). The live differential still needs one run on Linux.
smoke-mtp-pack.py reads the Q8_0 names from required[]/wq(); Dockerfile.systemd-smoke drops its apt
version pins. docs/ci-audit.md findings 14, 15, 16, 18 updated in place.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* scripts/test-cuda-fixed-ptx.sh asserted the CUDA 13.0 toolkit pins; deploy/cuda-toolkit.lock.json moved to 13.2.2 on 2026-10-14. Pins updated
to nvcc/ptxas 13.2.86 and nvdisasm 13.2.86 (sha256 and sizes from the official manifest, verified against the lock's manifest_sha256);
the SASS dataflow assertions hold for the new ptxas.
* crates/model-format/src/huge_pages.rs: libc 0.2.190 has no MADV_COLLAPSE for musl targets, so the static CLI (linux-static-cli,
release-cli, Dockerfile.static-cli) did not compile since the hugepages work (2026-11-01). The constant (25, the same value glibc's libc
exports) is spelled out locally; nothing else changes.
* deploy/Dockerfile.static-cli: `rustup target add` ran before rust-toolchain.toml was copied; the floating rust:1.99 tag is 1.99.1 while the
pin is 1.99.0, so the musl std was installed for the wrong toolchain ("can't find crate for core"). The target is added after the COPY.
* crates/cuda-driver/tests/mock_cuda.c: load-only cuStreamSynchronize (Driver::load resolves it eagerly); the fake-libcuda mock gates pass again.
port.yml runs them (`run.sh --mocks`) after the harness.
* scripts/cuda-stubs: glibc/libstdc++ already declare the libm names the stub redefines (clash on every file), so those stubs are skipped under
__GLIBC__; check-cu.py finds s26_tsum.cuh in the Original kernels; check-local.sh runs the C++-only pass (--plain) off macOS (101/104 files).
* check-local.sh --full: test-cuda-driver-bootstrap.sh reported as debt (stale: it builds a synthetic workspace of the crate alone, which no
longer resolves its path dependencies).
No engine numerics or kernels are changed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Bitwise identical on the replay gate (2057/2057 rows, 1036/1036 draft traces, docs/experiments/draft-round-5090.md); at 245k the round is 0.37 ms (2.7 %) shorter in 12 of 12 paired blocks, the draft round
0.29 ms; end-to-end tok/s +0.5 % +- 0.6 % under the adaptive window (the policy answers with narrower windows), +3.0 % (5 of 5 blocks) with the window held fixed. Separate commit so it can be dropped
without touching the engine; the fused commit (LELEKA_DRAFT_FUSED_COMMIT) stays opt-in: neutral in speed. The laptop profile is unchanged (no sm_86 companion for these kernels).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* model-format: VerifiedKarPleArtifact records how the archive was vouched for (full pass / stamp / attested memfd) and what start-up read
(KarStartupRead); an ordinary archive file keeps the device/inode/size/mtime/ctime it was verified in and every row read compares the open file
with it (one fstat, the length check already did it); LELEKA_KAR_IDENTITY_RECHECK=off disables. Sealed memfds are unchanged.
* leleka-runtime: one engine log line per load, leleka-kar-startup source=.. verify=.. total_read_bytes=..
* deploy: built-in experimental profile rtx5090-32g-file (kar_source file, resident bank, explicit 6144 MiB prefix cache, never auto-selected);
the resource planner charges a file archive with a resident bank the engine only.
* scripts: run-e2e.sh accepts E2E_KAR_FILE / E2E_ASSETS; scripts/e2e/decode/kar-file-ab.sh is the paired memfd vs file A/B (not run).
* docs/kar-file-source.md: what the file form reads, guarantees, risks with the measured random-read figures, the A/B command.
Not a performance claim: nothing was run on a GPU.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`auto` is 75 % of the memory that is elastic when the stack opens (ceiling 96 GiB), so it grows whenever RAM is freed
elsewhere (a sparse memfd frees ~36.6 GiB: auto would become ~30 GiB). 6144 MiB is what auto resolves to on this host
today (5.7-6.1 GiB, docs/memory-safety.md section 8); a 245k session needs about 4 GiB (14,208 B/token + ~4 nodes), so
behaviour at 245k is unchanged.
- deploy/rust-runtime/profiles/rtx5090-32g.json: memory.prefix_cache_mib "6144".
- leleka-memory: plan::explicit_prefix_budget (the explicit wish clamped to the host, never above the wish); tests that
an explicit cap does not grow with +37 GiB available while auto does (startup plan and open-time budget).
- leleka-runtime memory_governor: the explicit arm uses it, and the engine now logs "prefix cache budget: N MiB (...)" for
auto, explicit and off.
- leleka-deploy: MemoryBudget::prefix_cache_cap_mib and a test that every memfd profile carries an explicit cap.
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>
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>
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>
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>
Live Codex CRM: median prefill 2265 -> 706 ms, p90 3620 -> 1064 ms, decode unchanged; teacher-forced agreement
(job 9d4) is within the noise of a chunk-cut change (control 9d5). docs/prefix-cache.md has the numbers.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Expert tier auto-sized per layer from data/expert-profile.bin (shipped routing profile, default digest), spec_min_p 0.5 (new profile field -> --spec-min-p), 30 GiB GPU budget, memory reserve 2 GiB. Measured in the real Codex sessions (docs/e2e-run.md 7d): weighted decode 129-130 tok/s vs 72-75 with the old profile.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- deploy/Dockerfile.windows-build cross-compiles the six executables (mingw, no Visual Studio needed)
- control-plane/build.rs: the ggml link stubs are used for every Windows target, not only MSVC
- scripts/windows/Start-Leleka.ps1 (igpu | cpu | npu modes, speculation and cache slots on by default) and Package-Windows.ps1
- docs/windows-runtime.md; stale statements in docs/cpu-runtime.md corrected
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- backend_original_serve_memory_smoke.rs: scenarios inventory / soak / shed / reader and a model-free archive guard probe; floors
moved next to the memory the host has now so the shed path runs far from the real limit; abort guard at 15 GiB.
- Governor::set_floors; stack prefix_bytes / prefix_budget_bytes accessors.
- leleka-deploy: Profile.memory (prefix_cache_mib, floors, reserve, share, lock, heal, resident budget) -> engine args and
LELEKA_MEMORY_* environment; built-in profiles carry it; tests.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The Original serve Load never admitted an expert source (the serve smokes call
load_resident_expert_source themselves), so the stack's prompt arena failed with
InputRead on the first real Load through leleka-inference. leleka-inference gains
--expert-source resident|mapped; backend.rs admits the chosen bank before the
driver. leleka up passes it per profile and the supervisor stops waiting when the
load operation is FAILED/INDETERMINATE.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
New crate leleka-deploy (binary leleka): idempotent one-command deployment with
preflight (driver, sm_120/sm_86, VRAM/RAM/disk, WSL2, cuBLAS 12, memfd), memory
profiles, plan/dry-run, stamped asset steps, systemd unit, and a native supervisor
that seals the KAR archive itself and hands it to the engine (no Python holder).
leleka-inference gains --kar-archive-file for the low-RAM read-only archive form.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
docs/delivery-gap-audit.md: host test counts, Python audit, Codex-direct and
deployment gaps with file:line, recommended tasks with acceptance criteria.
docs/rust-runtime-run.md: leleka-seal-exec + leleka-inference (--backend-mode original)
behind leleka-daemon, what was executed without a model or GPU context.
desktop-core/examples/daemon.original.json and deploy/rust-runtime/*: configuration
and user-unit templates (systemd-analyze --user verify only; not run with the model).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
control-plane/src/prompt.rs include_str!s engine/strata/serve/chat_template.jinja, but
.dockerignore kept only engine/strata/LICENSE and Dockerfile.static-cli copied only
that file, so docker build failed with 'couldn't read ... chat_template.jinja' (the
linux.yml CLI image step uses this Dockerfile). Re-include and COPY the template.
Checked by exporting the build context with BuildKit (LICENSE and the template are
the only engine files) and cargo check of strata-next from exactly that file set.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>