10 Commits
Author SHA1 Message Date
Pavlo RatushnyiandClaude Sonnet 5.5 a6f36378cf Explicit imports and generated doc headers for the small and mid-size crates (obs, gateway-*, tokenizer, context, backend-api, harmony, runtime-client, serving-policy, experimental-ref, cuda-model, engine-core, model-format, control-plane, desktop-core, deploy, npu-service, cpu-sys, native-cpu-expert headers)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 19:27:40 +01:00
Pavlo Ratushnyi d916ed9d84 STRA-338 params p03: domain names for the new structs, meaningful file names for the split modules touched 2026-11-08 00:50:56 +01:00
Pavlo Ratushnyi 1b05aba13a STRA-338 params p03: group parameters into named structs (context, cuda-model, engine-core, model-format, quant-core, sampler-ref, tokenizer, worker-protocol, kar-codec) and fix the call sites 2026-11-08 00:26:53 +01:00
Pavlo Ratushnyi 215881a4e3 STRA-338 size6 m01: kar tests (crc slicing, extents, kernel model, levels) split into helpers 2026-11-07 17:12:41 +01:00
Pavlo Ratushnyi d27f96d07d STRA-338 size6 m01: examples, gguf, resident, plan and reader tests split into helpers 2026-11-07 17:04:15 +01:00
Pavlo Ratushnyi cdfec56460 STRA-338 size: the engine crates are rustfmt-clean at 120 columns (per-crate rustfmt.toml: max_width 120, Max heuristics); width violations 6869 -> 2862 prod, 1273 -> 717 test; files that grew are re-split. Reasons for the raised census numbers: fn_lines +119 and complexity +14 are functions that cross 30 lines / 10 branches only because rustfmt put their one-line bodies on several lines (nothing was added); test lists identical (1793), 800 tests pass, the same 5 known failures; bring-up print gate lookback 20 -> 30 lines for the same reason 2026-11-06 13:03:51 +01:00
Pavlo Ratushnyi adf65a53b9 STRA-338 size: 28 oversize test files of the engine crates split by topic with scripts/dev/split_tests.py (tests keep their names, gain a topic module; 1793 tests listed before and after, same leaf names; baseline tightened: 121 -> 98 oversize files) 2026-11-06 12:41:45 +01:00
Pavlo RatushnyiandClaude Sonnet 5.5 c969796616 test(kar): windows beyond 2^32 elements decode against a direct u64 format oracle
A virtual 8.6e9-element expert bank (group 96, section above 4 GiB) is never
allocated: archive bytes are a hash of the absolute offset, the planner and
kernel model decode first/middle/last-expert windows and the final partial
group, and every element is compared bit for bit with a per-element decode
written straight from the format definition. No defect found.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 16:57:38 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 7e24f41e34 feat(runtime): KAR routed-expert weight source wired into Load and the MoE stage
KarExpertSource (pinned base + optional overlay, levels 2..=5) verifies whole
archives on the retained descriptor, validates the 48-layer expert map at load,
stages exact ranges and runs one-drain device expert FFNs; ModelBinding gains a
consuming with_kar_expert_source builder, MoeExpertStage routes experts through
it (shared expert/combine unchanged, MMQ cache refused), and NativeBackendConfig
gets kar_expert_source with identity-mixed mode digest and a Load-time probe.
The pure selection, stager, expert map and CPU reference move to model-format
so they run on macOS; the CUDA program gains a SwiGLU entry and a per-context
cached module. Linux-target type-checked only; nvcc/GPU unverified, PTX unpinned.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-14 14:55:34 +02:00
Pavlo RatushnyiandClaude Sonnet 5.5 664d434fca feat(model-format): KAR level-decode kernel model and nested record descriptor
Adds KarNestedRecord (section layout of a NESTED record, validated with the
inspector's formulas) and a literal CPU transcription of the planned CUDA
level-decode and F32 row-multiply kernels (window planning, packet layout,
thread/block decomposition, plane word and group scale addressing) for runtime
levels 2..=5. Randomized tests compare it with a transcription of the CPU
decode oracle, including partial last groups, word-unaligned ranges, expert
row windows and overlay-style per-archive dials. Verifies the specification
only; no CUDA build or GPU run.

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