Commit Graph
19 Commits
Author SHA1 Message Date
adm df120e6f5f [Core] Per-visit ShortConv history (exact strata hist_pool_all + visit*stride)
Root cause found by reading strata run_sconv: the ShortConv history pool is
indexed by GLOBAL VISIT (hist_pool_all + rec_visit*stride), so each core pass
has its OWN history ring -- history does NOT carry across the 3 passes for the
same token. The previous shared-per-layer history made pass 1 read pass 0's
input as history (wrong). LayerState now holds hist_k/v/a/m as [DeviceBuf;3]
indexed by pass; layer_forward_swa/full + run_layer take a pass index (prelude/
coda=0, core=0/1/2). For a fresh token every visit reads zero history, matching
the reference. Single-token argmax moved (8->183618), confirming history matters.

Verified: cargo test --workspace + hip 17/17 + lean 0 sorryAx green.
2026-12-01 15:51:34 +01:00
adm 1221ac094a [HIP] BF16 round-to-nearest-even parity (cast, ctrl pack, shortconv history)
Reference comparison (strata-inkling --serve ground truth) exposed a systematic
precision bug: vetta truncated f32->bf16 (>>16) while the reference f32_to_bf16
rounds to nearest even (0x7FFF + ((u>>16)&1)). Truncation bias accumulates over
the 48-visit loop and drifts the residual stream.

- k_cast_f32_bf16: round-to-nearest-even (was truncation).
- k_ctrl_pack: packed cur/msg bf16 now round-to-nearest-even.
- k_shortconv4_decode / k_shortconv4_dyn_decode: history ring rounded through
  bf16 between steps (exact strata "Round through BF16 between steps"), via a
  new bf16_round device helper.
- CPU oracles updated to match (packer bf16_trunc, hip f32_to_bf16 + the
  shortconv/controller test history shifts).

Effect on the full forward (single token 100, reference argmax 68014):
argmax moved 100 -> 8 and logit[68014] rose 8.6 -> 11.1 (toward the reference),
confirming the rounding fix is real and directional. Generation from "The
capital of France is" (prompt ids verified identical to the reference) now
produces structured text but the argmax still diverges from the reference
" Paris" — further precision/composition parity is in progress (reference uses
fp16 KV cache + fp16 expert input; candidate next mismatches).

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
GPU 17/17 (--features hip, --ignored) green with the rounded oracles;
lean proofs (5 files) green.
2026-12-01 15:43:31 +01:00
adm edcfab6548 [LD] correctness debugging infra: full-attn CPU parity + stage bisect + dbg taps
Reference-ground-truth debugging continues (strata-inkling --serve gives the
correct continuations). Added diagnostics to isolate the remaining divergence:

- real_full_attn_layer_end_to_end: full CPU oracle for the full-attn layer
  (ip=5): 3-query mix split + separate q/k/v norms + distinct-input projections
  + dyn ShortConv (reversed taps) + global attention + MoE. Currently FAILS
  (max_rel_err 5.876) with IDENTICAL expert selection GPU==CPU — so the bug is
  downstream of routing, in the attention-output -> MoE-input path, not a
  router tie-flip. Kept as an #[ignore] diagnostic tracking the open bug.
- full_attn_bisect: stage-by-stage GPU-vs-CPU comparison (mix/norm/projections/
  dyn-shortconv) reporting max_rel + max_abs + rel-on-large-values. Findings:
  mix/norm match (~1e-6); GEMM absolute error ~1e-3 (benign bf16 rounding, the
  large max_rel is an artifact of the 1e-3 floor on near-zero outputs).
- sconv_dyn_step CPU helper; env-gated VETTA_DBG_NORM (residual/block norms)
  and VETTA_DBG_IDS (selected experts) taps in the layer forwards.

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (5 files) green. The full-attn parity diagnostic is #[ignore] and
known-failing (open correctness bug under investigation).
2026-12-01 15:36:03 +01:00
adm b1bb4e13be [LD] autoregressive generation + 2 correctness fixes vs reference engine
Added a reference-ground-truth debugging loop: drove the strata-inkling
reference engine (--serve, GEN protocol) on the same prompts to obtain the
correct continuations, then compared against vetta's forward.

- tokenizers crate (fancy-regex) added to vetta-infer-ld for real BPE
  encode/decode from tokenizer.json.
- forward_inkling_with_state: stateful variant exposing the persistent
  per-layer KV cache + shortconv history across decode positions, enabling
  autoregressive prefill + generation. forward_inkling wraps it with fresh state.
- generate_continuation_real_prompt test: encode prompt -> token-by-token
  prefill -> greedy sampling via the hardened abi sampler -> decode.

TWO REAL BUGS FOUND via reference comparison (reference: "The capital of
France is" -> " Paris."; single token 100 -> argmax 68014):
1. embed_token omitted embed_norm: the reference k_embed_lookup fuses gather +
   RMS-normalize with embed_norm.weight. Fixed (gather then rms_norm).
2. full-attn ShortConv static_w transpose had REVERSED tap order: reference
   upload_sc uses kt[c*4+(3-lag)] = kw[lag*kv_dim+c]; fixed to match.

NOTE: generation is still divergent after these two fixes (single-token argmax
moved 120533 -> 100, reference 68014); further correctness debugging is in
progress. These two fixes are verified-correct against the reference semantics.

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (5 files) green; generation + full-forward tests run
(--features hip, --ignored).
2026-12-01 15:28:20 +01:00
adm 3c870743fe [LD] FULL Inkling-2-Mini forward runs end-to-end (loop + controllers + MXFP8)
The complete 48-visit Inkling forward now runs on real weights on gfx1150:
prelude [0,6) -> core [6,18) x3 passes (bank rollback + cross-pass msgs +
gain/forget controllers on passes 1,2) -> coda [18,24) -> final depth mix +
unembed + softcap. Produces finite, softcap-bounded logits over vocab 201024
(argmax 120533, logit 19.219) in ~1.9s.

- k_mxfp8_gemv / vetta_mxfp8_gemv + ue8m0_to_f32: MXFP8 experts (layers 20..23
  are F8_E4M3 + UE8M0/32, NOT NVFP4). y[n] = sum_k e4m3(W[n,k]) *
  ue8m0(scale[n,k/32]) * x[k], no outer scale. Real layer-20 expert parity
  1.45e-4 vs CPU dequant oracle. This is the engine-side per-layer precision
  composition: layers 0..19 NVFP4, 20..23 MXFP8, dispatched transparently.
- packer: ExpertMatrix.mxfp8 flag + load_expert_matrix auto-detects the format
  (amax tensor presence) + expert_gemv dispatch.
- ld::layer: ControllerWeights/load_controllers + apply_controller (RMS pack ->
  down GEMM -> gain/forget GEMM -> gating); LoopMsgs; layer_forward_swa/full
  take Option<(&ControllerWeights,&LoopMsgs)> (has_msgs path: 3 separate
  controlled inputs for SWA, controllers before attn norm / after mlp norm).
- is_swa + load_msg_queries (stacked cross-pass queries) + run_layer (SWA/full
  dispatch, persistent per-layer state across passes) + forward_inkling (the
  proven schedule from proofs/inkling_loop.lean, incl. bank rollback).
- full_inkling_forward_logits test: whole-model forward -> finite bounded logits.

NOTE: the forward RUNS and is bounded; bit-parity of the generated token vs the
reference engine is the next verification step (no correctness claim yet).

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (5 files) green; GPU 18/18 + MXFP8 real parity + full forward PASS
(--features hip, --ignored).
2026-12-01 15:14:05 +01:00
adm 5ae2072981 [LD] full-attention layer forward (3-query mix, dyn ShortConv, tau, global attn)
- ld::layer: FullLayerWeights + load_full_layer + layer_forward_full +
  load_sconv_transposed (the full-attn k/v_sconv.static_w tensor is [4,C],
  transposed to the kernel's [C,4] layout). The full-attn layer step:
    mx3 = attn_res_mix(blocks, cur, attn_queries[ip-1] (3 queries)) -> split
    in0/in1/in2 = rms_norm(mx3[j], q/k/v_input_norm.weight)  (separate norms)
    q/r/gate/sink from in0; k from in1; v from in2 (distinct inputs)
    k_dyn/v_dyn = in1/in2 @ k/v_sconv.weight_proj; dyn ShortConv4 K/V (1/3)
    Q/R L2-clip with tau (full-attn), K clip without; relpos bias; KV store
    global flash attention (window=0); O-proj + attn ShortConv; block cadence
    MoE sublayer identical to SWA.
- full_attn_layer_end_to_end test: layer 5 on real weights, seeded with one
  depth block; finite residual + correct cadence (ip=5 %6!=0 -> no snapshot).
  Smoke-verified composition (all constituent kernels are individually
  parity-verified); a full CPU-oracle parity of the full-attn wiring is a
  follow-up refinement.

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (5 files) green; full-attn layer end-to-end PASS
(--features hip, --ignored).
2026-12-01 15:02:17 +01:00
adm 2dd9ff952c [HIP][LD] softcap kernel + correct final output path (AttnRes output mix + softcap)
- k_softcap / vetta_softcap: logits = cap*tanh(x/cap), the final logit
  softcapping (Inkling cap=30). Parity vs CPU 9.7e-8; bounds |logits| <= cap.
- ld::layer::final_logits: the CORRECT final output path extracted from the
  reference — the final norm is itself an AttnRes depth mix over the block
  snapshots + cur with the learned output_query, then norm + unembed + softcap:
    h_norm = norm(attn_res_mix(blocks, cur, output_query))
    logits = softcap(unembed(h_norm), 30)
  (The earlier unembed_logits used a plain rms_norm(cur), missing the final
  depth mix; final_logits fixes that.)
- multi_layer_prelude_forward now uses final_logits: argmax token 128538
  (logit 19.16, bounded by 30). The token shifts vs the plain-norm path,
  confirming the final output mix materially affects the result.

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (4 files, 42 theorems) green; GPU softcap + multi-layer final PASS
(--features hip, --ignored).
2026-12-01 14:51:40 +01:00
adm ff524df917 [LD] multi-layer SWA forward + final norm + unembed -> logits on real weights
- ld::layer: embed_token (real BF16 embed table gather), unembed_logits
  (final norm -> cast -> unembed GEMM over vocab 201024), forward_swa_layers
  (run a schedule of SWA layer steps over an embedded token, threading the
  shared depth-block residual stream across layers).
- multi_layer_prelude_forward test: layers 0..4 composed end-to-end on real
  weights + final norm + unembed -> finite logits, argmax token 183248
  (logit 23.94). Asserts the cross-layer depth-block cadence (prelude 0..4
  snapshots only at ip=0 -> exactly one block). Proves the verified layers
  compose across the deep-residual stream, not just in isolation.

This is a partial (prelude, single-pass) forward — a real multi-layer run
producing logits, NOT yet correct generation. Remaining for a correct first
token: full-attn layers {5,11,17,23} (3-query mix split + tau + dyn shortconv +
global attention), loop controllers (gain/forget/down) for the 3x core passes,
multi-pass bank rollback (prelude/core/coda), final logit softcap + sampling.

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (4 files, 42 theorems) green; multi-layer prelude forward PASS
(--features hip, --ignored).
2026-12-01 14:46:54 +01:00
adm 0929bde578 [LD] reusable GPU layer forward (ld::layer) with persistent per-layer state
- ld::layer (feature hip): LayerWeights (load_layer reads all attention + MoE
  weights + learned depth-mix queries for a physical step ip), LayerState
  (persistent KV cache + ShortConv history rings, new_state), Dims, and
  layer_forward_swa — a complete SWA layer step composing the verified
  microkernels with the exact Inkling deep-residual cadence:
    ip==0: in0=attn_norm(cur); ip>0: in0=attn_norm(mix(blocks,cur,attn_query))
    attention block -> asc; ip%block_size==0: snapshot cur->blocks, cur=asc
      else cur+=asc
    mlpin=mlp_norm(mix(blocks,cur,mlp_query)); MoE block; cur+=mlp_sconv(moeout)
  The depth-block snapshots are owned by the caller (the forward residual
  stream); experts loaded on demand (zero requantization).
- Refactored real_full_layer_end_to_end to drive the GPU side through
  layer_forward_swa; the unchanged full CPU oracle still verifies it
  (max_rel_err 6.6e-4, identical experts) AND asserts the ip=0 block snapshot.
  This is the reusable foundation for the multi-layer forward.

Scope: SWA layers without loop controllers (prelude). Full-attn 3-query split,
loop controllers (gain/forget/down) and multi-pass bank rollback come next.

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (4 files, 42 theorems) green; real full layer via reusable fn PASS
(--features hip, --ignored).
2026-12-01 14:46:05 +01:00
adm 25ffc820f8 [LD] FULL real Inkling layer end-to-end — deep-residual block-mix cadence verified
- real_full_layer_end_to_end test: a complete Inkling layer-0 (SWA, ip=0) runs
  end-to-end on real weights with the EXACT deep-residual cadence:
    in0 = attn_norm(cur)                 (ip==0: no attention mix)
    asc = attention block(in0)           (projections..flash SWA..O-proj..sconv)
    ip%block_size(6)==0: block0 <- cur; cur = asc   (snapshot + replace)
    mlpin = mlp_norm(attn_res_mix([block0], cur, mlp_queries[0]))
    moeout = MoE block(mlpin)            (router..8 NVFP4 experts..reduce)
    cur += mlp_sconv(moeout)             (MoE residual is a plain add)
- Extracted the exact residual rules from the reference: the AttnRes block
  snapshot/replace applies ONLY to the attention output (ip%6==0 snapshots cur
  then cur=asc, else cur+=asc); the MoE output is always a plain residual add.
  The MoE input is a learned AttnRes mix over block snapshots + cur (mlp_queries).
- Parity vs a full CPU oracle (incl. the block-mix softmax over depth states):
  max_rel_err 6.6e-4, router experts [116,69,124,72,18,64,106,0]. A complete
  real Inkling layer now composes correctly — the deep residual is not a plain
  add but the learned block mixture, reproduced exactly.

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (4 files, 42 theorems) green; real full layer PASS
(--features hip, --ignored).
2026-12-01 14:43:01 +01:00
adm 77c86535d0 [LD] REAL attention block end-to-end on Inkling weights — both layer halves now compose
- real_attention_block_end_to_end test: the attention half of a real Inkling
  layer-0 (SWA) runs end-to-end on real weights, composing the verified kernels:
  attn_norm -> cast -> 6 projections (wq_du/wk_dv/wv_dv/wr_du/gate_attn/
  attn_sink_proj via gemm_bf16) -> ShortConv4 K/V -> Q/R/K L2-clip (qk_clip
  22.627, rel_clip 8.0, tau off for SWA) -> relpos bias projection -> KV store
  (K clipped, V RMS-normalized) -> flash SWA GQA (window 1024 + relpos + sink +
  sigmoid gate) -> cast -> O-proj (wo_ud) -> attn ShortConv4.
- Run T=3 sequential decode steps so the KV cache + shortconv history rings
  grow autoregressively; parity vs a FULL CPU oracle at every step:
  max_rel_err 2.9e-6 / 3.9e-6 / 5.1e-6. The bf16 cast boundaries (input norm ->
  projections, attn out -> O-proj) are handled explicitly.
- With the real MoE block (5.6e-4), BOTH halves of a real Inkling layer now
  compose correctly on real data. Next: join them into a full layer with the
  AttnRes block-mix residual cadence (block_size=6), then loop controllers +
  multi-layer forward + lowering + sampling.

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (4 files, 42 theorems) green; real attention block PASS
(--features hip, --ignored).
2026-12-01 14:40:20 +01:00
adm a5ee804641 [LD] REAL MoE block end-to-end on Inkling weights — verified kernels compose
- real_moe_block_end_to_end test: the MoE half of a real Inkling layer runs
  end-to-end on real layer-0 weights, composing the verified kernels:
  mlp_norm (rms_norm) -> cast f32->bf16 -> router GEMM (gate.weight [128,2304]
  BF16) -> sigmoid top-8 router (gate.bias, route_scale=8) -> 8 real NVFP4
  experts (w13 GEMV -> SiTU beta4/lb25 -> w2 GEMV, outer=amax/denominator) ->
  weighted reduce.
- Parity vs a FULL CPU oracle (rms_norm + bf16-truncate cast + BF16 router GEMM
  + sigmoid top-8 + per-expert NVFP4 dequant GEMV + SiTU + reduce): router ids
  match exactly ([31,124,0,7,69,121,14,2]), output max_rel_err 5.6e-4.
- This is the integration milestone: the individually-verified kernels compose
  into a correct real MoE block on real data, with the bf16 cast boundary
  handled explicitly (the dtype-mismatch bug class). The MoE half of a real
  Inkling layer now runs correctly; the attention half is next.

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (4 files, 42 theorems) green; real MoE block PASS
(--features hip, --ignored).
2026-12-01 14:33:27 +01:00
adm 00a6993c50 [LD] NVFP4 expert packer (amax/denominator scaling) verified on real Inkling weights
- ld::packer: ExpertMatrix + load_expert_matrix(layer, e, "w13"|"w2") loads a
  real NVFP4 expert from safetensors with ZERO requantization — packed E2M1
  [N,K/2] + E4M3 group scales [N,K/16] to device as-is, outer_scale =
  amax[e] / denominator (denominator tensor read, default 2688 = 448*6 when
  absent — exact strata ink_safetensors_loader semantics).
- Real-weight parity test: layer-0 expert-0 w13 [2304,2304] loaded from the
  real archive, nvfp4_gemv on GPU vs a CPU dequant oracle over the real
  packed bytes + scales + outer_scale. max_rel_err 2.8e-4 (f32 accumulation
  order over K=2304; math identical). Confirms the expert scaling + layout
  against real Inkling data — the key brick for the layered MoE forward.

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (4 files, 42 theorems) green; real expert NVFP4 parity PASS
(--features hip, --ignored).
2026-12-01 14:24:07 +01:00
adm fb94f2321c [LD] GPU weight packer + FIRST real-weight GPU run (Inkling trunk)
- ld::packer (feature hip): load_raw (tensor bytes -> DeviceBuf, dtype
  preserved) + load_bf16_as_f32 (BF16 norm weights upcast to f32 for the
  rms_norm kernel, matching the reference). The bridge from canonical IR to
  GPU-resident weights; the seam where the per-layer loading/precision policy
  (engine-side composition) will be applied.
- FIRST REAL-WEIGHT GPU RUN: load the real Inkling trunk (~1.85 GB: embed +
  unembed [201024,2304] BF16, embed_norm + final_norm) and run embed ->
  embed_norm -> final_norm -> cast -> unembed on gfx1150, producing real
  logits over vocab 201024 + argmax token (20612, logit 27.77, all finite).
  Trunk-only skip-layer baseline — proves packer + executor + sampling on
  real data end-to-end. The full layered forward + Inkling parity refinements
  (AttnRes block-mix etc.) come next for correct generation.
- ld: optional hip + rt deps, feature-gated (default workspace stays
  host-independent).

Verified: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
lean proofs (4 files, 42 theorems) green; real-weight trunk run PASS
(--features hip, --ignored).
2026-12-01 14:19:54 +01:00
adm f57060caa7 [LD][ABI][Docs] Inkling base decode graph emitter (675 ops, arena-validated) + full forward blueprint
- ld::inkling_graph: emit_decode_base() generates the complete base decode
  forward from the IR over the unrolled physical schedule: embed ->
  [per-layer: norm -> QKV -> flash -> O-proj -> residual-add -> MLP norm ->
  router -> experts w13/w2 -> reduce -> residual-add] -> final norm ->
  unembed. Live-verified on Inkling: 675 ops, 236 arena decls, validated by
  abi::arena (no overlap / checked bounds / no use-before-write). This is
  the structurally-complete base; Inkling parity refinements (learned
  AttnRes block-mix, loop controllers, ShortConv4, relpos, SWA window,
  paged KV) layer on top next.
- abi::vplan: add the Inkling stage opcodes AttnResMix, ShortConv4, LoopCtrl,
  L2Clip, KvStore, RelPosBias, MoeRouterTopk, VecAdd (30 total, roundtrip).
- ld::inkling_ir: LlmComp derives Copy (used by value in the emitter).
- docs/inkling-forward-design.md: full per-layer sequence extracted from
  forward_batch_chunk (k1 AttnRes block-mix + controllers, k2 projections +
  shortconv + relpos + KV store, k3 flash, O-proj block-boundary rule, k4
  sigmoid router + SiTU experts), real scratch buffer set, deep-residual
  block mechanism (block_size=6 snapshots + learned queries).

Verified live: RUSTFLAGS="-D warnings" cargo test --workspace = 97/97 PASS;
5 ignored live tests pass (base graph 675 ops); lean proofs (4 files, 42
theorems) green.
2026-12-01 04:39:08 +01:00
adm d478787863 [LD][ABI] Inkling plan foundations: physical schedule + scratch arenas + graph emitter (trunk)
- ld::inkling_plan: physical_schedule() unrolls the looped core (verified
  against the reference logical->physical mapping; Inkling = 6 + 3x12 + 6 =
  48 physical steps over 24 logical layers). scratch_layout()/scratch_plan()
  lay out the decode activation arenas (residual/q/k/v/attn_out/moe/logits),
  4 KiB-aligned with checked offsets, validated by abi::arena.
- ld::inkling_graph: GraphBuilder accumulates arena decls (scratch=0,
  weights=1, inputs=2) + a flat op sequence and validates the whole plan
  (no overlap, checked bounds, no use-before-write) via abi::arena.
  emit_trunk() emits the first complete sub-graph: embed(+embed_norm fused)
  -> final norm -> unembed, arena-validated. The per-layer k1->k4 body plugs
  into the same builder next.
- abi::vplan: add GemmBf16 opcode (BF16 trunk/unembed GEMM).
- docs/inkling-forward-design.md: forward blueprint grounded in the strata
  reference (k1->k4 stage order from kernel numbering, real scratch buffer
  set, loop structure, two forward paths main-LLM + MTP DSpark).

Verified live: RUSTFLAGS="-D warnings" cargo test --workspace = 96/96 PASS;
4 ignored live tests pass; lean proofs (4 files, 42 theorems) green.
2026-12-01 04:35:46 +01:00
adm 465315ae94 [LD] Inkling ModelImporter foundation: typed config + total tensor classification + validated IR assembly
- ld::inkling: parse_config(config.json) -> InklingConfig (TextConfig,
  LoopConfig, MtpConfig), checked extraction + consistency guards
  (top_k <= n_experts, n_head % n_kv == 0, core_start < core_end).
  full_attention_layers() = complement of local_layer_ids ({5,11,17,23}).
- ld::inkling_ir: classify(name) -> TensorRole, the total tensor-name ->
  typed-role mapping (trunk, per-layer attn projections/sconv/controllers/
  norms, NVFP4 router+experts, attention-residual/cross-pass queries, vision).
  Unknown names -> None (explicit rejection). Verified TOTAL on the live
  archive: 1244/1244 classified, 24 layers.
- ld::inkling_ir: assemble()/assemble_archive() -> InklingIr (trunk + 24
  LayerIr + vision), structural validation vs config (layer count, embed
  shape = vocab x hidden, required per-layer components, expert first dim =
  n_experts). Attention-norm validation is type-aware: SWA layers use
  attn_norm, full-attention layers use q/k/v_input_norm (discovered + fixed
  via the live test, verified on the inventory).
- Opt-in #[ignore] live tests against /mnt/models/Inkling/safetensors
  (config, classification completeness, IR assembly) — all pass; default
  suite stays host-independent.

Verified live: RUSTFLAGS="-D warnings" cargo test --workspace = 87/87 PASS;
3 ignored live tests pass; lean proofs (4 files, 42 theorems) green.
2026-12-01 04:27:56 +01:00
adm fb92662106 [ABI][LD][Proofs][Docs] M1 groundwork: arena-safety proof + .vbundle contract; embedder lane (M1.5) accepted
- proofs/arena_plan.lean: memory.vplan arena safety (8 theorems + 4
  computational examples, 0 sorryAx): no overlap, checked index bounds,
  no use-before-write, overlap-rejection completeness.
- abi::arena: validator mirroring the proof, checked offset arithmetic
  (invariant #2), explicit error per violation class; 8 tests.
- abi::bundle: .vbundle manifest (ABI_VERSION=1, source+packer fingerprints,
  backend target; incompatible ABI rejected explicitly), checked
  memory.vplan/graph.vplan parsing, arena-validated compile(); 7 tests.
- ld::bundle: read-only load_bundle_plans(dir) over manifest + plan/*.vplan;
  3 tests (good bundle, missing file, ABI mismatch).
- abi::vplan: encoder-lane opcodes (layer_norm, flash_full_attn, gelu_erf,
  mean_pool_l2norm) + wire name mapping for all 22 opcodes, roundtrip test.
- Docs: utility-encoder scope carve-out (dense decoder LMs out, small
  fully-resident encoders in), embedder-lane wire proposal + characteristic
  parity vs vetta-semantics (cosine vs oracle, internal bit-exact goldens),
  16-primitive kernel set, M1.5 milestone; README/AGENTS aligned
  (65 tests, 42 theorems across 4 proof files).
- review/: tandem exchange with the strata-ctl coder (their request +
  observations, our formal reply: embedder accepted, M0 dir cleanup done).

Verified live: RUSTFLAGS="-D warnings" cargo test --workspace = 65/65 PASS;
lean proofs/{slab_ring_dma,bus_lifecycle,serve_session,arena_plan}.lean green,
standard axioms only.
2026-11-30 15:22:00 +01:00
adm 7b50f1c07c [ABI][KN][LD][CC][RT][LAB][SP][NT][TM][GW][Proofs][Docs] M0.5: realign workspace to vetta-infer-* microkernel architecture
Dissolve the M0 crates (core/io/proto/telemetry/hip/cli) into the approved
service layout abi/kn/ld/cc/rt/lab/sp/nt/tm/gw (docs/ARCHITECTURE.md).

- kn: Lean-verified control bus + service registry (bus_lifecycle.lean, 14 thms)
  and SlabRing/UMA broker; rt: PrefixState + hybrid checkpoint pool.
- sp: faithful throughput-aware Adaptive-K port of clover_policy.h
  (cooldowns, probes, throughput guards) with scenario parity tests.
- gw: strata-ctl-compatible wire emitters + serve session FSM
  (serve_session.lean, 10 thms); abi::serve accepts image= (Vision delta closed).
- abi: pure contracts, checked JSON/VTC1/GEN parsers, zero-alloc sampler.
- ld/cc: checked safetensors reader + write-once VTC1 writer / O_RDONLY reader.
- tm: lock-free telemetry; nt: LyraRpc; lab shares the rt executor core.
- Docs: ARCHITECTURE.md decision-complete spec (MoE-only scope, .vbundle,
  .vplan->CompiledPlan, wire contract, migration map); AGENTS.md Lean rule
  + tandem/review workflow.

Verified live: cargo test --workspace -D warnings = 46/46 PASS;
lean proofs = 34 theorems (slab_ring_dma 10, bus_lifecycle 14, serve_session 10),
0 sorryAx, standard axioms only; vetta-infer info on Inkling = 1244 tensors,
18.18 GiB, checked bounds.
2026-11-30 00:54:00 +01:00