Commit Graph
44 Commits
Author SHA1 Message Date
Pavlo RatushnyiandClaude Sonnet 5.5 b63a91b2fa deploy: rtx5090-32g gpu_budget_bytes 30 GiB -> 32,819,404,800 (31,299 MiB) so the dense-slab slot gain reaches the product
Needed for the slot gain: the slabs save physical bytes the Context never charged, so the
budget must rise by about that much. Smoke with this budget: ~11,568 slots, lowest free VRAM
1,035 MiB. Also the systemd unit template, the config and reconfigure tests, and the docs.
Preflight now needs 31,299 MiB free at start (was 30,720; idle 5090 reports 32,110).
Revert by restoring 32212254720. Owner confirmation required before merge.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 11:59:55 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 fcb4f02ba9 deploy: RTX 5090 profile sets LELEKA_ORIGINAL_SERVE_SEED=off (placement class, owner confirmation required)
Seed OFF is a profile setting only: the engine default (seed on) and the laptop profile are unchanged. Placement-class change, NOT bit-identical; it does not fit the strict Original
envelope (p99 <= 0.22, max <= 0.43) and neither does the control; it meets the relative criterion on 1,717 teacher-forced rows (p99 0.2500 vs control 0.2278, max 0.7567 vs 0.6751,
flips 2.10 % vs 2.59 %; limits 1.5x control and 2.8 %). Gain: 108.1 -> 137.2 tok/s decode over turns 1-4 of the frozen 245k session (3 runs per arm). Revert: remove the key or set
LELEKA_ORIGINAL_SERVE_SEED=on in the operator environment. Test: only_the_server_profile_turns_the_prompt_routing_seed_off; leleka-deploy tests 125 passed in WSL.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-29 10:09:44 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 621d35276d laptop profile and workstation preset: ship the measured defaults (chunk 6144, grid 6144, tail prompt, context 262144), clamp the chunk to the GPU budget
Paired 256k sessions on this laptop (docs/laptop-vs-vanilla.md sections 4, 10, 11, 12): prefill 110 -> 176-290 tok/s, TTFT sum about
2,100 s -> 998-1,083 s. Gates: 6144 changes the rounding order of the prompt path and has NO quality gate yet (q_pair / residual-hash arms
2048 vs 6144 not run); the tail mode and the context move no number. prefill_capacity_for_budget lowers the chunk when the budget cannot
lend it (14+ GiB 8192, 13 6144, 12 3072, else 2048). Tests updated; leleka-deploy 120 unit + e2e pass. Also: section 11 (vanilla with
STRATA_ROUTE_TAIL_SKIP=0: 9.0-13.0 tok/s, wall 1,417 s).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 23:57:39 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 66cc34f850 rtx5090-32g profile: prefill chunk and prefix-cache grid 8192 by default
Linux / keyless-cuda-gate (push) Skipped
Rust port / port-fast (push) Failing after 16s
Rust port / port-typecheck (push) Failing after 19s
Linux / verify (push) Failing after 33s
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
Rust port / port-oracles (push) Failing after 24s
Rust port / port-linux-tests (push) Failing after 28s
The shipped profile left both at 2048. Paired 256k session on the 5090 (same text, 5 turns): TTFT sum 131 s at 2048, 55-60 s at 8192
(night5 / night6 / rest-full / tune-A), decode unchanged. Tests and docs follow the new default.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 23:44:13 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 449b7a1784 deploy: CPU workers never exceed the physical cores but the host's (Windows)
The workstation preset counted logical processors: 12 workers on the 8-core laptop, 5 spinning unpinned. Now 7 (as vanilla).
The 16-core server stays at 15.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 20:13:10 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 36863df394 deploy: Windows workstation keeps 8 GiB available instead of 12 (a 12 GiB floor left the prefix cache no budget)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 01:02:28 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 2d704e3126 deploy: Windows workstation preset plans a larger desktop share and a smaller hot expert set
The laptop is a work machine (agent, IDE, browser): in the file-backed form the workstation preset leaves 18 GiB to the desktop (12 for dedicated),
keeps its raised memory floors instead of the lowered Windows ones, and sets LELEKA_MAPPED_WORKING_SET_GIB=8 so that the engine's start check can pass
on a 48 GB host. Estimates, to be measured on the first workstation run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 23:11:54 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 3fcbd901aa Windows file-backed form: lower memory floors (3072/1536) — no OOM killer, the start check needs fixed footprint + soft floor + reserve
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 22:41:07 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 d2386f12d7 native Windows fixes from the evening run: resident expert budget sized from the free RAM, LOCALAPPDATA fallback for the cuBLAS lookup, reconfigure refuses up front when the host cannot hold the reopened stack and ends the engine process when reopen and rollback both fail
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 21:02:51 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 ab42667d3a e2e_windows: stopping must not wait for the children's grace period
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 16:59:13 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c5be696205 Windows: stop the children with Ctrl-Break in their own process groups (the engine, gateway and API handle it), so leleka down takes seconds instead of three grace periods; hidden mode hides the console instead of freeing it; no readiness summary after up --mode none
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 16:58:41 +01:00
Pavlo Ratushnyi 7fa275c12c Merge branch 'claude/windows' into claude/port-gpu-bringup
Rust port / port-fast (push) Failing after 8s
Rust port / port-typecheck (push) Failing after 9s
Rust port / port-oracles (push) Failing after 10s
Rust port / port-linux-tests (push) Failing after 17s
2026-10-25 15:54:31 +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 RatushnyiandClaude Sonnet 5.5 07b1fdfc0b deploy planner: the resident expert copy (53.5 GiB) and the governor reserve count against the free-RAM target; the workstation preset is not reachable in the resident form on a 121 GiB host (live check plat-reconf-live)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:47:53 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 5efa590886 deploy planner: 15 CPU workers (the pool's limit) and a 2 GiB workstation VRAM margin, from the measured cost of the preset (job 9p0)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 15:33:14 +01:00
Pavlo Ratushnyi e64a3da1b7 Merge branch 'claude/platform' into claude/port-gpu-bringup
# Conflicts:
#	crates/deploy/src/app.rs
#	crates/deploy/src/cli.rs
2026-10-25 14:06:50 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 1f17b5d2d7 supervisor: say so in the answer when the previous engine cannot be restored after a refused reconfigure
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 13:29:22 +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 7243ed9b59 leleka.exe: PowerShell request example in the summaries, Windows plan hides Linux-only commands, cuBLAS hint
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 13:13:23 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 6fde2ff222 leleka.exe: the WSL2 front end (up/preflight/verify through wsl.exe with path translation and .wslconfig advice; status/reconfigure/down over loopback HTTP; doctor), Windows facts probe, native defaults, Windows preflight/plan, deploy tests pass on Windows and Linux
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 13:11:44 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 9f26eee613 deploy: an inherited sealed archive is not charged to the resource planner twice
With --kar-fd the memfd is already missing from MemAvailable; compute() charged the archive again and sent a host that fits to the mapped form. The reconfigure planner shares the correction.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 12:59:45 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4d28f0a250 reconfigure: kv_resident is fixed per process and cpu_workers is 1..=15 (found by live job 9r1); reconfigure takes 7 s and waits for the request in flight
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 12:42:33 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 ee1717e2f7 leleka reconfigure: --persist, and --gpu-budget-gib/--preset by restarting only the engine under the supervisor
The CLI hands budget and preset changes to the supervisor through a request file; the supervisor checks them with the resource planner twice (before and after stopping the engine), restarts the engine with the sealed archive descriptor it holds, keeps the gateway and API processes and ports, and restores the previous settings when the planner or the new engine refuses. --persist writes the result into leleka.json (and strata.json for the context). leleka.json now records the profile before the preset changed it so that dedicated undoes workstation.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 12:29:39 +01:00
Pavlo Ratushnyi 75e7e47dcc control-plane: /api/requests monitor, the Python Monitor members of /metrics, Prometheus text exposition
Opt-in api_monitor keeps the last 100 requests of the chat, messages and responses dialects; /metrics gains engine, live, requests, totals, hardware, history; ?format=prometheus (or a scraper Accept) renders the same document as gauges and counters. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 12:18:32 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 81fc8a7717 leleka reconfigure: change context, caches and resources of a running engine (CLI, docs)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 03:03:03 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 ff5b8d0ddf deploy: LELEKA_CHAIN is an allowed profile engine_env switch (fixes the profile validation after f96cdee)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 02:42:58 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c4b76a8009 deploy: the rtx5090-32g profile runs --prefix-cache-tail reply (slot-equivalent session resume)
Live Codex CRM: median prefill 2265 -> 706 ms, p90 3620 -> 1064 ms, decode unchanged; teacher-forced agreement
(job 9d4) is within the noise of a chunk-cut change (control 9d5). docs/prefix-cache.md has the numbers.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 02:35:44 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 85185ecd00 normalize line endings of the files touched by the resource-preset and telemetry commits back to LF
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 20:54:11 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 08e2c78761 runtime telemetry: GPU load/VRAM (NVML), RAM, CPU cores, prefill/decode tok/s, cache hits, context
leleka-memory::telemetry (sampler + per-request records) -> Backend::telemetry_report -> Snapshot.telemetry_json
(gRPC) -> control plane /v1/status machine -> leleka status.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 19:58:28 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 b726c4615b deploy: resource presets fall back to the mapped (SSD/HDD) form when RAM cannot hold the pinned one
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 19:51:44 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 4e53d8474a deploy: resource presets (dedicated/workstation) computed from the host facts
leleka up --preset dedicated|workstation (env LELEKA_PRESET): CPU expert workers, host RAM floors and VRAM budget are
computed from cores, MemTotal/MemAvailable and free VRAM, printed, preflighted and baked into leleka.json.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 19:46:25 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 e0bd5edd8b deploy: rtx5090-32g profile carries the reference agent configuration
Expert tier auto-sized per layer from data/expert-profile.bin (shipped routing profile, default digest), spec_min_p 0.5 (new profile field -> --spec-min-p), 30 GiB GPU budget, memory reserve 2 GiB. Measured in the real Codex sessions (docs/e2e-run.md 7d): weighted decode 129-130 tok/s vs 72-75 with the old profile.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 11:04:58 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 0de8d9e0e2 perf(startup): hash the shards while the supervisor fills the sealed memfd
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:35:08 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 53ef34675d test(deploy): leleka verify runs the engine in rehash mode and reports failure
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:32:14 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 f96074c360 perf(startup): verify shards and archive in parallel with read-ahead, verification stamps, attested sealed archive, parallel memfd fill, leleka verify
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 01:28:11 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 e08eab5fad feat(deploy,e2e): bind the MTP draft vocabulary (--mtp-rt-dir = the MTP pack) in the generated engine command, the e2e runner and the replay
The Original drafts over the 106k-row draft_vocab.bin of data/mtp-rt; the daemon default (rt_directory None) and the smokes drafted over
the full 248k-row head (+0.18 ms per draft step, ledger agent). Jobs 943b/945 ran without it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-23 19:42:01 +02:00
Pavlo Ratushnyi 0790ba6ec9 Merge branch 'claude/memory-safety' into claude/port-gpu-bringup 2026-10-18 05:09:13 +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 eead818051 feat(memory): real-model memory smoke (inventory, soak, shed, reader), deploy profiles carry the memory budget
- backend_original_serve_memory_smoke.rs: scenarios inventory / soak / shed / reader and a model-free archive guard probe; floors
  moved next to the memory the host has now so the shed path runs far from the real limit; abort guard at 15 GiB.
- Governor::set_floors; stack prefix_bytes / prefix_budget_bytes accessors.
- leleka-deploy: Profile.memory (prefix_cache_mib, floors, reserve, share, lock, heal, resident budget) -> engine args and
  LELEKA_MEMORY_* environment; built-in profiles carry it; tests.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 01:40:43 +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 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