Profiling the speculative verification pass (batch_cost, position 900) showed its extra cost is compute in the int8 weight products, not expert bytes: distinct experts per layer rise only from 4 to 9.5 at 9 tokens, while the Q8_0 projections, whose weights every token shares, cost 3.6-4x a single step. Each (row, token) dot redid the MXFP4 decode and scale work. cpu-sys gains multi-activation kernels (portable, AVX2, AVX-VNNI) for MXFP4 and Q8_0 rows: the row is decoded once per 64-block segment and up to 16 activations run over it with exactly the one-token kernel's accumulators and final reduction, so every output is bit for bit the one-token kernel's (tests/multi.rs: every level, 1-16 activations, 13 row lengths). run_region uses them for jobs with two or more activations (speculative batches and prefill chunks); one-token decode keeps its kernel. A new synthetic test checks a 20-token batch at every level against feeding tokens one at a time. Model::set_multi_activation(false) restores the per-token path for paired measurements; Profile counts the expert sets read. batch_cost gains a per-size phase breakdown and an `ab` mode that runs every pass without and with the new kernels back to back and checks the logits are identical. Paired, 9 rounds, real model: identical logits in all 90 paired passes; time ratio with/without 1.01 (1 token), 0.98, 0.92, 0.90, 0.83, 0.81, 0.77, 0.79, 0.76 (2..9 tokens). MEASURED_COST becomes 0.737 + 0.421 n (was 0.30 + 0.631 n). ab_speculation (3 pairs, outputs identical in all 24 runs) gave 1.34 / 1.04 / 0.97 / 0.94, within the pair-to-pair spread of the run before the change; replaying the outputs through the drafter predicts 1.59 / 1.15 / 1.00 / 0.99, so the serving loop loses time the pass-cost model does not see. Prefill also uses the kernels (bit-identical); its speed was not measured. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Leleka / Strata Next
Leleka is the independent Rust NVIDIA inference runtime being developed from
this repository. The complete tracked Strata Next source tree was imported from
paveldhq/strata-next commit
1263e88f8947b9796924eb7e8d8d7af08b589049; see docs/upstream.md for the
pinned Strata engine provenance. The imported desktop application, Rust control
plane, deployment code, model tooling, tests, and reference engine are all here.
The migration is staged: Leleka must eventually run without a Strata process, Strata source, Python, or a separately installed CUDA Toolkit on the target host. Until the replacement passes the same protocol, model-quality, and operational gates, Strata remains the behavior baseline. No model family or performance gain is claimed for Leleka until its real-model gates pass.
Repository layout
crates/backend-api/— Leleka's versioned Rust backend contract.crates/tokenizer/— the Qwen35 byte-level BPE tokenizer extracted as a backend-independent Rust crate.desktop/,desktop-core/— current desktop application and its Rust core.control-plane/— current Rust API, Responses handling, and worker supervisor.engine/strata/— pinned upstream Strata reference; retained during migration.gpu/— experimental optimization components, including KAR.integrations/,manifests/,deploy/,scripts/— client integration, model profiles, packaging, and development/test tooling.PROJECT_CHARTER.md,docs/— requirements, provenance, decisions, and performance/quality gates.
Model weights, request captures, credentials, local logs, and generated build artifacts remain outside Git or under ignored paths.
Current Leleka scope
Leleka currently has a versioned backend contract and a standalone Qwen35 BPE tokenizer crate. The existing Rust control plane now consumes that shared tokenizer crate instead of maintaining a second copy; its oracle-parity tests remain in the workspace. Leleka still has no independent inference backend or CUDA integration, so this does not yet serve a model independently. The desktop app and the rest of the control plane remain available as migration source in this repository.
Development
Run the Rust workspace tests and lint:
cargo test --workspace --locked
cargo clippy --workspace --all-targets --all-features -- -D warnings
For the Linux release requirements, see PROJECT_CHARTER.md and the independent engine design.