Commit Graph
496 Commits
Author SHA1 Message Date
Pavlo RatushnyiandClaude Sonnet 5.5 8bd63be469 holder: guard against a non-sparse lab holder in pf_ab_job (restart sparse and requeue); ledger row M1; ladder A/B ran on the full holder
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 01:01:09 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 6ba60d7d34 pf_ab_job: variants RG/RGP/RGT (decode graph reuse)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 00:56:14 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 7570247d92 Merge claude/verify-decode-graph-reuse-handles; decode graph reuse (Q7) wired behind LELEKA_DECODE_GRAPH_REUSE
Merge of the speed session's driver part (DeviceRef handles, OriginalVerifier park/rearm, OriginalVerifyCanonicalGdn reseed; ptx manifest and seal plan entries of both sides kept, ledger rows of both sides kept) with the owner loan: the journal's owners are Option behind accessors, lend() uses the same idle precondition as the speed session's require_idle.

DecodeResources implements HeldAssembly for real (park, rearm from the session priors, lend and take_back through the journal loan; every refusal retires the set). OriginalServeStack holds a GraphReuse; decode assemble asks begin first (re-arm, refill queue; or the owners back to record), teardown keeps the assembly for a clean request (drafter end_request_keep_bank, shared-expert pin, park, lend, adopt) or runs the old teardown; retirement releases the drafter before the bank closes, in begin, close and reset_expert_tier. The MoE cache pins the shared experts while a set is held and counts freed window entries (weights epoch). Switch off: begin is not called and teardown runs the old body unchanged.

Tests: GraphReuse policy with a logging probe (switch off touches nothing, key change, moved owners, refused re-arm, lost owners, order release before drop), keepable outcomes, the lifecycle fake scenarios, the GPU-free loan state machine. Not run on a GPU. No speedup claim.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-10 00:50:19 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 a70955970b Speed program: nine-process identity harness and CUPTI/group A/B variants for the new verify switches
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:42:46 +01:00
Pavlo Ratushnyi 182e1ca07e Merge branch 'claude/verify-gdn-fused-kernels' into claude/speed-vs-strata-08143a
# Conflicts:
#	crates/cuda-driver/ptx-sm86/MANIFEST.json
#	crates/cuda-driver/src/original_verify.rs
#	crates/cuda-driver/src/original_verify_window_sm120.rs
#	scripts/gpu-bringup/extra-seal-plan.json
2026-11-09 23:39:52 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 62fd0f88a8 verify window: LELEKA_SM120_FUSED_GDN (GDN conv + gates + step in one launch) and LELEKA_SM120_GDN_AB_UNROLL (upstream SMALL_UNR bit 1), both off by default
New sealed sm_120 asset sm120_gdn_fused.ptx (nvcc 13.2.86): leleka_verify_gdn_fused_step
(the Original's step loop over shared memory, conv prologue, gates in two warps or joined from the
SIDE_MIXER branch, split-window replay) and leleka_gdn_ab_unrolled_t1..t8. Written with the Original's
plain expressions on purpose: ptxas contracts a plain mul+sub into one FFMA, so __f*_rn intrinsics
would not be bitwise equal after the driver JIT. PTX shape compared with original_verify.ptx in unit
tests; model-free probe tools/gdn-fused written, not run (no GPU). Design: docs/experiments/verify-gdn-fused-kernels.md

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:38:50 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 96fd240382 pf_ab_job: variants GT/GTP/GTD (prefill GDN tensor-core scan, experimental)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:35:27 +01:00
Pavlo Ratushnyi 05a668c87b Merge branch 'claude/prefill-gdn-tensor-core' into claude/prefill-latency
# Conflicts:
#	crates/engine-qwen35-cuda/src/settings/serve.rs
#	crates/engine-qwen35-cuda/src/settings/serve_tests.rs
#	scripts/gpu-bringup/extra-seal-plan.json
2026-11-09 23:33:44 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c5a8b77942 prefill: LELEKA_PREFILL_GDN_TC (EXPERIMENTAL, LOSSY, off by default): the prompt GDN recurrence as a chunked scan on the tensor cores (ledger U1)
Port of Strata upstream gdn_tc.cuh (strata-upstream/main 504b1433; history 8c2a84694, 06f212aef 99-KB split plan, 51567de1a two value tiles
per head from 96 SMs) as a new standalone sealed asset gdn_prefill_tc.cu/.ptx (sm_120, precise recipe of prefill_stage, extra-seal-plan group
gdn-prefill-tc, ptx-sm86 manifest: not built, the plan refuses cc < 12). Kernels: leleka_gdn_tc_prep (chunk algebra A, T = (I + A)^-1, P, f16
hi/lo images), leleka_gdn_tc_scan_t1 (48 blocks x 256) and _t2 (96 blocks x 128, the RTX 5090 plan, 170 SMs), 97,808 B of dynamic shared
memory, 254 registers, no spill. Same interface as leleka_prefill_gdn_rec_kh: state_in -> state_out, readout y, the non-finite state
witness from the final state. The fused norm, the 124-KB plan and the NP experiments are not ported; our out-norm kernel runs after as before.

Switch: typed setting prefill_gdn_tc (LELEKA_PREFILL_GDN_TC=1|on, serve_tests), GdnPromptOptions.tensor_core_scan through
Context::original_gdn_prompt_device_with; no env read in cuda-driver. Dispatch (gdn_prefill_tc::plan/ScanPlan::takes, host tests of the whole
decision table): switch on, cc >= 12, >= 48 SMs, >= 97,808 B opt-in shared memory, a run of >= 128 tokens; else the sequential kernels
unchanged, with one stderr line why. The scratch (942,272 B a chunk, 60,305,408 B at upstream's 64 chunks) is the prompt device's
dequantization scratch, idle during the recurrence on the one stream, so the super-block is 55 chunks (1,760 tokens) and the switch costs no
device memory. KernelModule gets launch_dynamic (cuFuncSetAttribute opt-in above 48 KiB) and device_geometry.

Identity is NOT bitwise, by design: the reduction order changes (WY chunking, f16x3 splits on mma.sync). Upstream first-token KL against the
sequential path: mean 0.0019, max 0.0125. The gates that decide are docs/quality-gate.md (first-token KL, q_tail_gate, logprob envelope) and
the harness gate 1e-4 (ignored GPU test gdn_tensor_core_scan_stays_within_the_gate_of_the_sequential_recurrence). Not run on a GPU here: no
parity, quality or speed result yet, no speedup claim.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:32:34 +01:00
Pavlo Ratushnyi 6bcc4742b1 Merge branch 'claude/verify-hc-down-microbench' into claude/speed-vs-strata-08143a 2026-11-09 23:26:48 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 aa2f237590 speed: kernel micro-benchmark of upstream gr_down_v3 (masks 0/5/133) against chain_gr_down_t2w8_nb4 (ledger U5)
Harness (one TU including upstream fused_gr.cu whole, ours from the sealed PTX through the driver API plus an nvcc cubin),
GPU queue stub, and the method note with input sha256. Not run on the GPU yet.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:26:26 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 997aaa5e77 pf_ab_job: variants DT/MC/MT/MCP/X/XT (draft trace, check merge, the group of host/draft switches)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:23:56 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c67912b501 pf_gputest_job: run GPU-ignored driver unit tests from a package test binary
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:21:18 +01:00
Pavlo Ratushnyi 7a4d225a42 Merge branch 'claude/draft-finite-check-merge-2' into claude/prefill-latency
# Conflicts:
#	crates/engine-qwen35-cuda/src/settings/serve.rs
#	crates/engine-qwen35-cuda/src/settings/serve_tests.rs
#	docs/experiments/step-ledger.md
2026-11-09 23:20:13 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 306b39807a draft: LELEKA_DRAFT_CHECK_MERGE (opt-in): adjacent finite and Q8_1 scale guards of a draft step launch as one batched guard
A draft step launches 48 numerical guards, one kernel per buffer. Runs of guards that are neighbours in the program (no kernel or copy between them) are launched as one mtp_original_check_batch at the position of the run: each entry keeps its own buffer, count, kind and status word, with the predicate and loop of mtp_original_finite / mtp_original_q8_guard, so the status words are the separate launches' words. 3 runs per step (5 prefix guards after the GR block, 5 tail guards after the MLP GR, 2 after the shared gate and up): 12 launches become 3. No guard moves across another command; nothing is removed.

New standalone sealed asset mtp_original_check_batch.cu/.ptx (extra-seal-plan.json entry, compile_assets.py + seal_pins.py with nvcc 13.2.86, sha pinned in mtp_original_full_symbols.rs), loaded only with the switch on; no existing sealed asset is touched. Pure planner and descriptor in cuda-model (draft_check_batch) with a simulated-step proof that a NaN/Inf placed in any checked buffer after any kernel leaves identical status words; driver tests on the real command lists; an ignored GPU test (batched against separate guards). Typed setting draft_check_merge, policy field check_merge, off by default. Identity, section delta and GPU proof pending; no speedup claim.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:19:32 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 506527bb9e Verify window: LELEKA_SM120_FUSED_QSA_PRELUDE (K/V rows and tail snapshot + indexer rows of a QSA layer as two launches, opt-in, off by default)
Replaces 12 x (2n+1) per-row launches of a window graph by 24: leleka_verify_qsa_kv_rows (n x mtp_original_append, precise math) and
leleka_verify_qsa_index_rows (tail snapshot + n x verify_qsa_append_analytic, fast math). Both PTX built with nvcc 13.2.86 (compile only)
and pinned; model-free probe tools/verify-qsa-fused-prelude/prelude_probe.cpp not yet run. No GPU number.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:12:25 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 1128d4acfe pf_ab_job: variants PF/PA/PFP/PAP (prefix parking fast/async, with profile)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:07:03 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 5b8c0eba0e Speed program: readable job names (queued stubs and dirs renamed, old->new table in the ledger), content labels on the touched ledger rows
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 21:54:38 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 a199b3ad11 Speed program: S6/O11 plan (fused commit graph exists, to be measured and enabled), LELEKA_DRAFT_* allowed in profile engine_env, CF/CU CUPTI variants
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 21:16:33 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 35040ea9a6 Speed program: ledger V4a A/B (ab-sqe n=10, not significant, stays off), variant U for the set A/B
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 21:10:51 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 9ec9eca26c Merge branch 'claude/speed-vs-strata-08143a' into claude/prefill-latency (the step ledger)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 15:23:02 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c2f7d033dc prefill: empty-request probe (pf_probe.py, pf_van_probe.sh), pf_ab_job.sh PF_PKG/PF_CLIENT and the chain-pipeline variants, step-ledger rows of the host/prefill part
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 15:22:31 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d5fd270f81 Speed program: step ledger (every gap to vanilla per step of round and request), counts tool
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 15:05:58 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 92cffd3b97 Speed program: A/B variants for the side-stream parts (N, E, T and CUPTI CN/CE/CT), layer-phase and doorbell-latency analysis scripts
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 15:02:21 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 0c30105d42 Speed program: SIDE_MIXER QSA part (LELEKA_SM120_SIDE_QSA, experimental, off): indexer and query chains of each QSA layer on the two side streams
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 14:49:06 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 a310533186 Speed program: CUPTI kernel-level comparison LEL against VANL (67k window): the gap is the missing parallel branches in the verify graph
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 14:36:19 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b5b83c13ba prefill: pf_memstat.sh also samples PSI io and the engine's io counters
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 11:54:35 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d3481981bc prefill: pf_memstat.sh also samples PSI cpu and the engine's run-queue wait
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 11:54:04 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 5e0b2e5e38 prefill: pf_holder_window.sh and pf_holder_sparse.sh restart the lab holder with the sparse memfd and record the memory before/after; pf_van_window.sh restarts it sparse
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 11:14:41 +01:00
Pavlo Ratushnyi fea18c6413 Merge branch 'claude/single-copy-ram' into claude/prefill-latency 2026-11-09 11:13:46 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 9c77d603d7 single-copy RAM: refuse a full sealed memfd for a ple_only profile, lab holder seals sparse, design page
The 2026-11-09 server reading (Shmem 58.6 GB, MemAvailable 7-8 GB) is the lab holder's full 55.3 GB memfd
(single-copy-holder.sh sealed without --sparse-ple), not the sparse memfd of leleka up. The supervisor
now checks the allocated bytes (st_blocks) of an inherited descriptor against the profile and refuses a
ple_only profile on a full copy (LELEKA_ALLOW_FULL_MEMFD=1 overrides, logged); the holder script seals
--sparse-ple by default (HOLDER_MEMFD=full keeps the old form). Design, candidates and the ordered
measurements: docs/design/single-copy-ram-2026-11-09.md. No GPU/server run; identity/A-B pending.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 11:13:17 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 0a294bc73c prefill: pf_memstat.sh (host and engine-process memory counters per session), pf_van_window.sh (vanilla VANL window with the same counters); pf_codex_job.sh uses the sampler
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 10:55:33 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 8e66a516de prefill: pf_codex_job.sh keeps the whole-session profile lines (prof.log) and samples host memory counters every 0.25 s (memstat.csv)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 10:52:16 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 91481f04f8 prefill: pf_codex_job.sh, a full Codex session block of the prefill-latency package (own state and prefix; the engine environment per variant)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 01:50:48 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 9f1fb1878b prefill: pf_ab_job.sh variant LT (ladder with the bring-up trace)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 23:11:35 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 3ec79f9d98 Speed program: CUPTI kernel-window variants (ours CL, vanilla SPD_CUPTI) for the per-kernel comparison at 60-100k context
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 21:46:30 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 e7dde84ea9 Speed program: time-weighted hit-rate gap and gap by context from the real Codex sessions (ceiling of the hit-rate levers 1.8-2.6 % of task time)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 21:40:39 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 ae118cd9c3 prefill: pf_ab_job.sh checks the package checksums from pkg/bin (the names are relative)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 21:30:14 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 cac5802fe6 Speed program: spd_ab_job.sh takes SPD_BIN (a different binary for both arms)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 21:22:50 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 9d130fd380 Speed program decode misses: experimental LELEKA_ADAPT_TIE_SPREAD (equal-gain swaps share the per-round cap across layers), tests, variant X
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 21:20:18 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b2797d239f prefill: A/B driver for the fixed per-request prefill latency (own package, state and prefix; variants A/L/AR/LR/P/LP)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 21:02:44 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 53b1ed39bf Speed program: tier-policy screening variants W1-W4 and a complete unset list in spd_ab_job.sh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 20:50:11 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 6d782b0e15 Speed program levers 3 and 5: job script leaked the variant variables (first R and H pairs invalid, reruns queued); small-tail prefill profile: 72-80 % is moe.ring
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 20:14:29 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 9c984ba74b Speed program lever 3: variant G opened the same 12192 slots (null experiment); variant H (reserves lowered) queued
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 14:49:37 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 743f742b32 Speed program levers 4 and 5: the 106k draft subset is already bound in the product; fixed per-request prefill cost from the profile lines; variants Q and R queued
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 14:37:32 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 ede9542fd9 Speed program: per-request split of the real-session gap LEL vs VANL (no gateway cost: 85% decode, 16% prefill) and session_split.py
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 14:31:27 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b686f6ab75 STRA-338: rename the 854 mechanically named modules (impl_*, *_fn, *_<N>) after what they hold; mechanical_names census 854 -> 0
git mv of the files and of the module directories next to them, mod declarations, #[path] attributes and
the paths that name the modules, rewritten by scripts/dev/rename_mechanical.py from a reviewed name table.
Two files lost one to two lines so the 400-line limit holds again (qsa_prompt_index, original_verify_expert_probe).
limits-baseline.json: test fn_lines 0 -> 1 is --allow-increase for crates/deploy builtin_profiles.rs:149 (37 lines,
the speed-vs-strata session's file, not touched here); the prod params census falls 108 -> 1 (w_launch, extern C ABI).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 13:43:56 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 8def0e96e2 STRA-338: scripts/dev/rename_mechanical.py plans and applies the rename of mechanically named modules
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 13:26:16 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 1e258fe469 Speed program: lever 7 gate on n=7 (not passed on rounds), lever 6 result (no gain), lever 3 A/B variant G queued
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 12:31:48 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 812b82ff7e Speed program lever 1: final 10-pair A/B (+1.85% decode) and the frozen-placement identity job
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 04:10:45 +01:00