Commit Graph
3 Commits
Author SHA1 Message Date
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