Commit Graph
497 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 8daba240d7 Merge branch 'claude/port-gpu-bringup' into claude/decode-parity
# Conflicts:
#	crates/leleka-runtime/src/qwen_forward/original_serve_residency.rs
2026-10-17 21:31:37 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 42f1edaf70 perf(serve): CPU leg: validated spans of admitted experts are reused without the per-expert source scope (LELEKA_OPEN_CACHE=off controls); spans inside the CPU leg
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 20:49:43 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 6b94e7c14f perf(serve): prompt-routing seed is on by default when the tier config is read from the environment (LELEKA_ORIGINAL_SERVE_SEED=off disables)
Operator decision: long-running agent sessions; a fresh process starts from the prompt's own routing. Measured first-request gain: docs/original-serve.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 18:31:11 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 a21198c5d9 perf(serve): DMA flag B / batch fall back to the plain calls when the driver refuses them; both opt-in on WSL
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 17:31:49 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 5c8e9d91ca perf(serve): PCIe staging by DMA is the default (one batched submit, stream-write flag B); the copy kernel is --pcie-mode kernel
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 16:29: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 05d189f006 chore: executable bit on install.sh and package-release.py
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 15:41:32 +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 361220b89f feat(deploy): --trust-archive, archive step covers shard verification, test robustness
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 15:00:20 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 5bc008122b feat(deploy): API bind, --kar-fd, release packaging, install.sh and OCI recipe
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 14:42:17 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 d84e1a12c9 feat(deploy): leleka up/run - preflight, profiles, assets, install, supervisor, readiness
New crate leleka-deploy (binary leleka): idempotent one-command deployment with
preflight (driver, sm_120/sm_86, VRAM/RAM/disk, WSL2, cuBLAS 12, memfd), memory
profiles, plan/dry-run, stamped asset steps, systemd unit, and a native supervisor
that seals the KAR archive itself and hands it to the engine (no Python holder).
leleka-inference gains --kar-archive-file for the low-RAM read-only archive form.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 14:34:49 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 b11f1ba45c profile: GPU time of the MTP chain-step graphs (events, LELEKA_SERVE_PROFILE)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 14:28:48 +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 RatushnyiandClaude Sonnet 5.5 7e29683890 Merge branch 'claude/port-gpu-bringup' into claude/seed-residency
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 11:43:20 +02:00
Pavlo Ratushnyi 2324e20a07 fix: PcieAuto level pattern 2026-10-17 11:19:14 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 d3bd1460f1 perf(serve): online hill-climbing controller of the PCIe share (LELEKA_PCIE_AUTO=on, off by default)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 11:18:40 +02:00
Pavlo Ratushnyi b76b1a45b0 Merge branch 'claude/port-gpu-bringup' into claude/decode-parity
# Conflicts:
#	crates/leleka-runtime/src/qwen_forward/original_serve_stack.rs
2026-10-17 11:16:50 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 5e0bd84901 fix: drop duplicate read_at left by the ms-trim and prefill-kernels merges
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 11:07:27 +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 30e67ff8d2 diag(serve): LELEKA_SEED_TRACE coverage of the decode routing by the starting set, the prompt's top experts and the oracle
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 10:50:21 +02:00
Pavlo Ratushnyi 2fc28499c9 Merge branch 'claude/port-gpu-bringup' into claude/decode-parity 2026-10-17 10:26:14 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 a447ff021d perf(serve): adaptive-tier tuning knobs (LELEKA_ADAPT_MIN_COUNT/_MARGIN/_DECAY, defaults are generate.cpp's constants)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 10:26:07 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 6a0ad463c6 perf(serve): CPU worker count and bank THP experiment knobs (LELEKA_ORIGINAL_SERVE_CPU_WORKERS, LELEKA_BANK_THP=on), off by default
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 10:24:47 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 095dd67bba perf(serve): alternative PCIe staging copy kernels with several loads in flight (LELEKA_PCIE_KERNEL / LELEKA_PCIE_GRID, off by default)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 10:22:03 +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 RatushnyiandClaude Sonnet 5.5 25b3e3284a perf(serve): DMA staging in one driver entry per group, optional cuMemcpyBatchAsync and stream-write flag B (LELEKA_PCIE_DMA_MANY/_DMA_BATCH/_FLAGB, all default as before except one entry per group)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 10:14:46 +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 a7dccb17ee perf(serve): decode-parity instrumentation (round T/accepted counters, per-request tier line, GPU stage stamps report)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 10:00:12 +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 c585f27b2f fix(serve): restore the starting placement slot for slot between experiment requests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 08:32:37 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 073790dc98 feat(serve): seed decay over prompt chunks, long-context text file, prompt-id corpus arms
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 08:30:14 +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 3e00018f47 perf(serve): queue the lent-slot refill after the intake uploads and before the graph capture
The refill DMA (1.4 GB, ~40 ms) otherwise held back the decode phase's small synchronous uploads (PLE seed) on the copy engine; now it overlaps the ~75 ms host-side capture.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 05:38:43 +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 RatushnyiandClaude Sonnet 5.5 931e8563c4 feat(serve): seed the VRAM expert tier from the prompt's own prefill routing (experimental, LELEKA_ORIGINAL_SERVE_SEED)
The MoE prompt stage already reads the routed expert ids on the host to group rows by expert; collect the per-expert row counts
(no device work) and, at the end of the prompt phase, swap the most-routed missing experts into the VRAM slots in one batch
queued on the tier's copy stream (same ranking as the adaptive tier). Off by default.

Also: first-request A/B arms (static/adaptive x seed on/off, tier reset between requests) for the corpus, long-context and
laptop smokes, per-round hit-rate marks, and unit tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 02:58:12 +02:00
Pavlo Ratushnyi 5da8f13165 Merge claude/port-gpu-bringup (d777560) into claude/ms-trim 2026-10-17 02:57:09 +02:00
Pavlo Ratushnyi 14eeb39865 Merge branch 'claude/port-gpu-bringup' into claude/prefill-kernels 2026-10-17 02:55:52 +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 Sonnet 5.5 fc12844537 perf(prefill): GDN chunk starts from the mirror's device state when it holds the prior; more PLE reader threads
LELEKA_PREFILL_GDN_MIRROR=0 keeps the canonical host upload. Final residual of every row bit-identical (PREFILL-R gate) on the laptop.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 02:13:46 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 24000a38b5 perf(prefill): batched input staging, folded finite guards, element-parallel dequant, fast finite checks
- KAR PLE rows of a whole chunk are resolved to cache slots on the host (parallel pread of the misses) and decoded by one kernel straight into the arena; each distinct token embedding is decoded once and broadcast to the four residual streams on the device (LELEKA_PREFILL_STAGED_INPUT=0 keeps the per-token path).
- GR read/inject and GDN chain guards ride on their producer kernels; GDN/QSA weight dequantization is one thread per element (LELEKA_PREFILL_FUSED_SCANS=0, LELEKA_PREFILL_FAST_DEQUANT=0 keep the originals).
- Two-barrier GDN recurrence is EXPERIMENTAL (LELEKA_PREFILL_FAST_REC=1), off by default.
- Branch-free finite check and single-copy upload of the GDN state; PREFILL-R bit gate, per-command profile tags, model-free GPU probes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 02:04:42 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 c0190bdb6d feat(cuda-driver): sealed prefill_stage PTX (chunk-wide PLE decode, embedding broadcast, GR/GDN kernels with folded guards, element-parallel dequant)
New precise-recipe asset (extra-seal-plan group prefill-stage, nvcc 13.2.86), sealed with compile_assets.py/seal_pins.py, with its sm_86 companion.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 02:04:42 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 3c33af3e01 perf(serve): the lent-slot refill copies run on the cache's own non-blocking stream
Other synchronous uploads of the decode phase (PLE seed, canonical GDN) no longer queue behind the 1.4 GB of refill DMA on the default stream.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 02:01:14 +02:00