Commit Graph
5 Commits
Author SHA1 Message Date
Pavlo RatushnyiandClaude Opus 5.5 70f057578f feat(serve): --kv / --kv-resident on the Original serve stack, KV footprint, long-context smoke
StackConfig gains kv_format (int8 only; fp16, q4_0, k8v4 and keyless are
refused: no sealed owners) and kv_resident (default 32768 = the window every
earlier build used; raised to 20480; 0 = the whole context). open() fixes the
process window (qsa_set_kv_resident) before any QSA owner and prints the
streamed KV footprint (leleka-context KvStreamFootprint: VRAM, prompt stage,
pinned host). leleka-inference takes --kv and --kv-resident.
original_serve_long_context_streamed_kv_smoke (ignored, env-gated): one greedy
request over a 40K-token passcode prompt with a 20480-cell window.
serving_context cross-checks resident pages against the Original kv_plan.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 10:47:16 +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 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 58db6f44b2 test(context): accept any NaN for invalid-YaRN kernel args in the rope golden
rope_plan_golden compared kernel_args.corr_low/corr_high bit-for-bit, while the
corr_dims check right above already (correctly) treats NaN payload/sign as a libm
detail. For beta_slow=-1 the fixture, generated on arm64, holds 0x7fc00000, but
x86 SSE's default NaN is 0xffc00000, so the test failed on Linux x86_64. Compare
NaN-vs-NaN as equal for these two fields; all non-NaN bits stay exact.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:47:56 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 18d712eed5 feat(context): reuse the port-rope leleka-context crate and port setup.py's RAM/VRAM sizing rules
crates/context is taken verbatim from claude/port-rope (rope scaling incl. setup_resolve_rope/derived_factor, memory
plan, context policy). New setup_policy module: ram_ctx, ctx_ram_need, resident_budget_gib, low_ram_*; a golden grid
from 'import setup' (resolve_rope/derived_factor too, which the branch had only transcribed) checked bit for bit.

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