Commit Graph
61 Commits
Author SHA1 Message Date
Pavlo Ratushnyi c417d9c6cb STRA-338 S3: measurement tree installer for the identity and A/B gates on the 5090
scripts/e2e/hexagonal/arch-install.sh builds and freezes /data/leleka-e2e/hexagonal (tools, shared helpers, main and branch binaries, MANIFEST.sha256 of every input) so the existing draft-round identity and paired A/B scripts run against main and the branch without touching the draft-round directory; those two scripts gain DR= and D= overrides and are otherwise unchanged.
2026-11-05 15:12:20 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4cbbd2729c Merge claude/window-policy: draft-floor ceiling default 0.60 (LELEKA_SPEC_POLICY=legacy restores 0.9), replay-arm policy tooling, spec-trace bar/slope, run-e2e ATTN_DAILY_MTP default
Paired A/B 245k (8 blocks): +1.09% tok/s, se 1.86 (not resolved); replay screening +0.35..+1.72 tok/s; argmax flips 1.9-2.0% vs A/A 1.3-1.55% (<2.8% bound). Not claimed as a speedup.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 05:57:14 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 1d007da7da window-policy: replay summary from the per-request lines (0.1 ms resolution), CAPDIR, no nice
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-03 02:14:15 +01:00
Pavlo Ratushnyi 1bf011da03 routing-lead: TOP_K is 10 2026-11-03 02:12:02 +01:00
Pavlo Ratushnyi a11dec1cf1 A/B scripts: binary directories overridable 2026-11-03 00:30:26 +01:00
Pavlo Ratushnyi 766f844870 A/B sampler: pgrep -x on the 15-character comm of leleka-inference; summary keys on MemAvailable 2026-11-03 00:19:07 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 e57562740e window-policy: draft-floor ceiling default 0.60 (was 0.9), LELEKA_SPEC_POLICY=legacy restores it; spec-trace prints the bar and the row slope
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 23:50:45 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 24f1ba4a25 window and holder: 8 read threads by default (server hung during heavy O_DIRECT load on 2026-11-02)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 23:47:37 +01:00
Pavlo Ratushnyi f8acb4898d routing-lead: static tier hit rates for N slots 2026-11-02 22:26:12 +01:00
Pavlo Ratushnyi 9f174c13e3 window: chmod 0400 for the file arm 2026-11-02 22:25:08 +01:00
Pavlo Ratushnyi a75238f3fa routing-lead.py prefetch probe; probe phase 2026-11-02 22:18:52 +01:00
Pavlo Ratushnyi e5eab64eaa single-copy A/B: harness copy, STOP file, window script 2026-11-02 22:17:53 +01:00
Pavlo Ratushnyi 2b68288f02 holder v3 (seal-exec based, no page cache), inventory script fixed 2026-11-02 22:14:55 +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 2a23976c55 Pin PLE_EXTENTS_SHA256 (measured on the real archive); exact sparse memfd size; ram-inventory script; KAR decode cost probe
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 22:06:02 +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 dcf6e8bf5a window-policy: replay-arm policy options, floor options (default off), A/B and replay tools, harness ATTN_DAILY_MTP default, deploy env test
- AdaptiveConfig::set_option and the LELEKA_SPEC_ARMS suffix ~key=value (adaptive@0~step=0.3): policy variants inside one replay process on the same forced text
- options rowq / smooth / measured for the draft floor rule (defaults reproduce the earlier rule exactly, unit test against the kept reference)
- windowpolicy-replay.sh, -ab.sh (three arms), -analyze.py, -id.sh, -install.sh
- run-e2e.sh: LELEKA_SM120_ATTN_DAILY_MTP defaults to 1 like the rtx5090-32g profile
- deploy: the profile's engine_env reaches engine_environment() through the saved config (test)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 20:39:34 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 8f4b351363 draft-round: timeline and window-width analyzers, SPEC_MIN_P in the A/B harness, fused-commit class in the kernel tables
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 16:51:13 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 28d74a2efd draft-round: fused verifier commit graph (LELEKA_DRAFT_FUSED_COMMIT=on, opt-in, sm_120 only): 182 nodes -> 4
The accepted-prefix commit graph replayed each of the 36 GDN layers (conv history commit + recurrence replay through the accepted tokens) and each of the 12 QSA layers (tail restore +
8 row appends) as its own kernels. Two sealed kernels do all layers in one launch each: draft_commit_gdn_layers (precise math like original_verify.cu; the replay's output path,
which nothing reads, is not computed; the state-independent loads of all tokens are issued first) and draft_commit_qsa_layers (fast math like the resealed original_verify_qsa.cu;
one block per layer, rows in order). Model-free probe tools/draft-round/commit_probe.cpp: every state byte identical to the Original's kernels on 36 GDN and 60 QSA random
cases (n_keep 0..8, three RoPE settings, positions around block edges, holes); in a graph the GDN part is 346 -> 156 us, the QSA part 72 -> 4.5 us. Replay gate: draft-round-id1
(fused alone, DAILY alone and both): 2057/2057 top-16 logprob rows and 1036/1036 draft traces bit-identical, A/A exact.

Sealed with scripts/gpu-bringup (extra-seal-plan.json group draft-round, nvcc 13.2.86); ptx-sm86/MANIFEST.json records them as not built for sm_86 (record_commit fuses only on cc 12).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 13:00:32 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 dc9b424125 draft-round: profile/A-B/identity tooling (CUPTI per-kernel tables, paired-block analysis, replay identity with a bitwise draft trace) and LELEKA_TRACE_DRAFT
draftround-ab.sh: ours-vs-ours paired blocks (alternating order) and the CUPTI profile run at ~245k context; draftround-kernels.py: per-kernel table of the commit graph, MTP round graph and
chain steps; draftround-id.sh/-idcmp.py: teacher-forced replay gate (top-16 logprob rows and the IEEE bits of every draft probability); LELEKA_TRACE_DRAFT=1 prints one DRAFT line per draft.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 11:37:50 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 1416973a9c Merge claude/baseline-pair (part e complete): fresh-boot reboot series, 9 cycles, ours 155.4 vs v1 137.0 vs v2 144.7 tok/s
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-fast (push) Failing after 9s
Rust port / port-typecheck (push) Failing after 9s
Desktop foundation / core (ubuntu-latest) (push) Failing after 13s
Rust port / port-linux-tests (push) Failing after 14s
Linux / verify (push) Failing after 18s
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 11s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 07:29:33 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 364e059210 scripts: reboot series part e v2: 3 blocks, per-file page-cache eviction, THP gate for vanilla with one repeat
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 01:29:23 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 5aa27eeb73 Merge claude/baseline-pair (part e): reboot-per-run series scripts, prefetch, owner-readahead; series stopped after cycle 1 (cold-read cost)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 01:27:35 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 535087e04a baseline-pair part e: reboot-per-run series stopped after cycle 1 (cold-read cost), fresh-boot vanilla finding, owner readahead script
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 01:27:05 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 ca3eb4f8fa scripts: reboot series, prefetch of the KAR file and model shard (cold buffered reads run at ~30 MB/s on this NVMe), START_CYCLE
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 00:11:14 +01:00
Pavlo Ratushnyi bcdb5f92f9 scripts: reboot series, pgrep must not match its own ssh command 2026-11-01 23:27:11 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 953984d719 scripts: baseline-pair part e, one arm per fresh boot (laptop-driven reboot series, cycle hook, ENTRIES)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 23:16:35 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d29e3dba24 Merge claude/baseline-pair (parts c, d): final pairing on main ffd9322c7: ours 155.6 tok/s vs vanilla v2 132.9 (+17.2%, 6/6 blocks; vanilla mostly in poor THP state), hugepages +0.5% (unresolved)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 07:50:44 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d47942f2e2 scripts: baseline-pair ourshp arm (LELEKA_HUGEPAGES=on), PCIE_FRAC pin, bin-main-* in the manifest
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 06:17:51 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 3126b9e6cf Merge claude/cpu-service2: CPU expert admission moved to pool open (LELEKA_CPU_ADMIT_EAGER=off restores first use), vectorised q8_k. Bit-identical (353/353 rows both), paired A/B +4.24% tok/s (6/6 pairs, base SD 0.34%), -0.36 ms/round; PCIe share 0.45/0.55/0.65 equal end to end, product default stays 0.45
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 05:57:17 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 a7400288fa scripts: cpu-service2 eager-admission A/B (6 pairs) and identity job
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-01 03:09:46 +01:00
Pavlo RatushnyiandClaude Opus 5.5 2725385741 scripts: hugepages-id private MTP staging dir (0700), installer --tools-only; docs: hugepages page draft (mapping facts)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 02:56:56 +01:00
Pavlo RatushnyiandClaude Opus 5.5 a8171b2cc0 scripts: hugepages A/B, identity gate, analyser, installer; owner script for shmem THP (not run)
hugepages-ab.sh: one binary, hpoff vs hpon (LELEKA_HUGEPAGES=on), 8 ABBA-balanced pairs of the 5-turn
~245k session at the product PCIe share 0.45, baseline-sampler state record (buddyinfo, AnonHugePages,
process smaps_rollup) per run. hugepages-id.sh: bitwise replay identity at 8,000 static slots.
hugepages-analyze.py: pairs, predecessor split, exit fragmentation. owner-shmem-thp.sh: root-only
shmem_enabled toggle, not needed by the decode path. huge_pages.rs: mapped_len test-only (dead-code warning).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 00:16:35 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b49c9eb56b Merge claude/baseline-pair: paired interleaved ours-vs-vanilla tooling (sampler, analysers) and results: ours level with vanilla average (143.4 vs 145.4/142.1 tok/s, n=11/6/16), far steadier; vanilla drift partly explained by THP after ours runs. Part c (main 11e021161) queued
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 23:00:16 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b693ef491e scripts: cpu-service2 PCIe A/B on bin-cs2 with stage timing and the legacy q8_k arm; cpu-service2 identity job
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 22:01:20 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 fa186ecd83 scripts: baseline-pair ours45 arm (product PCIe share 0.45), SUBST_V1, bin-cpuservice in the manifest
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 21:48:22 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 bb2366944f scripts: cpu-service2 PCIe share A/B (0.45/0.55/0.65, 5 rotated blocks, one binary)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 21:41:04 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 63fb009f42 scripts: baseline-pair LF line endings (CRLF broke the job on Linux), SEQ and PRE_ARM_HOOK options
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 21:36:25 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c3e7067afe scripts: baseline-pair balanced ours-vs-vanilla A/B with machine-state sampler, analysers, owner-run compaction hook
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 19:36:24 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 829036be71 scripts: cpu-service paired A/B (base/new/open-cache/pcie0.35, 5 rotated blocks) and identity jobs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 18:08:12 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 22e56f69ed scripts: footprint3 paired A/B (alias, reserve 130, both), identity and placement-class relative gate jobs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 02:43:32 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 9e13fc809e footprint: share the MTP dense roles with the RT bank when proven byte-equal (about 126 MiB driver), drop the pack's copy
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-31 02:39:12 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4a1b9bfec7 Merge claude/slots-footprint2: free 1,084 MiB VRAM (unused MTP pack bank, lazy legacy QSA key mirrors); 11,568 -> 12,144 expert slots, +1.75% paired tok/s (n=3), bit-identical at equal slots; LELEKA_FOOTPRINT_LEGACY=1 restores. Placement-class gate on the larger cache still to run
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 23:49:06 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 3b0fec1b75 scripts+docs: footprint2 paired A/B and identity jobs, VRAM footprint second pass page
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 23:01:03 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 1a99397032 footprint: do not hold the MTP pack expert bank next to the RT-directory copy (675 MiB) and allocate the legacy QSA index-key mirror lazily (384 MiB); LELEKA_FOOTPRINT_LEGACY=1 restores both; ledger probe job
Both buffers are written or sized at startup and never read on the serve path: the draft layer of the product (--mtp-rt-dir) streams its own experts (original_mtp_rt_bank) and the serve QSA layers keep their keys in OriginalQsaResidentIndex; the host-canonical QsaIndexKeyCache is the legacy scalar path. Together 1,084 MiB of VRAM (about 11 quota steps, 528 slots) for the expert cache; bit-identical at an equal slot count, placement class when the auto count grows.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 22:52:28 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 e1bd61f59b Merge claude/draft-vocab: opt-in LELEKA_DRAFT_VOCAB (default off). Identity 353/353 rows, 0 flips; paired A/B +0.08% tok/s: no speed claim
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 22:42:10 +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 b856b615d3 sparse memfd (experimental, default OFF): seal, verify, lock and heal only the extents the serve path reads
Profile field memfd_extents: ple_only (needs kar_source memfd and an explicit prefix_cache_mib; default full, not serialized).
The sealed memfd keeps the archive's length and file offsets but holds only the ~16 GB the serve path reads (PLE rows, header,
directory, books); everything else is a hole, so readers need no change.

- deploy: sealed::seal_extents (parallel copy restricted to the extents, holes elsewhere, same seals; st_blocks test),
  leleka seal-exec [--sparse-ple] (Rust form of leleka-seal-exec for A/B runs outside leleka run), supervisor seals sparse,
  passes --kar-sparse-extents-sha256 to every engine, never attests or stamps the archive from a sparse copy, refuses to start
  without a pinned digest (PLE_EXTENTS_SHA256, or LELEKA_KAR_EXTENTS_SHA256 while that is unmeasured); resource planner,
  preflight RAM minimum and the inherited-descriptor credit use the memfd's real size.
- engine: --kar-sparse-extents-sha256, InheritedKarArchive::open_sparse, verify_sparse, extents handed to the governor.
- leleka-memory: FdMapping::lock_ranges, compact-space heal walk, guard_archive_extents. Locking or populating a hole allocates a
  zero page: tested with a negative control next to the extents-only test that asserts st_blocks does not move.
- scripts/e2e/decode/sparse-memfd-ab.sh (paired 5-turn 245k A/B + teacher-forced identity gate; NOT queued, not a holder job),
  docs/kar-sparse-memfd.md.

Not run on a GPU or against the real archive.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-30 12:28:52 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d6fc908641 scripts, docs: draft-vocab paired A/B and identity jobs, upstream findings and port notes
* 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>
2026-10-30 03:29:07 +01:00