Commit Graph
126 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 7330ddb6d5 Merge branch 'claude/prefix-cache' into claude/port-gpu-bringup 2026-10-18 00:57:29 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 44e57ee30e docs(prefix-cache): final-policy agent trace (job 927), measured restore costs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 00:07:02 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 25538a8300 docs(prefix-cache): design, protocol, knobs, results (5090 jobs 921-926, laptop), remaining; 180k policy simulation; port-status row
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 23:54:47 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 dba10288dc fix(prefix-cache): a hit counts as shared evidence only on a branch point (histories fork below it), not because another session ran in between
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 22:12:25 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 5b4c817f60 docs: decode parity findings, flags and paired A/B (jobs 980-985)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 21:33:35 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 8af18396b8 feat(prefix-cache): pool protocol (summary through runtime gRPC, /v1/status, /v1/prefix_match), --prefix-cache-mib/--prefix-cache-block, laptop profile in the smoke, docs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 19:47:53 +02:00
Pavlo Ratushnyi 0b0d128fe2 Merge branch 'claude/deploy' into claude/port-gpu-bringup 2026-10-17 15:44:41 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 71a4f95991 docs: map deploy.md to charter goal G2
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 15:41:19 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 3c1d75ec37 docs: deploy.md results, findings and open items
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 15:38:47 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 b9fb5d0160 test(deploy): fake engine reports a refused load on its own stderr; summary hint for user units; ignore dist/
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 15:35:42 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 d70c1d8dca docs(serve): seed replicate on the merged base
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 15:26:49 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 e03d97dd86 fix(runtime): production Original Load admits the routed-expert bank; deploy: operation polling, expert-source profile field
The Original serve Load never admitted an expert source (the serve smokes call
load_resident_expert_source themselves), so the stack's prompt arena failed with
InputRead on the first real Load through leleka-inference. leleka-inference gains
--expert-source resident|mapped; backend.rs admits the chosen bank before the
driver. leleka up passes it per profile and the supervisor stops waiting when the
load operation is FAILED/INDETERMINATE.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 15:18:02 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 6e96c497a1 docs(serve): residency seeded from the prompt's routing (first-request A/B on the 5090 and the 3080 laptop)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 12:17:07 +02:00
Pavlo Ratushnyi f907a1bfdf Merge branch 'claude/ms-trim' into claude/port-gpu-bringup 2026-10-17 11:06:19 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 6050e8644a perf(serve): the refill queued inside the assembly is opt-in (LELEKA_REFILL_DEFER=on) until it has a GPU result
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 10:14:53 +02:00
Pavlo Ratushnyi ad1c047b10 Merge branch 'claude/prefill-kernels' into claude/port-gpu-bringup 2026-10-17 10:13:04 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 8c8ced060c docs(prefill): tier-on A/B
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 10:12:44 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 7c4b036384 docs: paired A/B of the step-cost trims, pcie_frac evidence
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 08:52:25 +02:00
Pavlo Ratushnyi 70bf2efe2e Merge branch 'claude/round-overhead' into claude/port-gpu-bringup 2026-10-17 08:52:12 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 1bd72a1a85 docs(serve): job 809, the unmodified Original on the port's corpus
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 08:51:58 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 935678805c docs(prefill): laptop A/B of the compute-stage kernels
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 08:23:23 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 f29d8ad400 docs(prefill): compute-stage kernel results (RTX 5090 job 961, laptop gates)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 08:23:13 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 c30cf5c38d docs: per-step host costs of the Original serve loop
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 03:16:20 +02:00
Pavlo Ratushnyi d777560c58 Merge branch 'claude/round-overhead' into claude/port-gpu-bringup 2026-10-17 02:47:39 +02:00
Pavlo RatushnyiandClaude Opus 5.5 7a113d1406 docs(serve): expert residency record (job 805: placeholder profile, static vs adaptive)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 01:56:37 +02:00
Pavlo RatushnyiandClaude Opus 5.5 858f42001e docs(serve): job 804 record (shared window modules, reverted executable reuse)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:13:51 +02:00
Pavlo RatushnyiandClaude Opus 5.5 499faec1ae perf(prefill): the chunk expert stream is EXPERIMENTAL and off by default
Job 0708 (same binary, LELEKA_PREFILL_STREAM A/B): with next-MoE copies
queued under the GDN batches the ring fell 1,108 -> 776 ms per 8192-token
chunk but the GDN windows grew by about as much (2,676 vs 2,730 ms per
chunk), and 2048-token chunks got slower (1,755 vs 1,410 ms). The
per-layer copy ring is the default again; LELEKA_PREFILL_STREAM=1 enables
the stream for experiments.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:03:18 +02:00
Pavlo RatushnyiandClaude Opus 5.5 a9f67649ee fix(serve): default --pcie-frac 0.55 only over a pinned expert bank
The 0.55 default (3e8e10e) also applied to the laptop's pageable low-RAM
mapped bank, whose PCIe share is DMA'd from pageable pages (the copy kernel
needs aliases): the coordinator's 3080 runs decoded at 6.66 tok/s against
~10-12 with 0. Unset, the share is now 0 for a pageable bank and 0.55 for a
registered one; an operator's LELEKA_ORIGINAL_SERVE_PCIE_FRAC applies as given.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 00:01:47 +02:00
Pavlo RatushnyiandClaude Opus 5.5 52e0911652 docs(prefill): paired laptop run against the Original (identical greedy outputs, prefill on par)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:03:28 +02:00
Pavlo RatushnyiandClaude Opus 5.5 cdf284c9c3 docs(serve): round-overhead A/B record (jobs 800-803)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:56:41 +02:00
Pavlo Ratushnyi ae269b8f14 Merge branch 'claude/port-gpu-bringup' into claude/prefill-throughput 2026-10-16 21:47:03 +02:00
Pavlo RatushnyiandClaude Opus 5.5 deff468321 docs(prefill): chunk-size rounding evidence, 8192-chunk breakdown, stream overlap and laptop findings
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:47:03 +02:00
Pavlo RatushnyiandClaude Opus 5.5 3e8e10ed5f perf(serve): default --pcie-frac to the Original's 0.55 with the copy kernel
Job 802 (RTX 5090, paired a/b/b/a, one binary, copy-kernel staging, expert
tier on, 6 prompts x 2 passes x 128 tokens): pcie_frac 0 decodes at 41.9 /
42.7 tok/s mean, 0.55 at 62.2 / 63.6 (+48%), TTFT unchanged (1214/1209 vs
1212/1207 ms). Placement differs between the two (PCIe experts run on the
GPU, which rounds differently from the CPU pool), so outputs differ as
documented for the tier; the tier itself stays opt-in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 19:20:53 +02:00
Pavlo Ratushnyi 8b544a7c5f Merge branch 'claude/port-gpu-bringup' into claude/round-overhead
# Conflicts:
#	crates/leleka-runtime/src/qwen_forward/original_serve_host.rs
#	crates/leleka-runtime/src/qwen_forward/original_serve_residency.rs
#	docs/original-serve.md
2026-10-16 19:19:48 +02:00
Pavlo RatushnyiandClaude Opus 5.5 219e32a211 diag(serve): profile graph capture vs instantiate time of the verifier and the MTP drafter
capture_owned sums its host time (capture, then instantiate + upload) per thread;
the serve profile reports record.capture/record.instantiate for the window and
commit graphs and mtp.capture/mtp.instantiate for the drafter's per-request
round programs. Docs: the verified-window publication order, the per-request
verifier analysis and the PCIe copy kernel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 17:40:17 +02:00
Pavlo RatushnyiandClaude Opus 5.5 d9313a95d3 test(driver): device proof of the PCIe span copy (staging layout and ptr2 rebase)
Root-only (LELEKA_VERIFY_WINDOW_GPU=yes): verify_fetch_spans_kernel and
verify_rebase_ptrs_kernel with pcie_stage's launch geometry stage five
experts' gate/up/down spans into staging slots exactly as the DMA path lays
them out and point ptr2[q] at each slot, leaving later table entries alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:27:26 +02:00
Pavlo RatushnyiandClaude Opus 5.5 447276fb42 merge: claude/prefill-throughput (row validation once per chunk, per-process expert scale check, prefill stager for mapped experts, PREFILL-PROFILE tracing)
5090, 16000-token prompt: 311 -> ~1435 tok/s at chunk 2048 (greedy tokens identical), ~2890 tok/s at chunk 8192.
Laptop RTX 3080 (mapped experts): prefill 0.7-3.1 -> 4.5-9.4 tok/s, identical output. Default chunk stays 2048.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:46:01 +02:00
Pavlo RatushnyiandClaude Opus 5.5 ef06b77ad9 docs(prefill): mark the GDN state staging as a likely, unmeasured cause
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:45:32 +02:00
Pavlo RatushnyiandClaude Opus 5.5 125f7820fb docs(prefill): profile, fixes and before/after prefill numbers (RTX 5090, RTX 3080 laptop)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:45:25 +02:00
Pavlo RatushnyiandClaude Opus 5.5 59c9102cd5 merge: claude/conversation-cache default on (--prompt-cache 6 as in the Original), coverage smoke and chunk-aware equality checks
Job 413: cancellation, periodic/root/turn checkpoints, reread mode and fallbacks pass; resumed requests are token-identical
to full reads whenever both cut the prompt at the same chunk boundaries (near-tie flips otherwise, as in the Original).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:08:48 +02:00
Pavlo RatushnyiandClaude Opus 5.5 75930fb8a1 docs(serve): conversation cache on by default; coverage (jobs 412/413) and the chunking finding
Resumed requests are token-identical to reads that cut the same prefill chunks;
different chunks (a resume point, a root boundary only cut from 0, cache on vs off)
can flip a near tie, as in the Original. The stack is deterministic within and across
processes for identical inputs and chunks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 15:08:22 +02:00
Pavlo RatushnyiandClaude Opus 5.5 3e05437bf2 merge: claude/laptop-profile (RTX 3080 laptop: mapped experts instead of a 50 GB RAM copy, KAR read-only file source, resident RAM budget, regenerated sm_86 resolver image, paired bench harness, docs/laptop-profile.md)
Laptop numbers (indicative, 3 prompts x 2): Original decode 8.15 tok/s / TTFT 7.2 s (KAR PLE), port 2.70 tok/s / 28.4 s;
both bottlenecks (serial CPU expert preparation, prompt-path expert copies) are being fixed on claude/pool-zero-copy and
claude/prefill-throughput. model-format now denies (instead of forbids) unsafe code for one audited mmap owner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:10:56 +02:00
Pavlo RatushnyiandClaude Opus 5.5 cfd80e9452 docs: laptop profile (memory map, the Original's low-RAM modes, port gaps, paired laptop numbers)
docs/laptop-profile.md: what lives in VRAM / RAM / NVMe on the RTX 3080 Laptop 16 GB + 48 GB machine for the
Original and the port, why both GGUF shards are strictly needed, the WSL2 cgroup bug that keeps the Original's
resident modes off there, the port's gaps and what this branch adds, and the measured arms (n = 6 each):
unmodified Original 8.15 decode / 12.4 prefill tok/s / TTFT 7.2 s vs port 2.70 / 3.1 / 28.4 s on the same
token IDs and KAR PLE; traced: all port decode time is in run_window (~1.0 s per verify window).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 13:08:44 +02:00
Pavlo RatushnyiandClaude Opus 5.5 e6d3d09a99 docs(serve): conversation cache real-model run (job 411)
Cache off and on, same requests: the resumed chat B (reused 2297 of 2364) produced
the same 38 greedy tokens as B read from 0; TTFT 1645.6 ms vs 10330.8 ms; a new chat
sharing the system prompt resumed from the root checkpoint (reused 2286, TTFT
983.3 ms). One sample per cell; the cache stays off by default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 12:55:09 +02:00
Pavlo RatushnyiandClaude Opus 5.5 27c8ddf6b5 docs(kv): the 40000-token real-model run (job 312) and the multi-chunk publication fix
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 12:41:22 +02:00
Pavlo RatushnyiandClaude Opus 5.5 88baa91c2f merge: claude/port-gpu-bringup (kv streaming, conversation cache, sm86) into claude/expert-residency
The stack keeps every behaviour: KV format/resident config, conversation resume
with periodic/turn/root checkpoints after each published chunk, and the expert
tier. prefill_phase waits the swaps in flight, runs the conversation-aware
chunk loop (prefill_actions), and refills every lent slot on every exit path;
prefill_chunk borrows the cache's last slots for that chunk only (so the
conversation checkpoints between chunks see the whole stack) or uses the
stack's own buffers. Backend wiring keeps kv/kv_resident/conversation and the
expert tier; the driver keeps the sm86 and expert-tier-probe features; the
smoke keeps the LELEKA_SMOKE_REPEAT timing loop and adds the tier report.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:04:46 +02:00
Pavlo RatushnyiandClaude Opus 5.5 9ea8e88529 merge: claude/conversation-cache into the bring-up branch (with claude/kv-streaming)
Conflicts resolved by keeping both features: StackConfig/OriginalServeOptions carry kv_format/kv_resident and the
conversation config; leleka-inference accepts --kv/--kv-resident and --prompt-cache/--prompt-cache-every/
--prompt-cache-root/--turn-token (fixed a lost offset increment after --kv-resident in the merged parser); the smoke file keeps
both the long-context KV test and the conversation-cache test; the ensure_resolver test follows the 5-tuple
window_kv_addresses of the KV branch. Workspace type-checks (WSL, --all-targets).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:58:39 +02:00
Pavlo RatushnyiandClaude Opus 5.5 2262072206 merge: claude/kv-streaming into the bring-up branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:56:28 +02:00
Pavlo RatushnyiandClaude Opus 5.5 d064b9d89e docs: the Original serve stack's VRAM expert tier, switches, deviations and proofs
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:54:46 +02:00
Pavlo RatushnyiandClaude Opus 5.5 6917f7c704 chore(bring-up): register the KV GPU proofs in the qsa smoke group and regenerate the smoke table
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:54:29 +02:00