Commit Graph
97 Commits
Author SHA1 Message Date
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 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 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 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
Pavlo RatushnyiandClaude Opus 5.5 a9b5fd4df0 test(serve): real-model conversation smoke; docs for the conversation cache
original_serve_conversation_smoke (ignored, real model): a one-token first request,
chat A, chat B = A + reply + a new turn resumed from the cache vs the same B read
from 0 (equal greedy tokens asserted, TTFT printed), then a new chat sharing the
system prompt (root checkpoint). docs/original-serve.md describes the cache, its
limits (no parking, live continuation only with the ring in step) and the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:54:20 +02:00
Pavlo RatushnyiandClaude Opus 5.5 6bfb44fab9 docs(kv): KV storage and streaming port, selection, proofs and the long-context job
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:50:59 +02:00
Pavlo RatushnyiandClaude Opus 5.5 93fbf3a8f6 merge: sm_86 companions (RTX 3080) into the bring-up branch
Brings claude/sm86-assets: per-architecture PTX companions under crates/cuda-driver/ptx-sm86 behind the sm86 feature (sm_120 stays
the byte-identical default), 127 companions incl. the newly sealed MMQ-group, mapped-expert-copy and scalar-MTP assets, the
double-NUL lookup fix, and scripts/gpu-bringup/regress_3080.sh (31 items pass on the 3080 in 344 s). Conflict in
desktop-core/Cargo.toml resolved by keeping both the Linux/dev dependencies and the sm86 feature.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:38:09 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 058f2727d6 docs/sm86-assets: merge result, regress_3080.sh, probe limits on the 16 GiB card
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 10:37:38 +02:00
Pavlo RatushnyiandClaude Opus 5.5 0103ee90aa feat(kv): per-owner resident KV window for the streamed QSA layers (kv_stream n_slots)
The resolver PTX baked 8192 resident pages (--kv-resident 32768). Port the
Original's KvStreamMap::n_slots: leleka_qsa_resolve and leleka_qsa_stream_reset
take n_slots (resealed with nvcc 13.2.86, sm_120, precise flags; digests in the
window asset, the window seal plan and the ptx_abi test). Every streamed owner
sizes its resident runs and resolver state from the process-wide window
(configure_kv_resident, default 32768 cells = the previous behaviour) and
launches with its own slot count; the verify window carries it in its KV
binding. leleka-context: resident_pages_for (layer.cpp kv_plan rule),
resident_runs, stream_map_bytes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:34:33 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 494f74ccc9 docs: status, run recipe and contract notes for the API in front of the runtime
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 03:17:02 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 17bbcae2d5 docs: options and decision for one API in front of the Rust engine
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 02:20:20 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 e77c9e529e docs: delivery gap audit, Rust runtime run recipe, example gateway config and systemd templates
docs/delivery-gap-audit.md: host test counts, Python audit, Codex-direct and
deployment gaps with file:line, recommended tasks with acceptance criteria.
docs/rust-runtime-run.md: leleka-seal-exec + leleka-inference (--backend-mode original)
behind leleka-daemon, what was executed without a model or GPU context.
desktop-core/examples/daemon.original.json and deploy/rust-runtime/*: configuration
and user-unit templates (systemd-analyze --user verify only; not run with the model).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 02:14:17 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 c8a0f602fa sm86: document the companion set and the RTX 3080 smoke results, add offline tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 02:09:58 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 6d3ad69d3d docs: sealed with nvcc 13.2.86 on 2026-10-15, GPU load verified separately, no numerical claim
Rust port / port-fast (push) Failing after 7s
Rust port / port-typecheck (push) Failing after 7s
Rust port / port-oracles (push) Failing after 10s
Rust port / port-linux-tests (push) Failing after 22s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 07:26:47 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 53758bb691 seal: real nvcc 13.2.86 PTX for 30 assets, pins patched (first compile of the Original-literal CUDA sources; no numerical claim)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-15 07:19:23 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 3797bff503 docs(seal-plan): entry names of qsa_prompt_attention_variants match the .cu and its Rust consumer
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 18:20:34 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 88482263e3 build: pin CUDA toolkit to 13.2.2 (nvcc 13.2.86) matching the host driver (CUDA 13.2); bootstrap reads release from the lock; group closed-kernel smokes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 18:16:42 +02:00
Pavlo Ratushnyi 3bd56675f2 docs: record the open items of the remaining port
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 14s
2026-10-14 17:08:46 +02:00
Pavlo Ratushnyi 2da8be8641 Merge branch 'claude/port-main' into claude/port-remaining 2026-10-14 17:07:00 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 9066468f9a feat(cuda-driver): closed driver programs for native_flash_attn, the legacy S-form GEMVs and the arena poison fill (fail-closed pins, signature tables checked against the .cu, ignored GPU smokes)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 17:06:20 +02:00
Pavlo Ratushnyi 618a3fa253 Merge branch 'claude/port-rv-kernels' into claude/port-main
# Conflicts:
#	docs/cuda-seal-plan-additions-window.json
#	scripts/check-local.sh
2026-10-14 17:04:06 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 4a640498aa feat(serve): pin-gated PTX assets for native head, sampler and MTP session rope (replace Option::None constants); seal-plan entries and tests
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 17:03:42 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 c280730262 docs(cuda): flag-policy audit of every ported .cu against CMake (unsealed assets without a plan entry, sealed precise builds of fast-math Originals, corrected window re-seal candidates); add literal_diff.py
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 17:00:26 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 90d3433da4 feat(gpu-bringup): mandatory fast-math reseal of six PTX, flag overrides, PTX ISA/driver precheck
Rust port / port-typecheck (push) Failing after 7s
Rust port / port-fast (push) Failing after 7s
Rust port / port-oracles (push) Failing after 9s
Rust port / port-linux-tests (push) Failing after 32s
Adds the six audited assets (head_native, original_verify_qsa, router, gr_post,
gr_norm, ple_native_batch) as an atomic reseal group built with --use_fast_math,
re-pins their old digests (incl. ple PTX_BYTES) and window-plan hex, and a
generic --flag-override recorded in the manifest and re-applied by the sealer.
compile_assets --isa-inventory/--driver-check and run_gpu_smokes.sh refuse a
driver older than the highest PTX ISA in the tree (9.0 needs >= 580.65.06).
Runbook: mandatory reseal + golden comparison section, step d' (linux-tests).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 17:00:26 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 700e921ae9 feat(sampler): host-side serve-loop sampling for MTP (window staging, coupled draft history, acceptance) with a whole-loop toy-model oracle
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:57:50 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 2ab3a8ca48 test(cuda): run the stub pass through clang's CUDA frontend (host/device call legality, __shared__ rules, <<<>>>); fix qsa variants block_q4_0 packing, de-duplicate native_head_native.cu
- check-cu.py now defaults to clang -x cuda --cuda-host-only with real qualifiers; --plain keeps the C++-only pass.
- qsa_prompt_attention_variants.cu: block_q4_0 under pack(1) as in kv_q4.hpp (cu_pin refreshed).
- native_head_native.cu: orphan copy had __launch_bounds__ before extern "C" __global__ (never nvcc-built); now the sealed twin's text.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:56:45 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 9189e236e3 feat(gpu-bringup): remote_sync tests, toolkit tests, plan seal slots, doc runbook
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:54:39 +02:00
Pavlo Ratushnyi 7b67b8bddd Merge branch 'claude/port-rv-verify' into claude/port-main 2026-10-14 16:53:32 +02:00
Pavlo Ratushnyi 94fb39ccba Merge branch 'claude/port-docs-ci' into claude/port-main 2026-10-14 16:53:32 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 750a8d3003 test(reasoning-budget): replay the Service.run golden through the live worker and the Responses HTTP path
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:50:39 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 81b907030f feat(vision): picture parts in the Chat, Messages and Responses dialects, the strata-vision encoder client and GENI embeddings
The three adapters reduce pictures to a Responses input_image, the prompt renderer writes the template's
picture items and returns their sources in prompt order, and the request path encodes them (in turn with the
engine), expands every image pad to its token count and sends GENI with the combined SVE1 file. The encoder
is configured by a top-level vision section, stops with the engine and starts before it. Goldens recorded from
the Python handlers cover fourteen Chat and Messages requests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:46:59 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 9ea61bbba0 docs(verify): audit which sealed window copies were built precise where the Original is fast-math
The window seal plan only said 'some copies are a numerics risk'. List them
from the instruction mix of the sealed PTX against the fast-math-sensitive
operations of the Original sources: head_quant (amax / 127.0f, xi / d),
the analytic indexer append (powf/cosf/sinf), the native router (expf, 1/x),
native_gr_postops (sigmoid/silu), native_gr_norm (partial / n_cols) and the
native PLE post-ops are precise in the seals and fast-math in the Original;
bf16/combine differ in FTZ only; qsa_decode_postops, the shared expert and
the precise Original files already match. Names the re-seal action and that
native_flash_attn / native_qsa_score never run in the verify window.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:45:34 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 81f38cf4c3 docs(serve): record why the conversation cache is not bound to the Original serve stack
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:42:43 +02:00