Commit Graph
264 Commits
Author SHA1 Message Date
Pavlo RatushnyiandClaude Sonnet 5.5 6d75dcddd9 tests: wide top-k selection rule, cluster asset pin, decode-shaped identity cases down to the identity branch, decode scores timing; scripts/upstream-rest/arm_prof.py; plan analysis of rows 2.4/2.5
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 09:20:23 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 f8f4fbbec6 docs/windows.md: PCIe tier on the laptop (root cause of the CUDA 700, whether PCIe beats the CPU, paired A/B); pcie_copy_gpu_bandwidth
* The batch-copy fault: bisect in the engine, the model-free matrix, the fix, how to repeat the check on a new driver.
* Why it is not STRA-235 (different fault, different path) and the 5-minute negative result of the registered-file-mapping DMA stress
  (205,235 copies, 27,248 working-set trims, 0 wrong bytes).
* Plain PCIe shares are slower than the CPU pool over the pageable bank (profile: pool.publish_plan 10-11 s of 27-31 s); locked-only shares
  are about +8 % in a 3-rep paired A/B (unset 6.73/6.79, 0.45 5.02/4.79, 0.6 locked-only 7.51/7.14 decode tok/s, prefill unchanged);
  recommendation: keep the default, do not change the preset.
* pcie_copy_gpu_bandwidth (ignored GPU test, prints a measurement): pageable 8.1-8.9 GB/s with the call being the copy, page-locked
  11.6-12.4 GB/s at 4 us per call.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 06:03:20 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b4896c164b Merge NaN guard live fix (plan row 1.2): discard the refused window's engine state before the retry
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 01:40:47 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 a75d3902ed NaN guard heals on the live stack: take the refused window back before the retry (plan 1.2)
The retry of a refused verify window failed on the RTX 5090 with Failed(InvalidDimension): a window that completed and was never
committed keeps the driver verifier's window_ready flag (run refuses the next window with InvalidQwenShape) and its armed QSA journal.
A rerun that only cleared that completed but differed from the refused window, deterministically: the window also advances the PLE
history row by row (only the commit graph sets it) and overwrites the index tails and the spare pooled row.

OriginalSpecEngine::discard_window (port, OriginalVerifier::discard_window, OriginalVerifyQsaJournal::discard_window) runs after the
two checkpoint restores; the journal writes back the index state and the PLE history it read when the window began
(set_window_snapshots, only when the guard has retries). The fake engine refuses a window while a completed one is outstanding, so
the retry tests fail without the take-back. Live, guard on, deterministic arm: G1/G2 equal G0 in all 546 window blocks and 711 forced
rows, every rerun bit-equal to the refused window; default tier: all runs rc=0. Default stays off.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 01:40:17 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 beea1b42a9 Merge claude/upstream-p0 (plan rows 0.1-0.5, 1.1, 1.2) into claude/port-gpu-bringup
The sealed chain_window assets conflicted: bringup sealed a new chain_window.ptx (entry chain_gr_down_t2w8_nb4, c9ccd81) while upstream-p0
clamped the q8_1 scale and sum in the opt-in chain swiglu+quantize entry (4654f01, plan row 1.1). Resolved from the bringup sealed file:
only chain_swiglu_quant_kernel was replaced (scripts/q8/splice_ptx.py), every other byte stays as sealed; the entry text is byte for byte what
scripts/q8/rebuild_quantizer_ptx.sh compiles from the merged chain_window.cu (nvcc 13.2.86, checked on the server).

Regenerated, not merged by hand: the pin in original_verify_window_chain.rs (scripts/q8/repin.py), and the sm_86 companions, MANIFEST.json and
sm86_table.rs (scripts/gpu-bringup/sm86_assets.py build: 132 companions, check OK). The six other quantizer PTX and their companions equal
upstream-p0's. docs/upstream-port-plan.md: rows 0.1-0.5, 1.1, 1.2 from upstream-p0, row 0.6 from bringup, merge note on row 1.1.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 23:19:55 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 72f502f0ae Merge upstream speed items (route tail skip stays experimental and off; callback warm-up guard; CPU pool plan opt-in)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 23:09:30 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 1ee7e0d373 docs: windows.md, 5090 result of the tail skip
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 21:56:24 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 b45cbdd031 docs: upstream port plan, results of rows 0.6, 3.1, 2.3 (server 5090, 2026-10-26)
Route tail skip: +15.2 % decode on the 9e3 replay (3 paired repetitions), quality gate FAIL (stays an experimental flag, default off).
Callback affinity: real in the microbench, not reached by our code. Row 2.3: three of four items do not apply, worker plan ported opt-in.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 21:56:19 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 ef854aa300 STRA-235: stream-K off at every MMQ site on sm_86 (the MTP draft-KV record was still on it), drain switches, forced-SM diagnostic
- arch_ptx::stream_k_off(): one decision for the grouped MoE, the MTP prefill record, the resident MMQ, the Original profiles and the
  stream-all issuer; an sm_86-class device launches one block per tile unless LELEKA_MMQ_STREAMK=1. Native sm_120: untouched.
  The first real long session failed in the MTP FC hidden check of the draft record, which still planned the 48-block grid.
- diagnostics (off by default): LELEKA_FORCE_SMS, LELEKA_MMQ_STREAMK_FILE, LELEKA_RING_SERIALIZE_COPY_FILE / _CMD_FILE,
  LELEKA_CHUNK_DRAIN / _FILE.
- docs/windows.md: the third STRA-235 note (the 224k session on the laptop, the A/B, the 5090 forced-48-SM runs, what was read and found).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 19:47:52 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 5dc20b66a6 NaN guard with self-healing for verify windows (plan 1.2; upstream f332a855, 894f133b)
A verify window whose logits or stage outputs are not finite (NonFinite, e.g. the laptop's NonFiniteMmqOutput, STRA-235) used to end the
request after the controller restored its checkpoints. With LELEKA_ORIGINAL_SERVE_NAN_GUARD=on the same restore is followed by running the
round again (up to 2 times by default); any other error, a failed restore, or a window that stays non-finite fails as before. Every healed
or unhealed window is logged, counted in the spec stats and published in the telemetry document. LELEKA_ORIGINAL_SERVE_NAN_INJECT=n[xK]
exercises the path on a good window. Default off until the live replay (queued) shows no change of normal output.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 18:27:36 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 4654f01b15 q8_1 scale and sum stay finite in the sealed quantizers (plan 1.1; upstream 2b726ba6, f6601bf8, 7a0e3023, e372d4ff)
A q8_1 block stores d = amax / 127 and the sum of its 32 activations as fp16: one massive activation (amax > 8.3 M, or a sum past 65504)
rounded to inf and the dot products then read inf * 0 = NaN (NonFiniteMmqOutput here, "!!!!" upstream). The quantizers now clamp both
to the largest finite half and keep the codes inside int8 (strata/kernels/q8_1_finite.hpp); a NaN input still gives a NaN sum.
Finite blocks are stored bit for bit as before.

Sites: head_quant (mtp_original_full_head_native, native_head_native), mtp_original_quantize (mtp_original_tail, mtp_original_full_checks),
quantize_q8_1_kernel (mtp_original_full_head_iq, native_head_iq: the routed experts' input and SwiGLU output) and the opt-in chain
swiglu+quantize (chain_window). Not taken: the MMQ prompt quantizers (ggml quantize_mmq_q8_1, mtp_prefill_q8), which upstream did not clamp.

The sealed PTX are patched entry by entry (scripts/q8): three were built with CUDA 13.0.88, which is not installed, and a recompile
renames the hashed anonymous-namespace entries; only the quantizer entries change, every other byte is the sealed one. Pins, the seal
plan digests and the sm_86 companions (sm86_assets.py build) follow. tools/q8-probe compares old and new PTX on the GPU.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 18:27:20 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 da3459cee6 docs: windows.md wording
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 18:05:38 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c95e861c4b docs: windows.md, upstream speed items prepared for the laptop
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 18:05:34 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 6a6c394b9a docs: upstream port plan, diff list for rows 2.1 and 2.2
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 17:31:05 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 89215e83d2 Check that no parity harness trusts a --dump-logits header; add an offline size-based reader guard (plan 0.2; upstream 504579da)
No harness of ours reads the Original's logits dump (they use STRATA_LOGPOS rows, residual dumps and token outputs); the manual recipe in
docs/gpu-bringup.md now says to check the file first, because the pinned reference build predates the fix and writes a lying header on
native packs. scripts/quality/logits_dump_check.py refuses such a file.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 17:21:34 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 71b6ca0931 Conversation cache keeps the restored session when a request is cancelled in its prompt; tests for full-cache eviction and 1-token prompts (plan 0.5; upstream 8824e217, 940011da, aece46db)
A request cancelled between two prompt chunks (or before the first) used to finish without a live claim, so the conversation it had
restored was read again from its last checkpoint by the next request. The stack now hands the claim back when the draft ring and the
session stand together at a published prompt position (the predicate a live continuation needs). Tests pin the prefix store, the
conversation cache and the serve loop at the other two edges.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 17:19:52 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c159a7fdee Tests: PLE rows are matched by row, never by position (plan 0.4; upstream 36381540)
Upstream's gather_batch compared its prefetch list with the batch by position and re-read reordered or duplicated rows. Our reader
has no such matching (tickets own their output slots, the row cache and the KAR GPU cache are keyed by row id); the tests pin it with
the upstream cases and with chunks that are permuted, shifted, repeated or partly new.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 17:11:24 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 6be35e9752 Spec window and MTP chain stay inside the context's cells (plan 0.3; upstream e85567b6)
The controller ended a request as length when a full window did not fit, losing the rows that did, and the MTP chain drafted its full
length whatever the context had left. Near the end the window now takes the rows that fit, the chain is clamped to the cells that exist
(restored on the next round), the driver's chain loop is bounded by the ring's cells, and the draft launch no longer refuses a window
only because the unused part of a full chain would pass the ring.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 17:08:33 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 56ede89f30 docs: compute-sanitizer location on the 5090
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 15:47:46 +01:00
Pavlo Ratushnyi e205429940 Merge branch 'claude/3080-long' into claude/port-gpu-bringup
Rust port / port-fast (push) Failing after 14s
Rust port / port-linux-tests (push) Failing after 22s
Rust port / port-typecheck (push) Failing after 14s
Rust port / port-oracles (push) Failing after 15s
2026-10-26 14:46:47 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 96aa8b4270 STRA-235: sm_86 group MMQ without the stream-K grid, model-free stream-K stress, A/B switches
- mmq_original_group.rs: on a device that is not a native sm_120 the group MMQ launches one block per tile (no stream-K split, no
  fixup kernel); LELEKA_MMQ_STREAMK=1 restores the stream-K grid; the 5090 path is untouched. LELEKA_MMQ_NO_STREAMK / _FILE force
  it elsewhere. In-engine A/B on the laptop: 4 failures in 23 cold 14k requests with the stream-K grid, 0 in 23 without.
- mmq_original_ring.rs: LELEKA_RING_SERIALIZE / _FILE drain the copy and compute streams after every DMA / command (diagnostic).
- mmq_original_group_stress_gpu.rs: model-free random-count stress of the grouped MMQ with the stream-K grid planned for a forced SM
  count, both grids compared; clean on the 5090 (48 and 170 SMs) and on the 3080 laptop (48 SMs).
- docs/windows.md: the second STRA-235 note (what the stress and the A/B show, what is not verified).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 14:46:18 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 2e71fcd46b docs: 256k-class agent session on the 5090 (TTFT 27-39 s, decode ~105 tok/s at depth)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 14:26:53 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 570a814206 docs: 256k reference on the 5090 (prefill flat at ~1.8k tok/s up to 250k)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 11:45:33 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 f4924078bf STRA-235: CUDA launch/error tracer for the native Windows engine, driver errors in the log
- libc-shim/cuda_trace.rs: under LELEKA_BRINGUP_TRACE the Windows dlsym returns wrappers for the launch, copy, event and
  synchronization entries of nvcuda. Every non-zero return prints the operation, the code, cuGetErrorName/String and the
  operations queued since the last successful synchronization of the stream (kernel names, grid, block, shared bytes).
  Nothing blocks; LELEKA_CUDA_TRACE_SYNC / LELEKA_CUDA_TRACE_CALLBACKS add a per-launch synchronization or completion
  callbacks, only while the prompt forward runs (PromptSyncTrace).
- the nine driver_error helpers print under LELEKA_BRINGUP_TRACE as well (operation and code instead of the class only).
- LELEKA_STAGE_VERIFY: compare every staged expert buffer with its file bytes before the buffer is released.
- docs/windows.md: what failed (nvlddmkm Xid 13, Out Of Range Address, same PC), what is ruled out, next experiment.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 11:43:36 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 e58b3eeab2 docs: laptop long-context defect (CudaExecution at 28k) and the 256k target
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 15s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 08:56:16 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 58e869e9d5 docs: final paired A/B (+12.0 % decode) and quality gate of the merged final build
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 08:04:03 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 e865b1f73f docs: first native workstation run on the laptop (working-set trim, prefix cache reuse)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-26 01:12:55 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 f7ab3fd59c Control-token text inside messages is ordinary text (plan 0.1; upstream c16f31f8, 98b7ea94, 0d613031)
leleka_tokenizer::LiteralMarks swaps every special literal (GGUF token type 3 and 4) in a client string for a plane-15 private-use mark
before the chat template runs (a forged mark is escaped); Tokenizer::encode_marked parses the template's own literals as special tokens and
encodes each mark's literal as ordinary text. render_request marks instructions, message text, reasoning, call arguments, tool outputs and
tool descriptions/schemas; the gateway's own tool markers stay literal. Generation and /input_tokens share the one encoding; the text
contract carries the marked string and leleka-runtime reads it with encode_marked.

Not covered: strata-desktop-core still renders unmarked text; live Codex session (gate L) not run.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 23:31:05 +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 Ratushnyi ded68cb6eb docs/windows: second native run with the fixes: agent-sized request, reconfigure refused up front on a starved host 2026-10-25 22:50:53 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 1eacd3d974 docs/windows: native evening run: cuBLAS probe mismatch, greedy resident budget, reconfigure on a starved host
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 20:57:21 +01:00
Pavlo Ratushnyi c558cdb755 Merge branch 'claude/perf3' into claude/port-gpu-bringup
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 15s
2026-10-25 17:52:29 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 e7fd12b77b docs: plan for porting the Strata upstream changes into the Leleka runtime (phases 0-3, gates, status table)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 17:44:56 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 885bfb457e docs/windows.md: measured outcomes of the real runs on this laptop (WSL2 bridge and native engine), findings, fixes; stage-model.ps1 drops the robocopy progress when redirected
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-25 17:04:05 +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 c7c1252bf9 docs: exactness coverage 2026-10-25 14:14:47 +01:00
Pavlo Ratushnyi 4ef5d0fab1 sm86: companions for qsa_late.ptx and chain_window.ptx (full regeneration, refreshes the stale pcie ones); qsa_late stays opt-in on sm_86 until probed there 2026-10-25 14:13:29 +01:00
Pavlo Ratushnyi 3f6720f235 docs: pending gates; cmp_rhash.py 2026-10-25 14:07:18 +01:00
Pavlo Ratushnyi f86eee7a4a docs: measurement conditions, chain summary 2026-10-25 14:06:54 +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 Ratushnyi 0ec20ad0f8 docs/ledger: wording 2026-10-25 14:04:38 +01:00
Pavlo Ratushnyi 157742811e docs/ledger: perf3 follow-up table 2026-10-25 14:04:31 +01:00
Pavlo Ratushnyi e26abf62bd chain-probe: first-pass chain timing; docs 2026-10-25 14:04:23 +01:00
Pavlo Ratushnyi 81ca12c34c docs/chain-kernels: hyper-connection read, second pass 2026-10-25 14:03:34 +01:00
Pavlo Ratushnyi c793186732 docs 2026-10-25 14:03:09 +01:00
Pavlo Ratushnyi b6925ce73f docs/prefill-throughput: chunk 8192 in live sessions, replay A/B, loan ladder 2026-10-25 14:03:01 +01:00
Pavlo Ratushnyi 05042010db ladder off by default until its gate runs; tiled-down geometry helper and test; replay arm flags tiers/notiers; job scripts on rt-a7 2026-10-25 13:57:24 +01:00