Commit Graph
16 Commits
Author SHA1 Message Date
Pavlo RatushnyiandClaude Sonnet 5.5 60b48d8225 runtime reconfiguration: reopen the serve stack with new context/cache/resource settings without reloading the model
serve_tuning (settings document, validation, effective settings), Command::Reconfigure in the Original serve loop with rollback,
Backend::reconfigure, gRPC Runtime.Reconfigure, POST /v1/reconfigure, telemetry.settings; tests for each layer.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 03:01:53 +01: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 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 5ebd939b6f feat(memory): wire the governor into the runtime, the gRPC status and the control plane
- leleka-runtime: memory_governor glue (startup plan with refusal, KAR memfd lock/residency guard, VRAM check, load-ledger stages,
  inventory classes), prefix budget from the governor (auto/explicit clamped), shed directive applied per request and per prefill chunk,
  engine-side admission (503 memory_pressure text), page-cache release of the shards after the resident bank load, cgroup-aware
  available_memory.
- backend-api: Backend::memory_report (default None) and ScriptedEngine support; proto Snapshot.memory_json; desktop-core runtime_rpc and
  runtime-client carry it.
- control-plane: MemoryView, /v1/status `memory`, /metrics `memory`, 503 memory_pressure + Retry-After gate before queueing, engine-side
  refusal text mapped to the same 503; tests incl. a 600-request model-free soak (threads/fds/RSS flat).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-18 01:33:34 +02:00
Pavlo Ratushnyi 1cd52bc388 Merge branch 'claude/port-gpu-bringup' into claude/e2e 2026-10-18 00:59:49 +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 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 a4259d8f2b feat(control-plane): worker for a text-level engine behind the existing HTTP API
backend_worker drives any leleka_backend_api::Backend through the GenerationCommand
channel strata-next already uses. It maps the rendered prompt to the engine contract
(verified round trip of the ids), re-tokenizes text deltas with a byte-equality check,
recognises the stop literals, maps finish reasons, cancels on client disconnect,
guarantees a terminal event when the engine dies, and re-attaches by itself. What the
text contract cannot carry is refused. 23 HTTP tests over a scripted engine cover
Responses (JSON/SSE), Chat, tools, text.format, cancellation and engine faults.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 02:33:45 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 8b4b9b5d44 test(backend-api): scripted in-process engine implementing the Backend contract
Behind the scripted feature: scripted generations, cancel, faults (stream that ends
without a terminal event, failed and unasked-cancelled terminals), simulated engine
restart with stale handles. Not enabled by any production crate.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 02:24:24 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 3ca559cebc feat(serving): serve non-greedy requests through the Original sampler chain
backend-api carries SamplingOptions; backend.rs plans each request with the
validated SamplingParams instead of refusing temperature != 0; the output stage
bypasses the compact argmax for an armed request and draws with the bit-exact
host reference (counter = fed-token position, penalty history = prompt+generated).
MTP with sampling is refused explicitly. Desktop RPC only bounds temperature.
Docs: docs/sampler-reference.md (verified vs open).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 14:55:55 +02:00
Pavlo Ratushnyi 7cfce65570 feat(runtime): integrate explicit pinned MTP draft and verified generation 2026-10-10 00:26:09 +02:00
Pavlo Ratushnyi b4def64cf9 feat(linux): connect native CUDA runtime to gRPC daemon and CLI 2026-10-09 22:27:15 +02:00
Pavlo Ratushnyi af7437321c feat(backend): select explicit inference mode at model load 2026-10-09 20:31:37 +02:00
Pavlo Ratushnyi c6a3fc7e42 feat(engine): extract Rust GGUF foundation and enforce model capability tuples 2026-10-07 20:33:15 +02:00
Pavlo Ratushnyi 1e98febce6 feat: add versioned inference backend contract 2026-10-05 18:04:20 +02:00