docs(roadmap): rewrite task queue and status for the Rust port; fix stale offline checkboxes
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
7f9bf42a6e
commit
e7bb762b1b
+53
-13
@@ -33,7 +33,7 @@ The target interface is one Linux command, `strata-next`, with `serve`, `model f
|
||||
- [x] Pin the Rust toolchain and enforce format, Clippy, Rust tests, and CPU tests.
|
||||
- [x] Write the local GitHub Actions workflow for Linux checks, a musl build, ELF dependency checks, artifact upload, and tag prerelease.
|
||||
- [ ] Create the Strata Next GitHub repository, add its project remote, and run the workflow on a hosted Linux runner.
|
||||
- [ ] Run a CUDA engine build and loader smoke test on Linux GPU hardware.
|
||||
- [ ] Run a CUDA engine build and loader smoke test on Linux GPU hardware (the C++ engine ran earlier; the Rust-port PTX/link path has not been built or linked, see the port queue below).
|
||||
- [x] Build the isolated KAR CUDA decoder for RTX 5090 and match synthetic full/row plus two real overlay-record checksums with the CPU oracle.
|
||||
|
||||
### P1 — model acquisition
|
||||
@@ -50,13 +50,15 @@ The target interface is one Linux command, `strata-next`, with `serve`, `model f
|
||||
|
||||
- [x] Inventory `iq_pack.py`, `pack_index.py`, and `strata_tokenizer.py` outputs and formats.
|
||||
- [x] Port bounded GGUF v3 header and tensor-directory inspection into native code.
|
||||
- [ ] Validate the native inspector against representative upstream GGUF fixtures and both real IQ3_S shards.
|
||||
- [x] Validate the native inspector against the unmodified `tools/gguf_reader.py` on generated GGUF v3 headers (400 cases: every metadata value type, arrays, alignment, split keys, geometry table); see `docs/offline-port.md`.
|
||||
- [ ] Re-run the inspector differential on both real IQ3_S shards (the shards are not on the macOS development host; the Linux full-preparation run indexed them, but no scripted comparison against `gguf_reader.py` exists).
|
||||
- [x] Port tokenizer asset extraction without a Python runtime and compare it with upstream on a synthetic GGUF.
|
||||
- [x] Port tokenizer encode/decode and compare token IDs with upstream on a synthetic full-byte vocabulary.
|
||||
- [x] Extract the SHA-256-verified first real shard’s tokenizer and compare native IDs and roundtrips with the pinned upstream oracle on Unicode and special-token cases.
|
||||
- [ ] Port the IQ3_S pack/index path without a Python runtime and verify the real tokenizer.
|
||||
- [ ] Differentially compare metadata, tensor bytes, and tokenizer behavior against upstream output.
|
||||
- [ ] Add `model prepare` with source digest, KAR-2 archive validation, atomic completion, and no model data in Git.
|
||||
- [x] Port the IQ3_S pack/index path (`native_pack.rs`, incl. `--compat-bf16`, `--base`, `--experts-bin`) without a Python runtime; tokenizer assets round-trip. The real-model tokenizer comparison is covered by the earlier Linux run and by the committed per-codepoint differential.
|
||||
- [x] Differentially compare metadata, tensor bytes, and tokenizer behavior against the unmodified upstream Python tools on synthetic inputs (2755 pack cases, 400 header cases, 14.5M pre-tokenizer strings; `scripts/offline/diff_*.py`).
|
||||
- [ ] Repeat the pack, header and tokenizer differentials on the real shards and tokenizer (needs the model volume on the Linux host; not run).
|
||||
- [ ] Add a unified `model prepare` command with source digest, KAR-2 archive validation, atomic completion, and no model data in Git (native pack: `prepare-native-pack` is atomic and writes `receipt.json`; KAR: `ensure-sharded-streamed`).
|
||||
- [x] Add bounded native KAR-2 metadata inspection, streaming payload CRC verification, and optional source-manifest identity check (decode still pending).
|
||||
- [x] Emit a byte-identical synthetic KAR-2 RAW/NESTED archive from native Rust tensor slices; publish after verification without overwriting an existing file.
|
||||
- [x] Index supported GGUF tensor payloads with exact block geometry and bounded per-tensor hashing; reject overlapping, truncated, or malformed source layouts.
|
||||
@@ -83,10 +85,12 @@ The target interface is one Linux command, `strata-next`, with `serve`, `model f
|
||||
- [x] Measure a provisional, reproducible IQ3_S/IQ4_NL real-data slice with the streamed KAR path; record archive size, source identity, and reconstruction error without treating the slice as a model-quality gate.
|
||||
- [x] Run full streamed preparation and independent verification; both target shards matched their manifest SHA-256 values and representative real blocks/ranges matched the CPU oracle. Model-level quality and GPU execution remain separate gates.
|
||||
- [x] Resolve a fully verified base KAR archive plus precision overlay into a per-record selection map; both real archive hashes, all payload CRCs, and 22 replacements passed. GPU loader use remains open.
|
||||
- [ ] Verify IQ3_S values against upstream CPU dequantization on representative tensors.
|
||||
- [ ] Promote the bounded GGUF/KAR path to `model prepare` after real-shard validation, per-class rate policy, and quality checks.
|
||||
- [ ] Make one-command `serve` fetch, verify, and prepare missing model assets, then reuse the verified compressed archive.
|
||||
- [ ] Compare KAR reconstruction with its CPU oracle; run full-model quality before making the compressed path a default.
|
||||
- [x] Verify IQ3_S values against upstream CPU dequantization: pinned ggml bit for bit on sampled real blocks, and 69 fixtures across 23 block types bit-exact against pinned `gguf-py` and `iq_fixture.py` (`diff_dequant.py`).
|
||||
- [ ] Promote the bounded GGUF/KAR path to a single `model prepare` command after real-shard validation, per-class rate policy, and quality checks (`prepare-native-pack` and `ensure-sharded-streamed` exist separately; they are not unified).
|
||||
- [x] One-command `serve` fetches, verifies and prepares the native GGUF pack and reuses it offline (`smoke-native-bootstrap.py`).
|
||||
- [ ] Extend the one-command path to the verified compressed KAR archive.
|
||||
- [x] Compare KAR reconstruction with its CPU oracle (selected real ranges, kernel model over randomized synthetic records).
|
||||
- [ ] Run full-model quality before making the compressed path a default (GPU-gated).
|
||||
|
||||
### P3 — API and worker
|
||||
|
||||
@@ -97,8 +101,8 @@ The target interface is one Linux command, `strata-next`, with `serve`, `model f
|
||||
- [x] Parse complete Qwen function calls in Rust for buffered Responses output, preserving nested delimiter text and checking argument schemas; synthetic HTTP test passes.
|
||||
- [x] Render stateless text input arrays with paired function calls and outputs into the next Qwen prompt; synthetic HTTP continuation passes.
|
||||
- [x] Store completed responses in a bounded, process-local cache by default and replay `previous_response_id` with new input; synthetic tool-result continuation passes.
|
||||
- [ ] Stream live output with cancellation, backpressure, tool calls, reasoning, and terminal events. Text and completed function calls are connected; reasoning remains open.
|
||||
- [ ] Replay sanitized real Codex sessions and compare against the upstream server.
|
||||
- [x] Stream text, completed function calls and reasoning (`response.reasoning_text.delta/done`) with cancellation, backpressure and terminal events; verified against a mock worker and a split-at-every-byte test. A live engine has not produced reasoning through this path.
|
||||
- [ ] Replay sanitized real Codex sessions and compare against the upstream server (replay tooling and synthetic fixtures exist; no comparison against the upstream Python server has been run).
|
||||
|
||||
### P4–P6 — production and optimization
|
||||
|
||||
@@ -106,17 +110,53 @@ The target interface is one Linux command, `strata-next`, with `serve`, `model f
|
||||
- [ ] Keep the KAR archive compressed through GPU residency; integrate `libkar` reserve/decode, PLE row decode, expert miss scheduling, and measured transfer/decode/multiply overlap.
|
||||
- [x] Verify base plus precision overlay and account for selected compressed residency and F32 scratch without double-counting replaced records; the real v4 pair was measured as archive metadata, not GPU execution.
|
||||
- [ ] Expose `with-key` and experimental `without-key` KV modes; keep QSA indexer keys and pass the separate Keyless quality gate before default use.
|
||||
- [ ] Add process restart, metrics, auth, failure injection, and soak tests.
|
||||
- [ ] Add failure injection and soak tests. Process restart, metrics, auth, idle unload, reload gates and an outside stall watchdog exist in `control-plane` and were tested against mock workers; none was soaked against a live engine.
|
||||
- [x] Stop and drain an abandoned internal generation; interrupt an active generation during shutdown.
|
||||
- [ ] Capture the 1×256K baseline, then implement and validate 2×256K and 1×512K.
|
||||
- [ ] Evaluate speculation, KAR, and Value-Only only under the charter's separate quality gates.
|
||||
|
||||
### Port — Rust port of the Original C++/CUDA engine (branch `claude/port-main`)
|
||||
|
||||
Scope and status of each unit are tabulated in [`port-status.md`](port-status.md). In this list "done" means source written, type-checked and, where stated, checked against an executed CPU oracle on macOS. No item below has run on a GPU, and none carries a performance or model-quality claim.
|
||||
|
||||
- [x] Offline tooling (native pack, GGUF header, tokenizer, dequantization, small packers, MTP pack/fetch, setup.py RAM/context policy, chat template, reasoning budget) ported with live differentials against the unmodified Python tools: `docs/offline-port.md`.
|
||||
- [x] RoPE scaling (linear/YaRN), memory planner, context policy and the 262144 pin lift in Rust, with bit-level goldens from the Original C++ on macOS: `docs/rope-and-memory-plan.md`. The committed PTX of four kernels is not regenerated; the lifted contexts (2x256K, 1x512K) are admitted by arithmetic only.
|
||||
- [x] Sampler reference (Philox, penalties, top-k/top-p/min-p, coupled-draft counters) bitwise against the Original host reference (322 cases), request plumbing and per-request host sampler: `docs/sampler-reference.md`.
|
||||
- [x] Serving surface: operational HTTP routes, CORS, aliases, idle unload, reload gates, stall watchdog, MCP hub, conversation cache/parking/checkpoints, control vectors, SVE1 files and M-RoPE positions, replayed against the Python handlers or golden-tested against Original host code.
|
||||
- [x] Original-literal CUDA leaves and host owners (QSA, GDN, GR, PLE, MoE, MMQ, native head, sampler, MTP drafter and loader, verifier arena/schedule, window launch plans, prefill scheduling model, expert cache/stager/file source): source-complete and type-checked, with host-executed oracles for several planners and summation orders.
|
||||
- [x] KAR level 2..5 decode on CUDA and the KAR routed-expert source: CPU kernel model matches the CPU oracle bit for bit; the CUDA source is not compiled. `docs/experiments/2026-10-14-kar-levels-gpu-port.md`.
|
||||
- [x] Experimental modes (Q4_0/K8V4/rotated-INT8 KV, Keyless V-only, control vectors, KV streaming, remote-experts planner): references and literal CUDA sources with an emulator-based check; everything is off by default and refuses to load until the forward pass consumes it. `docs/experiments/2026-10-14-experimental-modes-port.md`.
|
||||
- [ ] Build and seal the PTX with the pinned toolkit (CUDA 13.0.88, `scripts/build-original-verify-ptx.sh`): regenerate the four RoPE/stream PTX, seal `original_verify_window_moe_experts` and `original_verify_window_qsa_gate`, seal any remaining placeholder PTX (the audit of 2026-10-12 listed the native head, original sampler, MMQ group and MTP scalar assets), freeze `experimental::PINS`, decide the fast-math re-seal question in `docs/cuda-seal-plan-additions-window.json`.
|
||||
- [ ] Link the engine: the runtime-side wiring of the window recorder (weights, QSA/PLE journals, CPU pool callbacks, graph registration), the serving owner that selects `OriginalSpecController`, and the multi-GPU stage handoff (`PORT-GAPS-MODE17.md`).
|
||||
- [ ] Run the ignored GPU smokes on the Linux GPU host (`--ignored`: window, MTP bank, KAR levels, experimental programs, sampler, verifier) and record results.
|
||||
- [ ] Original17 parity: same prompts, greedy token ids identical between the Original and the Rust port, then sampled-path parity with recorded seeds. Nothing beyond the earlier preview-generation run (one 202-token prompt, 32 greedy tokens) has been compared on a GPU.
|
||||
- [ ] Linux execution of the Linux-gated unit tests in `leleka-cuda-driver` and `leleka-runtime` (they are only type-checked on macOS); `scripts/linux-tests/run.sh` (branch `claude/port-linux-tests`) is the intended harness.
|
||||
- [ ] Performance and quality gates per `PROJECT_CHARTER.md`: controlled baseline with paired A/B, model-quality gate for every lossy mode, 1x256K baseline, then 2x256K and 1x512K. `docs/performance-ledger.md` still has no entries.
|
||||
|
||||
## CI/CD policy
|
||||
|
||||
Pull requests and main commits run Rust format, Clippy, tests, synthetic replay, and CPU engine tests on Linux. CI builds a static musl **CLI/control-plane** artifact and checks that it has no ELF interpreter. Version tags can publish this artifact with a SHA-256 checksum; a full GPU release waits for a Linux CUDA build, runtime smoke test, and signed-off model quality gate. No model weights or tokens enter CI artifacts.
|
||||
|
||||
## Current status
|
||||
|
||||
P0 has local CI assets; Linux/arm64 and Linux/x86_64 musl control-plane/CLI artifacts ran successfully, with the x86_64 artifact checked on the RTX 5090 host. Hosted Actions still needs a GitHub repository and runner. P1 has `model fetch` and `model verify`; both real shards passed their manifest SHA-256 values on the Linux NTFS volume. P2 has bounded GGUF indexing, real-tokenizer parity against upstream, pinned ggml CPU decoding with checked block geometry, and an experimental bounded-memory sharded GGUF-to-KAR path. Streamed policy v4 partitions the giant per-layer tensor so its bit-plane stride fits KAR-2. The complete level-2 archive was produced from both verified shards: 55,295,529,472 bytes from 83,617,662,656 source bytes (66.13%); an independent verifier passed source identity, KAR records, payload CRCs, archive hash, and provenance. Its maximum tensor relative L2 error was 0.68008092. A separate 18,827,008-byte level-3 overlay for 22 high-distortion records reduced paired full-record relative L2 for every selected tensor, but no serving loader applies it yet. These numerical results do not pass the model-level quality gate. Sampled IQ3_S values matched pinned ggml bit for bit, and selected archived ranges were independently decoded and compared with GGUF values. An isolated Linux CUDA smoke matched CPU output checksums for two real overlay records. An opt-in PLE-only GPU row cache now decodes compressed rows inside the serving engine; a 4,097-token cross-part gather matched CPU KAR byte for byte, and short paired 128-token runs produced identical output. Its small measured throughput differences are not an accepted end-to-end gain, and expert weights still use the native pack. A separate custom V→K regression screen reported 0.3023 attention-output relative L2 error on a limited held-out proxy. It did not implement the cited Keyless Attention query-routing method and cannot establish whether that method preserves quality. The physical V-only cache, query-routing CUDA kernels, frozen-routing calibration and console agent experiments are now implemented and tested on RTX 5090. Technical gates passed, while both pretrained Qwen V-only agent variants failed model quality and remain opt-in; see `docs/experiments/2026-10-04-keyless-runtime.md`. No V-only production trial or speed improvement is qualified; see the methodology correction in `docs/experiments/2026-10-03-v-only-screen.md`. The Responses route has a restricted preview backed by the worker queue, including live text SSE deltas, cancellation, completed streaming function calls with schema checks, stateless tool-result replay, and bounded process-local `previous_response_id` continuation, tested with a mock worker. Live reasoning, full-model quality, native-versus-GPU agent throughput, and a complete single-file GPU runtime remain pending.
|
||||
Last reviewed 2026-10-14 against branch `claude/port-main`. No performance or model-quality result is claimed on this page.
|
||||
|
||||
**Delivery (P0, P1).** The control plane builds as a static musl CLI/control-plane artifact and passes format, Clippy and test gates in the existing Linux workflow. Hosted Actions still needs a GitHub repository and runner; the workflows also reference a Gitea runner. `model fetch` and `model verify` passed both real IQ3_S shard SHA-256 values on the Linux NTFS volume.
|
||||
|
||||
**Offline model preparation (P2).** The Python offline tools of the Original are ported to Rust and checked live against the unmodified Python on synthetic inputs (no model data): native pack 2755 cases, GGUF header 400, tokenizer 14.5M pre-tokenizer strings, dequantization 69 fixtures across 23 block types, small packers, MTP fetch (10 scenarios), chat template 3000 cases (`docs/offline-port.md`). Deliberate divergences and the tools not ported (`pack_index.py`, `strata_pack.py`, `pack_layer.py`, `canonical_xcheck.py`: Q2_0/AVX-512 only) are listed there. These differentials did not run on the real shards.
|
||||
|
||||
**KAR and Keyless (pre-port results, unchanged).** The complete level-2 KAR archive was produced from both verified shards (55,295,529,472 bytes from 83,617,662,656 source bytes, 66.13%; independent verifier passed; maximum tensor relative L2 error 0.68008092) and a level-3 overlay of 22 records reduced the error of every selected tensor. These numbers do not pass the model-level quality gate and no serving loader applies the overlay on the production path. An opt-in PLE-only GPU row cache and the Keyless V-only experiments ran on an RTX 5090 earlier; both pretrained Qwen V-only agent variants failed model quality and remain opt-in (`docs/experiments/2026-10-04-keyless-runtime.md`). No KAR or V-only speed improvement is qualified.
|
||||
|
||||
**API and worker (P3).** The Responses route streams text, completed function calls and reasoning events and supports cancellation, stateless tool-result replay and bounded process-local `previous_response_id`; Chat Completions, Messages and the operational routes of the Python server (`/props`, `/slots`, `/settings`, `/load`, `/unload`, CORS, aliases, idle unload) exist. All of it is tested against mock workers and recorded fixtures. Reasoning-budget wrap-up (`reasoning_budget.rs`) is a tested port of the loop; its wiring into the live worker is open (`docs/offline-port.md`). Live reasoning through a real engine, replay against the upstream server and full-model quality remain pending.
|
||||
|
||||
**Rust port of the Original engine (`claude/port-main`).** The branch is a Rust host and orchestration layer around CUDA sources that are literal or adapted copies of the Original kernels, loaded through the CUDA driver API; production serving stays independent of Python. What exists, module by module, is in [`port-status.md`](port-status.md). In short:
|
||||
|
||||
- Pure Rust with executed CPU oracles on macOS: offline tools, RoPE/YaRN tables, memory planner and context policy, sampler chain, serving policy (CORS, idle, watchdog, stride, timings), conversation cache, experimental-mode references, KAR level decode model, tokenizer, quantization dequantizers.
|
||||
- Source-complete and type-checked only: the CUDA driver wrappers, the native head, MTP drafter and loader, verifier window recorder, prefill scheduling, expert cache and stager, QSA/GDN/GR/PLE/MoE/MMQ owners, and the KAR routed-expert source. `cargo check --target x86_64-unknown-linux-gnu --all-targets -p leleka-cuda-driver --features cuda-driver -p leleka-runtime` passes; the tests of these two crates compile but were not run on Linux by this effort.
|
||||
- Not built: the PTX of the new or changed kernels is not regenerated or sealed, and the engine is not linked. Unsealed assets fail closed (zero pins, refusing constructors).
|
||||
- Not run on a GPU: everything above. The only GPU evidence is the earlier preview-generation run (identical greedy ids for one 202-token prompt; it was far slower than the Original and scaled variants exhausted VRAM), which predates the Original-literal code and does not qualify it.
|
||||
- Known test debt on the macOS development host: thirteen worker tests in `strata-control` and four in `leleka-model-format` fail on macOS because of process and path assumptions (also on the base branch); `leleka-cuda-driver`, `leleka-runtime` and `leleka-native-cpu-expert` do not build natively on macOS; `cargo fmt --check` is not clean for `leleka-model-format`, `leleka-experimental-ref`, `leleka-cuda-driver`, `leleka-runtime` and `leleka-native-cpu-expert`.
|
||||
|
||||
**What remains.** Build and seal the PTX, link the engine, run the GPU smokes, establish Original17 parity, execute the Linux-gated tests, then the charter's controlled baseline, paired A/B and quality gates. Until the performance ledger has entries, nothing here is a performance claim.
|
||||
|
||||
References: [NVIDIA CUDA 13.0 release notes](https://docs.nvidia.com/cuda/archive/13.0.0/cuda-toolkit-release-notes/index.html), [NVIDIA driver components](https://docs.nvidia.com/deploy/cuda-compatibility/latest/why-cuda-compatibility.html), and [Rust musl target support](https://doc.rust-lang.org/rustc/platform-support.html).
|
||||
|
||||
Reference in New Issue
Block a user