Commit Graph
195 Commits
Author SHA1 Message Date
Pavlo RatushnyiandClaude Sonnet 5.5 5dacd41fca chore: add laptop-turbo.ps1 to prepare the laptop for measurement runs
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-typecheck (push) Failing after 8s
Rust port / port-fast (push) Failing after 8s
Rust port / port-oracles (push) Failing after 11s
Rust port / port-linux-tests (push) Failing after 13s
Linux / verify (push) Failing after 16s
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
Activates the ASUS Turbo scheme, turns off sleep/hibernate/display-off/lock-display-off on mains power and prints the GPU power limit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 02:32:17 +01:00
Pavlo Ratushnyi f02ec7b487 Merge claude/upstream-rest (diagnostics and analysis so far) into main 2026-10-28 00:46:26 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4a0e46ce12 scripts/upstream-rest/gap_anatomy.py; plan: GPU idle-gap anatomy of a steady 8192 chunk (CUPTI): 21.7 % idle, host work between phases, launch latency 0.9 %
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 23:39:13 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d84d465ff9 scripts/profile: h2d_max_probe (PCIe 5.0 x16 host-to-device ceiling: streams, copy size, source kind, SM copy kernel)
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-fast (push) Failing after 9s
Rust port / port-typecheck (push) Failing after 9s
Rust port / port-oracles (push) Failing after 14s
Rust port / port-linux-tests (push) Failing after 18s
Linux / verify (push) Failing after 21s
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
Measured on the 5090: 51.0 GB/s cudaHostAlloc 8-64 MiB, 51.8 GB/s THP + register 8 MiB, extra streams add nothing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 22:35:56 +01:00
Pavlo Ratushnyi 83822b0857 Merge claude/laptop-vs-vanilla (decode: skip the page-touch prefetch pass on Windows) into main 2026-10-27 22:35:52 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 9e33932c5d CPU misses: skip the page-touch prefetch pass by default on Windows (+21.6 % decode at 233k context, interleaved A/B)
The pass (PrefetchVirtualMemory on 3 ranges per missed expert, then a touching phase) ran before the compute and took 70-75 ms of a
165 ms window; the compute faults the pages in itself, overlapped with its work. LELEKA_CPU_PREFETCH=on|off, and
LELEKA_CPU_PREFETCH_OFF_FILE / LELEKA_NO_TRIM_FILE for A/B inside one engine. scripts/e2e/decode_ab.py: decode-only A/B at depth.
docs/laptop-vs-vanilla.md section 7.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 22:35:31 +01:00
Pavlo Ratushnyi 387f5cbd63 Merge claude/upstream-rest into main
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-typecheck (push) Failing after 9s
Rust port / port-oracles (push) Failing after 13s
Rust port / port-linux-tests (push) Failing after 16s
Rust port / port-fast (push) Failing after 9s
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
2026-10-27 22:11:02 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 31d1657cbf docs/upstream-port-plan.md: results of rows 2.4/2.5 and the 256k gap to vanilla (per-layer slot sizing, decode +17 %); scripts/upstream-rest/turns.py
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 20:56:15 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 6d75dcddd9 tests: wide top-k selection rule, cluster asset pin, decode-shaped identity cases down to the identity branch, decode scores timing; scripts/upstream-rest/arm_prof.py; plan analysis of rows 2.4/2.5
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 09:20:23 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4ace54b773 cuda-driver: wide top-k for long prompt tiles and a decode top-k on a thread-block cluster (upstream 586367cb, d05d26e9, row 2.5), both opt-in
leleka_qsa_topk_wide (also _sample/_wide_failed, measured and not used) in qsa_late.cu; leleka_qsa_topk_cluster in the new sealed asset qsa_cluster.cu (sm_90+,
no sm_86 companion); cuLaunchKernelEx plumbing for KernelModule and the verifier window (Launch.cluster); policy.qsa.cluster_topk. Same ids as qsa_topk_ref in
every model-free case (continuous, heavy tailed, tied, all equal; prompt tiles of 256 rows and decode calls of 1..5 rows up to 261,500 tokens).
LELEKA_QSA_TOPK=wide (prompt, from 10,000 blocks) and LELEKA_QSA_CLUSTER=1 (decode window) switch them on; defaults off until their R gate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 08:52:15 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 13c342eef7 gpu-bringup: reseal_own.py re-seals one of our own already-sealed PTX assets after its .cu changed (seal_pins.py refuses a pinned asset)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 08:52:14 +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 c40531f071 e2e: long_session cuts the last file of a turn to the budget (a whole file overshot the 256k context)
Rust port / port-fast (push) Failing after 12s
Rust port / port-typecheck (push) Failing after 12s
Rust port / port-oracles (push) Failing after 13s
Rust port / port-linux-tests (push) Failing after 18s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 06:04:19 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b145a3d261 e2e: long_session records a hash of each reply so two configurations can be compared
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 01:31:45 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 63e496a8df e2e: long_session cuts its last turn to fit under the engine context
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 00:19:53 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 beea1b42a9 Merge claude/upstream-p0 (plan rows 0.1-0.5, 1.1, 1.2) into claude/port-gpu-bringup
The sealed chain_window assets conflicted: bringup sealed a new chain_window.ptx (entry chain_gr_down_t2w8_nb4, c9ccd81) while upstream-p0
clamped the q8_1 scale and sum in the opt-in chain swiglu+quantize entry (4654f01, plan row 1.1). Resolved from the bringup sealed file:
only chain_swiglu_quant_kernel was replaced (scripts/q8/splice_ptx.py), every other byte stays as sealed; the entry text is byte for byte what
scripts/q8/rebuild_quantizer_ptx.sh compiles from the merged chain_window.cu (nvcc 13.2.86, checked on the server).

Regenerated, not merged by hand: the pin in original_verify_window_chain.rs (scripts/q8/repin.py), and the sm_86 companions, MANIFEST.json and
sm86_table.rs (scripts/gpu-bringup/sm86_assets.py build: 132 companions, check OK). The six other quantizer PTX and their companions equal
upstream-p0's. docs/upstream-port-plan.md: rows 0.1-0.5, 1.1, 1.2 from upstream-p0, row 0.6 from bringup, merge note on row 1.1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 23:19:55 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4654f01b15 q8_1 scale and sum stay finite in the sealed quantizers (plan 1.1; upstream 2b726ba6, f6601bf8, 7a0e3023, e372d4ff)
A q8_1 block stores d = amax / 127 and the sum of its 32 activations as fp16: one massive activation (amax > 8.3 M, or a sum past 65504)
rounded to inf and the dot products then read inf * 0 = NaN (NonFiniteMmqOutput here, "!!!!" upstream). The quantizers now clamp both
to the largest finite half and keep the codes inside int8 (strata/kernels/q8_1_finite.hpp); a NaN input still gives a NaN sum.
Finite blocks are stored bit for bit as before.

Sites: head_quant (mtp_original_full_head_native, native_head_native), mtp_original_quantize (mtp_original_tail, mtp_original_full_checks),
quantize_q8_1_kernel (mtp_original_full_head_iq, native_head_iq: the routed experts' input and SwiGLU output) and the opt-in chain
swiglu+quantize (chain_window). Not taken: the MMQ prompt quantizers (ggml quantize_mmq_q8_1, mtp_prefill_q8), which upstream did not clamp.

The sealed PTX are patched entry by entry (scripts/q8): three were built with CUDA 13.0.88, which is not installed, and a recompile
renames the hashed anonymous-namespace entries; only the quantizer entries change, every other byte is the sealed one. Pins, the seal
plan digests and the sm_86 companions (sm86_assets.py build) follow. tools/q8-probe compares old and new PTX on the GPU.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 18:27:20 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 89215e83d2 Check that no parity harness trusts a --dump-logits header; add an offline size-based reader guard (plan 0.2; upstream 504579da)
No harness of ours reads the Original's logits dump (they use STRATA_LOGPOS rows, residual dumps and token outputs); the manual recipe in
docs/gpu-bringup.md now says to check the file first, because the pinned reference build predates the fix and writes a lying header on
native packs. scripts/quality/logits_dump_check.py refuses such a file.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 17:21:34 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 2e71fcd46b docs: 256k-class agent session on the 5090 (TTFT 27-39 s, decode ~105 tok/s at depth)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 14:26:53 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 68e1eb3000 e2e: long single-conversation session driver for 256k tests (streamed TTFT, decode rate, cached tokens per turn)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 12:02:11 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b175119cba dev: worktree helper skips the main checkout by position
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 01:29:54 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 02efe052e4 dev: worktrees live in .git/wt, with a helper to create and clean them
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 01:29:44 +01:00
Pavlo Ratushnyi c558cdb755 Merge branch 'claude/perf3' into claude/port-gpu-bringup
Rust port / port-fast (push) Failing after 8s
Rust port / port-typecheck (push) Failing after 8s
Rust port / port-oracles (push) Failing after 9s
Rust port / port-linux-tests (push) Failing after 15s
2026-10-25 17:52:29 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 885bfb457e docs/windows.md: measured outcomes of the real runs on this laptop (WSL2 bridge and native engine), findings, fixes; stage-model.ps1 drops the robocopy progress when redirected
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 17:04:05 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 8623932c98 Windows round 2: leleka service (Task Scheduler / user unit), doctor names what is missing and the fix, stage-model.ps1 and fetch-cublas.ps1, native supervisor end-to-end test with the fake runtime, WSL find-binary fix, docs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:53:31 +01:00
Pavlo Ratushnyi 3f6720f235 docs: pending gates; cmp_rhash.py 2026-10-25 14:07:18 +01:00
Pavlo Ratushnyi 05042010db ladder off by default until its gate runs; tiled-down geometry helper and test; replay arm flags tiers/notiers; job scripts on rt-a7 2026-10-25 13:57:24 +01:00
Pavlo Ratushnyi 61ac91eaef loan ladder: tier_for helper and test 2026-10-25 13:49:34 +01:00
Pavlo Ratushnyi 38d03f0f7c docs/prefill-throughput: late-chunk QSA selection results 2026-10-25 13:46:13 +01:00
Pavlo Ratushnyi c9ccd81856 chain: hyper-connection down projection tiled over rows and tokens (8 rows x 2 tokens per block): 16.6 -> 9.7 us at 4 rows, bit-identical; probe diagnostics; sealed chain_window.ptx 2026-10-25 13:34:33 +01:00
Pavlo Ratushnyi 4965126d14 Merge branch 'claude/windows' into claude/port-gpu-bringup
Rust port / port-fast (push) Failing after 10s
Rust port / port-typecheck (push) Failing after 10s
Rust port / port-oracles (push) Failing after 16s
Rust port / port-linux-tests (push) Failing after 22s
2026-10-25 13:15:34 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 e77c98d3f2 Windows: release build recipe (scripts/windows/build-release.ps1), engine tests follow the mapped-only default, Linux-only errno and journal-lock tests gated
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 12:57:21 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 87e2633afe engine/strata: bring the Strata subtree to upstream 41cf05a0 (engine 0.1.50) with the local patches re-applied
Documented tree replacement (the history has no git-subtree metadata): 3-way merge of the old subtree
(570201a:engine/strata) against upstream 41cf05a06a25dd29103b7b27a2279a3f60c21876 (2026-10-25), merge base =
the old pin d9ab8435 (tree-identical to upstream 5b734e42; d9ab8435 is not an ancestor of upstream main).

Local patches re-applied by hand where they conflicted (15 files): STRATA_CUDA_STATIC profile, experimental KAR
experts and KAR PLE arms, keyless V-only arm (now beside upstream's K8V4 hybrid KV and fused norm+rope). Details,
conflict table and left-out files are in docs/upstream.md.

Left out (weights, captures, logs, media): new bench/results (2022 files), binary media and app assets (61),
docs/work/evidence (24), *.bin / *.gguf data files, and the 7 files the first import already left out.

scripts/build-cpu.sh: build the 11 CPU tests upstream registered since the old pin (they ran as "Not Run").
Checked: build-cpu.sh 16/16 ctest in WSL; sm_86 CUDA objects of the patched files compile, also with the KAR
macros on. No GPU run, no quality gate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 12:49:15 +01:00
Pavlo Ratushnyi acc228e427 prompt loan ladder: chunks of at most 512 / 2048 rows borrow (and refill) fewer expert slots than the full-capacity loan; replay arm flag 2026-10-25 12:26:44 +01:00
Pavlo Ratushnyi 7992cd21a7 qsa-late: pin test; GR down variants with R rows per warp (probe), perf3 job scripts 2026-10-25 12:23:06 +01:00
Pavlo Ratushnyi 9252a130bf replay: per-arm prefill chunk and grid (mode@CAP[/BLOCK]) 2026-10-25 12:05:07 +01:00
Pavlo Ratushnyi 21ed9fd0d9 qsa-late: faster prompt QSA selection kernels for long positions (imported from the claude/qsa-late worktree), sm86 guard, seal-plan entry 2026-10-25 11:59:30 +01:00
Pavlo Ratushnyi c3d4cce4e6 Merge branch 'claude/adaptive-spec' into claude/port-gpu-bringup
# Conflicts:
#	crates/leleka-runtime/src/backend_original_serve_replay.rs
#	crates/leleka-runtime/src/backend_original_serve_smoke.rs
#	crates/leleka-runtime/src/qwen_forward/original_spec_controller.rs
2026-10-25 02:51:11 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 cf7a62e69d q_tail_gate: judge the tail arms against a chunk-cut control as well as the Original envelope
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 01:41:18 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 ba9474b9b0 replay: LELEKA_REPLAY_FORCE teacher-forces every request along its recorded tokens; scripts/quality/q_tail_gate.py compares the tail-checkpoint arms against the grid-only arm
Rust port / port-fast (push) Failing after 8s
Rust port / port-typecheck (push) Failing after 8s
Rust port / port-oracles (push) Failing after 14s
Rust port / port-linux-tests (push) Failing after 19s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 23:11:06 +02:00
Pavlo Ratushnyi 897f2aa476 Merge branch 'claude/chain-kernels' into claude/port-gpu-bringup 2026-10-24 20:54:12 +02:00
Pavlo Ratushnyi 1344cd807d Merge branch 'claude/e2e' into claude/port-gpu-bringup 2026-10-24 11:03:25 +02:00
Pavlo Ratushnyi b06de93dbc docs/e2e: complete reference-config Codex sessions (943d, 945d); run-codex.sh does not fail when the browser checks run elsewhere 2026-10-24 11:03:12 +02:00
Pavlo Ratushnyi 04b2b038b0 Merge branch 'claude/e2e' into claude/port-gpu-bringup 2026-10-24 06:47:48 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 e5924c1099 fix(runtime): scalar draft-KV fallback checks its weights against the retained MTP owner, not the MoE cache
With --mtp-rt-dir the retained MTP weights come from the RT bank, whose buffers are not the pinned pack's MoE-cache matrices, so the pointer
identity check of record_original_scalar_draft_kv always failed (InvalidProjectionShape -> CudaExecution -> response.failed) on every
prompt that takes the short-tail scalar fallback (first request of a Codex session; a resumed prefix with a tiny tail). Found by the reference-config
Codex reruns 943c/945c, which died on it; the first 23 requests of 945c decoded at 138.8 tok/s weighted.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 05:08:48 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 beafc0a6bc spec: adaptive window is the default of the serve stack (LELEKA_SPEC_ADAPTIVE=off or LELEKA_SPEC=N selects the fixed window); default check job
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 02:20:02 +02:00
Pavlo Ratushnyi acabd3fc82 Merge branch 'claude/cp-latency' into claude/port-gpu-bringup 2026-10-24 02:00:07 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 254425d4b0 cp-latency: results and method (docs/cp-latency.md), run-ab.sh, replay --store
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:59:27 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 ea80310017 cp-latency: schema-validation memo, live A/B client and report, live job 9f1 (real engine, baseline and current API servers on one engine)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:45:54 +02:00
Pavlo Ratushnyi 88f74a323d Merge branch 'claude/deploy' into claude/port-gpu-bringup 2026-10-24 01:44:35 +02:00