[ABI][GW][Docs] encoder guard fields + sha256 provenance; Inkling tensor inventory; BGE-M3 recipe correction

- abi::bundle: manifest guard fields from the strata-ctl encoder incident
  (review/2026-12-01-guardie-encoder.md): provenance {repo_id, revision,
  shards sha256 = HF lfs.oid anchor, 64 lowercase hex validated},
  model_kind decoder|encoder (encoder REQUIRES the full encoder_recipe:
  pooling, end_text_token id, append_end_text, max_tokens, query/doc prefix,
  native_dim — never derived from architecture), calibration {floor_hit,
  peak_noise} finite in [-1,1]. Identity is provenance, not tensor shape.
- abi::sha256: pure FIPS 180-4, streaming update for GB shards, zero deps;
  NIST vectors + million-a + streaming/chunk parity tests.
- abi::vplan: pool_l2norm generalized (mode mean|cls|last_token from the
  manifest recipe), replacing mean_pool_l2norm.
- gw: `vetta-infer tensors <dir> [prefix]` subcommand; captured the live
  Inkling inventory (docs/inkling-tensor-inventory.txt, 1244 tensors:
  994 BF16 / 154 F32 / 48 F8_E4M3 / 48 U8) — ground truth for the importer.
- BGE-M3 recipe verified on the artifact: dense = CLS (1_Pooling/config.json
  + reference converter), 16 heads x 64, absolute position embeddings present;
  spec/README corrected. Ordering: Inkling first, utility after (Federico).
- review/: tandem exchange (guardie + nostra risposta + osservazioni-recipe).

Verified live: RUSTFLAGS="-D warnings" cargo test --workspace = 75/75 PASS;
lean proofs/{slab_ring_dma,bus_lifecycle,serve_session,arena_plan}.lean green
(42 theorems, 0 sorryAx, standard axioms only).
This commit is contained in:
adm committed 2026-12-01 04:17:12 +01:00
1 parent fb92662106
commit 4de272beb1
11 files changed
+2101 -12

No files matched your search

+6 -4
View File
@@ -29,7 +29,9 @@ pub enum VplanOp {
LayerNorm,
FlashFullAttn,
GeluErf,
MeanPoolL2norm,
/// Pooling + L2 normalize; mode (mean | cls | last_token) comes from the
/// manifest `encoder_recipe`, never guessed from the architecture.
PoolL2norm,
// Restricted control flow
/// Repeat the enclosed layer body for each model layer.
LoopLayer,
@@ -65,7 +67,7 @@ impl VplanOp {
Self::LayerNorm => "layer_norm",
Self::FlashFullAttn => "flash_full_attn",
Self::GeluErf => "gelu_erf",
Self::MeanPoolL2norm => "mean_pool_l2norm",
Self::PoolL2norm => "pool_l2norm",
Self::LoopLayer => "loop_layer",
Self::BranchB => "branch_b",
}
@@ -93,7 +95,7 @@ impl VplanOp {
"layer_norm" => Self::LayerNorm,
"flash_full_attn" => Self::FlashFullAttn,
"gelu_erf" => Self::GeluErf,
"mean_pool_l2norm" => Self::MeanPoolL2norm,
"pool_l2norm" => Self::PoolL2norm,
"loop_layer" => Self::LoopLayer,
"branch_b" => Self::BranchB,
_ => return None,
@@ -122,7 +124,7 @@ mod tests {
VplanOp::GdnRecurrentStep, VplanOp::MoeRouteBucket, VplanOp::MoeW13Wmma,
VplanOp::MoeW2Wmma, VplanOp::MoeReduce, VplanOp::VitFlashAttnWmma,
VplanOp::GpuPenaltiesTopk, VplanOp::LayerNorm, VplanOp::FlashFullAttn,
VplanOp::GeluErf, VplanOp::MeanPoolL2norm, VplanOp::LoopLayer, VplanOp::BranchB,
VplanOp::GeluErf, VplanOp::PoolL2norm, VplanOp::LoopLayer, VplanOp::BranchB,
];
for op in all {
assert_eq!(VplanOp::from_name(op.name()), Some(op));