63 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 056ab3d689 Retire the oracles, generators and scripts that only worked against the vendored Strata tree (STRA-406)
The vendored Strata tree engine/strata is removed for good (owner decision 2026-11-23): Leleka never builds or runs it, the vanilla
benchmark builds from its own checkout, the comparison measurements are finished and the CUDA ports are frozen. Everything below
compiled or read that tree, so it cannot run without it and is retired (the tree stays in git history, see third_party/strata/UPSTREAM.md).
Checked-in fixtures, golden JSON, sealed PTX, seal plans and MANIFEST hashes are untouched and keep being replayed by the cargo tests.

Drift guard
- crates/experimental-ref/tests/literal_port.rs: include_str! of the Original .cu files compared with the checked-in experimental ports.

Oracle generators and builders (they compile or extract from the Strata C++/Python sources; their outputs are the checked-in goldens)
- crates/experimental-ref/oracle/gen_{cvec,kv,remote,stream}_golden.{cpp,sh}, gen_seal_additions.py and the cuda_runtime stub they used
- crates/sampler-ref/oracle/build_oracle.sh, gen_fixtures.cpp, gen_sampling_keys.py, stub/ (run_port_host_tests.sh and the fixtures stay)
- crates/serving-policy/oracle/ (build_oracle.sh, gen_{host,cvec,vision}_fixtures.cpp)
- crates/context/tests/rope_plan_golden/gen_* (plan, rope, kv pool)
- crates/engine-core/src/conversation/golden/gen*.{sh,cpp} and stub/
- crates/cuda-driver/oracle/gen_prefill_ring_trace.py and drivers/prefill_ring_trace.cpp (extracted prefill.cpp), check_cu_syntax.sh
- crates/engine-qwen35-cuda/tests/stra161_reference/reference.py (fixtures.json and the Rust constants stay)
- control-plane/tests/golden/gen_goldens.py, scripts/offline/ (Python differentials and golden generators against the Strata Python tools)

Source-compiling CUDA oracles and builders
- scripts/build-cuda-{projection-family,q5,q6,qsa}-oracle.sh with scripts/cuda-{projection-family,q5,q6,qsa}-oracle/ (include the Original .cu; sha256 pins of them)
- scripts/build-original-verify-ptx.sh, scripts/q8/rebuild_quantizer_ptx.sh, scripts/decode-sm120/make_iq_prefix.py (needs engine/strata/include)
- scripts/cuda-stubs/ (check-cu.py and literal_diff.py need the strata headers and the Original sources; the stub headers served only them)
- tools/chain-probe/build.sh, tools/kernel-ab/{cpp,aa.sh,smoke.sh,time_smoke.sh} (the C++ comparator is built from the Strata CPU kernels; verify_manifest.py stays)
- scripts/e2e/codex/speed/verify-hc-down-kernel-microbench-vs-upstream/ (compiles the upstream kernel from the tree)

Engine builds and Python smokes that need the tree
- scripts/build-cpu.sh, scripts/build-static-cuda.sh, scripts/check-keyless-gpu.sh, scripts/test-static-cuda-profile.py (CMake of engine/strata)
- scripts/compare-real-tokenizer.py, scripts/smoke-mtp-pack.py (reads src/core/mtp.cpp and a bench manifest), scripts/prepare-keyless-routing.py and its test
- scripts/smoke-native-pack.py became scripts/native-pack-fixture.py: the synthetic GGUF fixtures the four other smokes import stay, the iq_pack.py oracle comparison goes

Gates and CI
- scripts/check-local.sh: no live Python oracle differentials, no literal_port note, no check-cu, no build-cpu, no retired test scripts
- .github/workflows/linux.yml: the keyless-cuda, static-cuda-package and hosted-cuda-package jobs (they built the engine from the tree) and their dispatch
  inputs, and the two oracle smoke steps; .github/workflows/port.yml: the Python oracle environment and the llama.cpp fetch of port-oracles
  (the sampler host shim still runs)
- limits.json and scripts/check_limits_test.py exclude third_party/strata/ instead of engine/strata/

Documentation and comments: README.md names third_party/strata and the pin; deploy/README.md marks the retired build and smoke commands; comments
in Rust, Python and Markdown that named engine/strata/... now name "Strata 41cf05a0, ..."; the gpu-bringup scratch-copy test no longer copies the
removed include directories. Stale engine/strata paths in sealed .cu, .ptx, seal-plan and MANIFEST files are left as they are (hashes may depend on the bytes).
2026-11-23 21:19:11 +01:00
Pavlo Ratushnyi b4db01728c Keep the Strata files Rust and the product read in third_party/strata (STRA-406)
Owner decision 2026-11-23: the vendored Strata tree engine/strata is removed for good. This first step moves what is still read
at build, test or ship time into one small directory, byte for byte:

- third_party/strata/LICENSE (MIT; `leleka engine license` embeds it, the packagers ship it)
- third_party/strata/ggml/LICENSE, project-maya/LICENSE, project-maya/NOTICE.md (licence texts the release packager ships)
- third_party/strata/serve/chat_template.jinja (one copy, embedded by control-plane server_api.rs and gateway-text prompt.rs)
- third_party/strata/serve/chat_golden.json (gateway-text prompt tests)
- third_party/strata/tests/data/native_experts/*.txt (control-plane native_pack tests)
- control-plane/tests/mcp_hub/mcp_fake_server.py next to its test harness
- third_party/strata/UPSTREAM.md replaces engine/upstream.md: pin 41cf05a0, URL, the 25 locally patched files, where the removed tree is in history

include_str! paths, deploy/build.rs (the `leleka version` Strata pin now reads third_party/strata/UPSTREAM.md), Dockerfile.static-cli,
.dockerignore, .gitattributes, the release packagers (package-5090.sh, package-release.py: the subtree facts of the removed tree are
dropped from PROVENANCE) and the evidence capture scripts follow the move. The tree itself is deleted in a later commit.
2026-11-23 21:11:53 +01:00
Pavlo Ratushnyi 3f22c4ae29 Drop stale docs/ references from scripts, tools and deploy files; add rope-regeneration.json 2026-11-23 09:34:33 +01:00
Pavlo Ratushnyi 94592f4fa0 wip: rename strata-next/strata-control/strata-desktop-core (to be squashed in the final rename commit) 2026-11-14 20:30:41 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 7ccd1b8b5e Laptop 3080: audit of the 5090 defaults, profile pins the tier layout, WSL2 planner caps CPU workers at the physical cores, profile guard for switches without an sm_86 companion, laptop run tooling; live validation not run (30 W power cap)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 17:53:10 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 cee394f6ef Tier swap bursts (ADAPT_EVERY=2, ADAPT_SWAPS=48) ON in the three 5090 profiles by the owner decision of 2026-11-13 (profiles, test, deploy.md, ledger, plan row 6c, host-round report)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 13:02:54 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 67bf39a984 Merge main into claude/host-round (profiles: tail skip keys from main + LELEKA_PLE_ON_CHAIN)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 12:32:33 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 25aed1375a Enable the lossy route tail skip (rank 7, max cached 100) by default in the three 5090 profiles (owner decision 2026-11-13)
Allow exactly LELEKA_ROUTE_TAIL_SKIP and LELEKA_ROUTE_TAIL_SKIP_MAX_CACHED in the profile engine_env allow-list, set them in
rtx5090-32g, -file and -gguf-ple (laptop profile unchanged), tests, docs/deploy.md, step-ledger H9, plan stage 6f, AGENTS.md exception note.
The quality gate was assessed and its open points (logit envelope 3.6 % against 2.8 %, ttt rounds) were overridden explicitly by the owner.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 12:13:28 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 937de960ee 5090 profiles: LELEKA_PLE_ON_CHAIN=on (bitwise: 2057 logprob rows and 1036 draft lines identical, A/A floor 0, verify mode compared 1000+ taken rows bit for bit; window.ple 0.194 -> 0.060 ms per round)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 09:43:14 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d1e0b431c6 Profiles rtx5090-32g, -file, -gguf-ple: EXPERT_PER_LAYER=no and PCIE_FRAC=0.65 by default (owner 2026-11-12); profile test, deploy doc, ledger H4
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 16:22:36 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 712b7edd0f Enable LELEKA_SM120_HEAD_CHAIN_BATCH (R8) in the 5090 profiles: bit-identical, tail section -27 us a graph against A/A noise 0.3 us; ledger
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-12 06:06:24 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d635a73c9a Enable LELEKA_SM120_DOWN_SUB16 (D1) and HITS_IN_COMBINE (D2) in the 5090 profiles (identity and probes PASS, window deltas); D3 WAIT_M_ROWS is a measured loss, stays off; ledger
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 16:52:52 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 622c16e15d Enable LELEKA_SM120_COMBINE_VEC4 (S11) in the 5090 profiles (identity PASS, window delta -0.016 ms a graph); S9 and U5a stay off, ledger
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-11 01:25:31 +01:00
Pavlo Ratushnyi ef128c3b04 Merge claude/speed-vs-strata-08143a: sm_120 defaults, verify side streams, fused commit, step ledger, upstream microbench
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

# Conflicts:
#	deploy/rust-runtime/profiles/rtx5090-32g-file.json
#	deploy/rust-runtime/profiles/rtx5090-32g-gguf-ple.json
#	deploy/rust-runtime/profiles/rtx5090-32g.json
#	docs/experiments/step-ledger.md
2026-11-11 01:18:50 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 1799aee147 profiles: the expert stream starts at 1536 rows in the 5090 profiles (chunk hashes identical, prefill.read -180 ms at 1.5-4k tails); ledger Q4/Q5 ring findings
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 20:18:59 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b56e5afb58 Speed program: fused commit graph ON in the three 5090 profiles (identity P2/P3 PASS, section 509 -> 125 us); ledger closes S6/O11
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 17:46:11 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 edad5e7737 Speed program: QSA prelude on in the 5090 profiles (identity P2/P3/P8, section delta per T); ledger K6/K1/K7/K7a/S10/U3/O7 with the window results; PB/ZQ variants for the set A/B
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 12:13:58 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 62695ebd4b profiles: check merge, parking fast and decode graph reuse are on in the 5090 profiles (bitwise identity PASS)
Teacher-forced identity on night5-long-256k (job host-draft-switches-teacher-forced-identity, A/A floor): top-16 logprob rows 2057 of 2057 and draft trace 1036 of 1036 lines identical for each switch against shipped. Section deltas: Q7 -97 ms per request, B3 FAST -2.0 ms, O8 step graph 114 to 105 nodes. The profile allow-list accepts LELEKA_PREFIX_* and LELEKA_DECODE_*. Not on the laptop profile (the check-batch asset has no sm_86 companion).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 05:26:56 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 22d7e9d824 prefill: the loan ladder (LELEKA_PREFILL_LOAN_TIERS=1) is on in the shipped 5090 profiles
Identity: chunk residual hashes equal (PREFILL-R, jobs id1-id4). Paired A/B n=10 on the sparse holder:
session TTFT sum -3.0 s +-0.3, median -104 ms per request, <= 2048 new tokens -154 ms (19 of 19 faster),
above 2048 tokens -10 ms. The engine default stays off; the profile allow-list accepts LELEKA_PREFILL_*.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 00:58:37 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 a838d0abe7 Speed program: SIDE_QSA and SIDE_SHARED on by default in the 5090 profiles; ledger V3a/V3b/V4a/V4/S3 fixed (section delta + identity)
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>
2026-11-09 21:14:37 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4f310457ce Speed program: SIDE_MIXER on by default in the three 5090 profiles (identity PASS, decode +1.39 % paired); ledger V3a/V3b/V4a identity
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>
2026-11-09 18:37:48 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 cd83f843bc Speed program lever 1: sm_120 ATTN_DAILY + GU_SWIGLU on in the 5090 profiles (teacher-forced identity PASS, decode +1.85% paired)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 04:10:45 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 dc988dc53b engine: opt-in Original serve without a KAR archive (LELEKA_ORIGINAL_SERVE_GGUF_PLE=1, set by rtx5090-32g-gguf-ple); install script takes the engine binary
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 10:48:41 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 98effcdabd deploy: experimental kar_source none and profile rtx5090-32g-gguf-ple (Leleka without the KAR archive, PLE rows from the GGUF shard)
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>
2026-11-05 10:21:01 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 ff1ad3aea1 release 5090 v0.1 phase B: README, short release notes, profile/deploy text fixes, packager for the merged state
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 22:31:10 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 97c33d8b2c Offline differentials: port the Strata 0.1.50 chat-template empty-turn filter, GGUF types 143-146, native PLE key types; fix two stale smokes
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>
2026-11-03 03:39:53 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 af387583f9 Merge claude/ci-audit2: CI fixes verified in containers (musl MADV_COLLAPSE, PTX pins, mock gates, buildx), ci-audit.md section 3.4
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 03:05:40 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4cecb3b205 ci: repairs found by running the Docker- and tool-dependent steps in containers
* 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>
2026-11-03 02:59:50 +01:00
Pavlo Ratushnyi 9f1b6baa07 rtx5090-32g: sparse memfd (memfd_extents ple_only) is the profile's form; tests describe the full copy explicitly 2026-11-02 22:41:13 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 a53311d2e1 sealed: an empty extent list is a valid empty sparse copy; file profile env follows rtx5090-32g; A/B script, inventory
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 22:13:10 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 97ceb120a9 Merge claude/kar-file-source into single-copy (conflicts resolved: sparse + file source coexist)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 21:50:41 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 e059a1cf08 Merge claude/sparse-memfd (experimental sparse memfd, prefix cap) into single-copy
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 21:49:38 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 f9003b7ced Re-enable LELEKA_SM120_ATTN_DAILY_MTP=1 in the rtx5090-32g profile: defaults must be the best lossless variant (bitwise identical, round -0.366 ms 12/12)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 19:47:47 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 0612991e6c Revert profile default for LELEKA_SM120_ATTN_DAILY_MTP: keep opt-in until tok/s gain is resolved (round time -0.366 ms, tok/s +0.5% n.s.)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 19:45:03 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 5378b226dd profile rtx5090-32g: LELEKA_SM120_ATTN_DAILY_MTP=1 (MTP draft attention = upstream chunk + merge v2); engine_env may carry LELEKA_SM120_* keys
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>
2026-11-02 18:56:52 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c864204e45 KAR file source for the 5090: startup read report, per-read identity check, profile rtx5090-32g-file, A/B script
* 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>
2026-10-30 15:11:06 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 2d7a5d8863 5090 profile: explicit prefix_cache_mib 6144 so freed host RAM cannot grow the prefix store
`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>
2026-10-30 12:06:18 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b63a91b2fa deploy: rtx5090-32g gpu_budget_bytes 30 GiB -> 32,819,404,800 (31,299 MiB) so the dense-slab slot gain reaches the product
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>
2026-10-29 11:59:55 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 fcb4f02ba9 deploy: RTX 5090 profile sets LELEKA_ORIGINAL_SERVE_SEED=off (placement class, owner confirmation required)
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>
2026-10-29 10:09:44 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b50f778b37 docs: smoke of the shipped laptop defaults; correct the claim that tail prompt gave exact reuse (the prefix cache was off in runs b/A/A3)
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>
2026-10-28 00:24:04 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 621d35276d laptop profile and workstation preset: ship the measured defaults (chunk 6144, grid 6144, tail prompt, context 262144), clamp the chunk to the GPU budget
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>
2026-10-27 23:57:39 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 66cc34f850 rtx5090-32g profile: prefill chunk and prefix-cache grid 8192 by default
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-fast (push) Failing after 16s
Rust port / port-typecheck (push) Failing after 19s
Linux / verify (push) Failing after 33s
Linux / keyless-cuda (push) Skipped
Linux / static-cuda-package (push) Skipped
Linux / hosted-cuda-package (push) Skipped
Linux / linux-static-cli (push) Skipped
Linux / linux-cli-container (push) Skipped
Linux / release-cli (push) Skipped
Rust port / port-oracles (push) Failing after 24s
Rust port / port-linux-tests (push) Failing after 28s
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>
2026-10-27 23:44:13 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b3274c1130 Merge claude/port-gpu-bringup (CUDA runtime port, upstream sync) into main
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-typecheck (push) Failing after 8s
Desktop foundation / core (ubuntu-latest) (push) Failing after 11s
Rust port / port-oracles (push) Failing after 11s
Rust port / port-linux-tests (push) Failing after 14s
Rust port / port-fast (push) Failing after 9s
Linux / verify (push) Failing after 17s
Linux / keyless-cuda (push) Skipped
Linux / static-cuda-package (push) Skipped
Linux / hosted-cuda-package (push) Skipped
Linux / linux-static-cli (push) Skipped
Linux / linux-cli-container (push) Skipped
Linux / release-cli (push) Skipped
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>
2026-10-27 08:32:33 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 7803452fe7 rtx3080-16g profile: request-end checkpoints (reply), as on the server (prefill is 83 tok/s here, a 6k-token re-read is more than a minute)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 23:02:44 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 570201a0dc deploy: the rtx5090-32g profile uses the adaptive speculative window (spec_min_p 0): +5.1% decode on the live CRM replay
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 03:54:44 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 f96cdeedc8 chain kernels: agreement at 70k context (rounding-level, inside the chunk-cut control) and enabled in the rtx5090-32g profile
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 02:42:31 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c4b76a8009 deploy: the rtx5090-32g profile runs --prefix-cache-tail reply (slot-equivalent session resume)
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>
2026-10-25 02:35:44 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 e0bd5edd8b deploy: rtx5090-32g profile carries the reference agent configuration
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>
2026-10-24 11:04:58 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 0d5d95eb0e build: Linux x64 build and unit-test check in Docker; recorded in the Windows runtime doc (STRA-220)
Linux / verify (push) Canceled after 0s
Linux / keyless-cuda (push) Canceled after 0s
Linux / static-cuda-package (push) Canceled after 0s
Linux / hosted-cuda-package (push) Canceled after 0s
Linux / linux-static-cli (push) Canceled after 0s
Linux / linux-cli-container (push) Canceled after 0s
Linux / release-cli (push) Canceled after 0s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-21 13:53:21 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 92cbffdfe8 feat: Windows runtime packaging: Docker cross-build, Start-Leleka launcher, zip packager, docs (STRA-220)
- 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>
2026-10-21 13:30:37 +02:00