Commit Graph
110 Commits
Author SHA1 Message Date
Pavlo Ratushnyi 0e9eab62f7 e2e: reference-equivalent Codex rerun jobs (943c/945c) and replay arms job 948 2026-10-23 19:30:23 +02:00
Pavlo Ratushnyi 7a96807351 docs/e2e: Codex session results, final binaries, trace tables; analyze_session attributes prefix lines to the next request 2026-10-23 17:38:40 +02:00
Pavlo Ratushnyi 73e77f8225 Merge branch 'claude/port-gpu-bringup' into claude/e2e 2026-10-23 16:07:51 +02:00
Pavlo Ratushnyi c12685156e e2e: browser checker finds the cells by probing (perspective boards) 2026-10-23 16:07:51 +02:00
Pavlo Ratushnyi 4f7c4618d3 Merge branch 'claude/quality-gate' into claude/port-gpu-bringup 2026-10-18 05:30:48 +02:00
Pavlo Ratushnyi 0790ba6ec9 Merge branch 'claude/memory-safety' into claude/port-gpu-bringup 2026-10-18 05:09:13 +02:00
Pavlo Ratushnyi 6389188d7a e2e: job 943b 2026-10-18 04:38:06 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 505f3ee70f fix(runtime): output cap 4096 -> 32768 (one shared constant); /v1/status omits a null prefix_cache
The Codex tic-tac-toe run (job 943) ended after 4 minutes: the model wrote the whole index.html in one tool call, hit the
runtime's 4096-token output cap three times (tool call unterminated -> response.failed 'tool parameter is incomplete', then
'incomplete: max_output_tokens' -> turn.failed -> Codex exit 1). The Original server has no such cap (max_tokens 0 = the rest
of the context). RuntimeServer, the engine request check, strata-next's runtime default, the leleka-deploy generated config
and the examples now use leleka_backend_api::MAX_OUTPUT_TOKENS = 32768. /v1/status keeps the Python server's key set when no
prefix cache exists (http_surface golden regressed with the prefix-cache merge).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 04:36:37 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 f53d54d122 test(control-plane): http_surface golden ignores the Rust-only status keys prefix_cache and memory; docs results
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 04:04:37 +02:00
Pavlo Ratushnyi d20c2a67af chore(memory): shed2 job script 2026-10-18 03:55:05 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 cbb7b5392c test(quality): retrieval section of the analysis
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 03:27:03 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 faa572bd1e docs(quality): quality gate result, envelope, tolerances, verdicts
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 03:26:37 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 51c82250f1 feat(memory): inventory totals separate file-mapped bytes from RAM; swap-out and PSI thresholds are tunable (LELEKA_MEMORY_SWAPOUT_PAGES_PER_S, _PSI_SOME_SHED, _PSI_FULL_REJECT)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 02:19:52 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 97227d8c8e fix(serve): the Original serve path stops on <|endoftext|> as the Original does; quality-gate retrieval and ladder jobs
generate.cpp stops on {248044, 248046}; the GGUF eos_token_id is only 248046, so the port ran on
past an <|endoftext|> (up to max_new, emitting <|im_start|> loops). The stop set is now the model's EOS
plus <|endoftext|> in the serve backend, the smokes and the laptop probe.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 02:12:54 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 c38042e8e3 chore(memory): job scripts and laptop runner under scripts/memory
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 02:03:09 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 713235d8ed feat(memory): residency guard on its own thread, read-only remap of the archive, dead-sampler recovery, cgroup v1, swap A/B tool, lint fixes
- guard_archive maps a private read-only reopen of the descriptor (a write-sealed memfd refuses a shared mapping that could become writable on
  kernels up to 5.15); the residency read runs on its own thread; the sampler survives a panic and a stale level is re-evaluated by the
  requests themselves; cgroup v1 memory controller limits (WSL2 hybrid, old container hosts) are honoured.
- examples/swap_ab + scripts/memory/swap_ab.sh: A/B (unlocked, heal, mlock) of the memfd under real pressure fenced into one cgroup.
- Miri: procfs/host/plan/pressure/inventory/census/ledger/governor run clean (61 tests).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 01:51:29 +02:00
Pavlo Ratushnyi 0e7e621cfe e2e: CRM prompt phase 2 (long refactor-and-extend) and replay job template 2026-10-18 01:28:54 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 2ecfd42001 e2e: engine request capture (LELEKA_CAPTURE_DIR), offline replay smoke, session analysis headline, CUPTI trigger helper
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 01:28:02 +02:00
Pavlo Ratushnyi 50cd95fdbb e2e: browser checker serves the game over local http (ES modules are blocked on file://) 2026-10-18 01:08:53 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 29cfd8378e e2e: session analysis, status writer, CUPTI hook, timestamps, Codex job scripts; merge of 7330ddb
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 01:08:04 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 d3962493b7 test(quality): LF endings for the job scripts, batched-prompt job renamed
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 22:30:07 +02:00
Pavlo Ratushnyi fabcdd3c14 e2e: long scenario measures the cache without depending on the model's tool-call format 2026-10-17 22:08:53 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 b978a45e4e test(quality): trim the Original jobs to the correctness references
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 21:28:27 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 0ac97bf63a test(quality): long-context retrieval check (100k/180k) with teacher forcing in the long smoke
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 20:47:02 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 da187a9b36 e2e: Codex CLI job tooling (config, prompts, checkers, report), env sampler, one log line per generation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 18:42:46 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 bd214d556f test(quality): seed on/off and adaptive on/off port arms (binary q-2 on the merged bring-up head)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 18:41:27 +02:00
Pavlo Ratushnyi 486817d92f Merge branch 'claude/port-gpu-bringup' into claude/quality-gate 2026-10-17 18:39:21 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 2ec138218e test(quality): analysis scripts and holder jobs for the quality gate
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 17:48:19 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 af3beab76e fix(api): text-level-only features are 400s, generation failures are logged; e2e: xlong scenario and failure notes
reasoning_budget_tokens, strata_tune, experimental_speed_projection and sampling finer than the
text contract's fixed point were queued and then refused as 502 generation_failed; the HTTP layer
now answers 400 unsupported_request_field / invalid_sampling_precision for a text-level engine.
Every failed generation logs its client-visible message; STRATA_DEBUG_FAILED_OUTPUT=1 also logs
the generated text of a failed tool turn (operator debugging only).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 17:35:29 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 f5925f3a15 fix(api): context overflow and output-cap violations are 400s from the HTTP layer; default budget keeps the 8-token margin
A prompt that cannot fit the context, or max_output_tokens above the runtime cap, used to be
queued and refused by the worker as 502 generation_failed (SSE: response.failed after a 200),
which clients retry. Now 400 context_length_exceeded / invalid_output_limit before queueing.
The default output budget (context - prompt) ignored the engine's 8-token margin and failed for
prompts near the context; it now leaves the margin. Merge of claude/port-gpu-bringup 0b0d128:
the duplicate expert-source load of this branch is dropped in favour of the integrated one.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 15:47:34 +02:00
Pavlo Ratushnyi 98b7cf24af Merge branch 'claude/port-gpu-bringup' into claude/e2e 2026-10-17 15:45:13 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 856d538a83 wip: HTTP-layer 400 for context/output-cap errors, fake-engine tooling for the e2e client
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 15:45:13 +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 9b56aec2ec fix(runtime): Original serve load now loads the retained expert source
leleka-inference --backend-mode original failed at Load with
'MoeWeightCache::new_original_prompt_arena: InputRead': only the optimized (experimental)
path called load_resident_expert_source, the Original path assumed the serve smoke had done it.
Load it for the Original path (RAM-resident; LELEKA_ORIGINAL_SERVE_EXPERT_SOURCE=mapped selects
the low-RAM mapping). run-e2e.sh fails fast on a leleka-load failure.

Found by the first stack run on the RTX 5090 (job 940); verified by job 941.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 14:57:56 +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 ba76e11470 test(quality): teacher-forcing hook for the Original serve smoke and the quality-gate scripts
LELEKA_SMOKE_FORCE_DIR makes the smoke decode along another engine's tokens (picks of every verify
window replaced by the forced text; logits and LELEKA_TRACE_LOGPROBS rows stay the port's own).
Nothing outside the smoke installs a sequence. scripts/quality: case preparation, request files,
holder jobs and the offline log-probability comparison.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 14:22:48 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 b4d12bdd53 fix(runtime): bounded generation identity window instead of a 256-generation epoch limit
RuntimeServer and the engine Proxy remembered every accepted request id for the life of
an epoch and refused work after 256 (generation_capacity), which an agent session
exhausts quickly. Both now use leleka_backend_api::RecentIds (16384 most recent ids, FIFO).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-17 14:21:41 +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 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 c9845eed52 fix(experts): split bank copies at page-locked boundaries; Original bench without the subcommand
With part of a file-mapped bank page-locked (`pin_resident`), an H2D copy that starts in registered pages and
runs into unregistered ones is refused by the driver (CUDA_ERROR_INVALID_VALUE, first seen on the laptop run).
`MappedExpertBank::copy_pieces` cuts a `cache_source` slice at every registered boundary and the four copy
sites (prompt copy ring, cache fill, swap fill, PCIe staging) issue one copy per piece; one piece when nothing
is locked, so the default path is unchanged. original_bench.sh: the `strata` binary takes the generate
options directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 12:49:53 +02:00
Pavlo RatushnyiandClaude Opus 5.5 e9995d8ec3 merge: claude/numerics (parity tooling: KAR PLE row parity test, opt-in residual/ladder/PLE traces, comparison scripts)
Result recorded in LeaseVibe: port vs Original deviation equals the Original's own deviation between its expert settings
(median max |dlogprob| 0.292 vs 0.287, top-1 differs 4/120 vs 3/120); KAR PLE rows bit-identical (1744/1744).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:57:37 +02:00
Pavlo RatushnyiandClaude Opus 5.5 84a6817a5a diag(numerics): ladder comparison tools, CPU-expert Original arm, logprob comparators
Results (3 prompts x 41 teacher-forced rows): port vs Original agree exactly
at the embedding and the first GDN half; relL2 of the residual then grows
smoothly with depth (1e-3 after layer 0 FFN, ~1e-2 by layers 8-13, 5-15e-2
by layers 28-44). The Original's own GPU-expert-cache vs CPU-expert arms show
the same profile and the same logprob spread (median 0.287 vs port 0.292).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:57:00 +02:00
Pavlo RatushnyiandClaude Opus 5.5 bbba0f231d bench(laptop): paired Original/port harness on fixed pre-tokenized prompts
* tokenizer example `chat_tokens`: one user turn per line, thinking off, to comma-separated IDs, so both
  engines get exactly the same token IDs (benchmarks/laptop/prompts.txt: 3 prompts, 78-88 tokens).
* leleka-runtime ignored test `original_serve_laptop_bench`: opens the Original serve stack with the
  low-RAM sources (mapped experts, read-only KAR file; resident/memfd still selectable), serves every prompt
  REPEAT times greedily and prints TTFT, prompt/decode phase times, prefill/decode tok/s, memory and the
  output IDs of the first pass.
* scripts/laptop: original_bench.sh drives the unmodified `strata generate --serve` (setup.py's IQ3_S
  arguments, conversation cache off, one GEN at a time, TTFT to the first T line); port_bench.sh runs the
  test; monitor.sh samples process RSS/anon/file/shmem/locked/pinned and GPU VRAM once a second.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 11:27:46 +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 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 Sonnet 5.5 b62a37abaa diag: opt-in port residual/ladder/PLE-row traces and offline Original-comparison scripts (build not yet verified on the server)
LELEKA_TRACE_RESIDUAL=<dir> dumps the final R of each verifier window,
LELEKA_TRACE_LADDER adds a per-hc_read R ladder (2 frames per layer),
LELEKA_TRACE_PLE prints the PLE row ids per window row. scripts/numerics
holds the patch scripts for a private copy of the Original (not applied to
engine/strata) and the comparison tools.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 10:45:58 +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 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 b625aa2fc8 regress_3080.sh: read commits from a Windows git worktree under WSL
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 10:14:07 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 6173c2d309 gpu-bringup: regress_3080.sh, one-command model-free regression of a commit on the sm_86 card
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 10:04:12 +02:00