Commit Graph
2317 Commits
Author SHA1 Message Date
Pavlo RatushnyiandClaude Sonnet 5.5 d00ade5ed9 ledger: job-name map for the group A/B, check-merge proof and switches identity jobs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:24:16 +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 afbd38bfaf ledger: rows O8 and K13 for LELEKA_DRAFT_CHECK_MERGE (fixing, identity and section delta pending), job names
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:19:32 +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 fa21dfd34d revert the ladder-profile deploy test files swept into the merge (they wait for the ladder A/B; patch kept)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:18:02 +01:00
Pavlo Ratushnyi a4a8d597fe Merge branch 'claude/host-decode-graph-reuse-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:17:14 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 2e7658567d ledger: Q7 status (code 3e68def28, switch, identity and section delta pending)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:16:24 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 3e68def28e decode graph reuse (Q7), part 1: LELEKA_DECODE_GRAPH_REUSE (off), key and policy tested on the lifecycle fake, shared-expert pin and weights epoch; assembly borrow and re-arm API documented as blocked
DecodeGraphKey (shape, tier, pcie mode, cluster top-k, weights and owners epochs) and GraphReuse hand a kept assembly out only for an equal key after Reusable::rearm accepted the new request's seed; anything else retires it and records. The lifecycle fake bakes key and seed into its graph set and fails a stale replay: kept and re-recorded sets give the same text, each key input forces a re-record, a refused re-arm and a failed request do not replay. MoeWeightCache gets pin_for_window / unpin_window / weights_epoch (not wired). With the switch on, open states that the stack cannot keep the graphs yet; every request records as before.

Not done: the assembly still borrows the stack (needs handles instead of &'a DeviceBuffer in original_verify_window_{moe,gr,proj,qsa}), the QSA owner loan and the MTP binding follow it, and the verify bank's re-arm API is the speed session's. Exact changes in docs/experiments/decode-graph-reuse.md. No speedup claim.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:16:19 +01:00
Pavlo Ratushnyi 0c2314677c ledger: job-name map for the parking identity and profile job 2026-11-09 23:09:09 +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 Ratushnyi 7a549b68e4 Merge branch 'claude/prefill-prefix-park-fast' into claude/prefill-latency
# Conflicts:
#	docs/experiments/step-ledger.md
2026-11-09 23:06:31 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 e65cbe9149 ledger: row B3 fixing (code a88a77b25, LELEKA_PREFIX_PARK_FAST and LELEKA_PREFIX_PARK_ASYNC), the listed spans are nested
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:05:33 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 a88a77b254 prefix cache: LELEKA_PREFIX_PARK_FAST (cheaper export, same bytes) and LELEKA_PREFIX_PARK_ASYNC (end-of-decode checkpoint after the response), both opt-in
PARK_FAST (typed setting prefix_park_fast, off by default). The export of a parked block read the 12 resident layers with one context synchronize per layer, a fresh zero-filled buffer per K/V span (resize(n, 0) before the copy overwrote every byte) and, for the index rows, a zero-filled buffer plus a zero-filled staging plus a second copy. With the switch on, the executor drains the context once per park and the layers read with export_pages_fast (copy from the mapped host image into the unzeroed spare capacity of the vector, exact_fill::fill_exact, length set only after every byte was written) and export_rows_fast (the completed device-read staging is the result: DeviceBuffer::copy_to_range_owned). Same source bytes, same layout, same sizes, same poisoning rules; the reference methods are unchanged. New profile spans: prefix.export_drain, export.copy_fast, export.index_copy_fast.

Not done for PARK_FAST: pooled buffers (the parked vectors are retained by the prefix store, so a fresh allocation per park is inherent; only evicted blocks could be recycled, which would need a store free list) and copying the 12 layers on threads (the context and the layers are Rc/non-Send; a Sync view of the mapped image would be needed).

PARK_ASYNC (typed setting prefix_park_async, PrefixConfig::defer_decode_tail, off by default, only with --prefix-cache-tail reply). after_decode records the tokens and the kept prompt-end limit and returns ChunkOutcome::Deferred; the owner loop runs OriginalServeStack::prefix_after_response right after the terminal event of the request and before the prefix summary is published. Nothing runs on the device between the end of the decode and that call (the owner thread is the only user of the stack and the deferred call is the next thing it does), so park_session, park_block and park_tail see the state after_decode saw and the parked bytes and store content are the same; a begin or invalidate that comes first drops the pending checkpoint. The profile sections of the deferred part are reported on their own DBG profile park_deferred line. Not deferred: after_prefill and after_chunk. They park cells of the last page that the decode overwrites (past the checkpoint end) and the recurrent state the decode advances, so parking them later would change the bytes.

Tests: settings default off and exact words, fill_exact equals the zero-filled copy, short or failed fill leaves the vector empty, deferred checkpoint equals the immediate one (outcome, nodes, blocks, bytes, live claim, resume of the next turn), pending dropped by begin and invalidate, nothing deferred with tail off or bypass; GPU-ignored tests of export_pages_fast and export_rows_fast against the reference exports added to the journal round trips.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:05:04 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 cca8f3cbab ledger U4/U5: proved-equal by the speed session's read-through
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:03:58 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 15fea581a7 ledger O7: timeline from verify end to the first draft kernel (CUPTI LEL vs VANL, PROFILE host spans)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 23:03:21 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 11bdb54666 prefill: the MMQ identity row table gets the stream-k fixup's over-read margin (ledger U3, upstream f225844d1); results unchanged
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:57:41 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 79a7d5ed05 ledger: upstream items U1-U5 (GDN tensor-core scan, batched PLE, MMQ row-table margin, flag B, adaptive-copy range) checked against our port
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:53:13 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4130f9c366 decode graph reuse (Q7): design note; cause is ownership, needs a re-arm API in the verify bank
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:51:07 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 7f2612cd42 ledger: rows of the host/prefill part labelled by meaning, queued jobs renamed (job-name map), vanilla probe removed
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 21:54:32 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d87d1384fd profile: sub-spans of the prefix-cache KV and index export (sync, allocation and zero fill, copy)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 15:25:25 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 9ab391e8dc ledger: rows A1-A3, Q1, Q4-Q5, O9 updated and B3-B5 added for the host/prefill part (one register)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 15:23:24 +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 1ab37e4082 decode: LELEKA_DRAFT_CHAIN_PIPELINE (opt-in): the MTP chain steps of a greedy draft with min_p 0 are enqueued back to back and read after one stream drain
The sequential chain pays a stream sync, two synchronous flag reads, the cell record write and the graph launch between every two steps (about 114 us x 2.4 steps per round in the CUPTI window of request 29). With min_p 0 the depth is known up front, the cell records are static and the token of step j reaches step j+1 on the device, so the steps are enqueued behind the round graph and the host reads once. The step graphs of this path (OriginalGraphKey::MtpChain) are recorded without the tail flag reset and the prefix status reset, so a numerical fault of any step stays set until the single flag read after the last step. Same kernels in the same order; typed setting draft_chain_pipeline, policy field chain_pipeline, off by default.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 15:11:58 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 3faad53b60 Speed program: step ledger reordered along the request pipeline (request, prefill, decode round)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 15:07:08 +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 255159a89b Speed program: shared expert on a side stream (LELEKA_SM120_SIDE_SHARED, experimental, off); SideBranches DTO for the three side-stream parts
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 14:56:05 +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 4a633f70df Speed program: lever 3 variant H clean paired result (e2e +1.06 %, not significant)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 01:15:06 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 a6d1a19786 prefill: the copy ring accepts a schedule with more slot events than the arena ring (the 512-row loan rung carves the 8-slot ring; its chunks failed with InvalidProjectionShape)
The persistent OriginalMmqCopySchedule is opened with the full prompt layout's ring (384 events); Ring::new demanded schedule.ring_slots() == arena slots.
Slot i is i % arena slots, so the surplus events stay idle.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 00:08:39 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d2108576a8 Speed program: lever 5 variant R clean paired result (e2e +0.56 %, not significant)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 23:43:25 +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 6d955f88dc Speed program: kernel-level status of the vanilla sm_120 set and the remaining missing items with estimates; CUPTI windows queued
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 21:47:12 +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