Files
leleka/docs/roadmap.md
T

6.2 KiB
Raw Blame History

Strata Next implementation plan

Product shape

The target interface is one Linux command, strata-next, with serve, model fetch, model verify, model prepare, doctor, and benchmark operations. A model remains on an external volume. The command must keep production serving independent of Python. The user-facing executable may eventually contain a statically linked Strata engine, but CUDA still needs the installed NVIDIA driver and its libcuda.so. The CLI checks the existing driver; it does not install or bundle one. For the current CUDA 13.0 GA baseline, the minimum Linux driver is 580.65.06 per NVIDIA's release notes. Until engine integration is proven, the Rust executable and C++ engine remain separate build artifacts and the CLI reports that limitation clearly.

LAYERED_EXTENDED is retained as an exact user-provided term; no runtime semantics have been assigned to it yet.

Work packages

ID Package Deliverable Acceptance
P0 Linux foundation and CI Pinned Rust, Linux lint/tests, musl CLI artifact, release workflow CI builds a runnable Linux artifact and rejects format/lint/test failures
P1 Artifact acquisition Manifest-pinned model downloads, size/hash verification, safe resume, external volume Interrupted local HTTP fixture resumes; wrong hash never becomes a completed model
P2 Model preparation Inspect GGUF, tokenizer, layout; port required pack/index steps from upstream Python to Rust/C++ Prepared output matches upstream pack metadata and representative tensors
P3 Native API Tokenization, prompt template, /v1/responses, tool calls, schema, live SSE, cancellation Sanitized Codex replay has no protocol errors or missing terminal events
P4 Single executable Link/embed engine and dependencies where viable, check preinstalled NVIDIA driver, one-command startup Linux node with a compatible driver runs without Python or manual engine installation
P5 Reliability and telemetry Restart, timeouts, backpressure, metrics, graceful drain Soak and failure injection pass without orphaned slots or incomplete streams
P6 Performance and scale Controlled baseline, 2×256K, 1×512K, scheduler, opt-in KAR/Value-Only experiments Charter quality/performance gates and reproducible reports pass

Sequence and dependencies

  1. Complete P0 and P1 locally. Keep model bytes out of Git and verify every finished file by SHA-256.
  2. Port P2 with differential fixtures from upstream. Do not infer tensor correctness from a file extension alone.
  3. Connect the existing Rust worker pipe to P3. Use the real model only when the GPU node is free; use synthetic protocol tests meanwhile.
  4. Package P4 after the ABI and CUDA link strategy are measured on Linux. Do not label a control-plane-only musl artifact as the complete GPU runtime.
  5. Add P5 before production deployment, then run the baseline and P6 experiments with the charter's gates.

Task queue

P0 — Linux delivery

  • Pin the Rust toolchain and enforce format, Clippy, Rust tests, and CPU tests.
  • Add Linux CI, a musl build, ELF interpreter check, artifact upload, and tag prerelease path.
  • Run the workflow on a hosted Linux runner after this repository has its own remote.
  • Run a CUDA engine build and loader smoke test on Linux GPU hardware.

P1 — model acquisition

  • Embed a commit-pinned IQ3_S manifest with size and SHA-256 for both GGUF shards.
  • Implement resumable downloads, integrity checks, and a local interrupted-transfer test.
  • Verify a complete real IQ3_S download on an external volume and record measured digests.
  • Add disk-space preflight, multi-shard progress, retry policy, and authenticated Hub access where needed.

P2 — native model preparation

  • Inventory iq_pack.py, pack_index.py, and strata_tokenizer.py outputs and formats.
  • 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.
  • Port tokenizer extraction and the IQ3_S pack/index path without a Python runtime.
  • Differentially compare metadata, tensor bytes, and tokenizer behavior against upstream output.

P3 — API and worker

  • Validate a Responses request subset and build synthetic JSON/SSE traces.
  • Exercise GEN/T/DONE through a resident fake worker.
  • Add native tokenization and Qwen prompt formatting; connect them to the worker command queue.
  • Stream live output with cancellation, backpressure, tool calls, reasoning, and terminal events.
  • Replay sanitized real Codex sessions and compare against the upstream server.

P4–P6 — production and optimization

  • Package the C++/CUDA engine with the Rust CLI into one user-facing Linux executable where the link strategy permits.
  • Add process restart, metrics, auth, failure injection, and soak tests.
  • 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.

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 is in progress. P1 has model fetch and model verify; P2 has header-only model inspect. The existing Responses route is a validation stub; the worker generation test is synthetic. No GPU baseline or complete single-file GPU runtime has been verified.

References: NVIDIA CUDA 13.0 release notes, NVIDIA driver components, and Rust musl target support.