[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

+35
View File
@@ -9,6 +9,7 @@ fn usage() {
eprintln!("vetta-infer {} — MoE-first microkernel inference engine (Rust + HIP)", env!("CARGO_PKG_VERSION"));
eprintln!("Usage:");
eprintln!(" vetta-infer info <safetensors-dir> Inspect shards, dtypes, and checked bounds");
eprintln!(" vetta-infer tensors <dir> [prefix] List tensors (name, dtype, shape, bytes)");
eprintln!(" vetta-infer version Print version & build info");
}
@@ -36,6 +37,26 @@ fn cmd_info(dir: &str) -> Result<(), String> {
Ok(())
}
fn cmd_tensors(dir: &str, prefix: Option<&str>) -> Result<(), String> {
let ar = SafetensorsArchive::open(dir)?;
let mut names: Vec<&String> = ar.tensors.keys().collect();
names.sort();
let mut shown = 0usize;
for name in names {
if let Some(p) = prefix {
if !name.starts_with(p) {
continue;
}
}
let t = &ar.tensors[name];
let shape: Vec<String> = t.shape.iter().map(|d| d.to_string()).collect();
println!("{name}\t{}\t[{}]\t{}", t.dtype, shape.join(","), t.byte_len());
shown += 1;
}
eprintln!("{shown} tensors listed");
Ok(())
}
fn main() -> ExitCode {
let args: Vec<String> = env::args().skip(1).collect();
match args.first().map(|s| s.as_str()) {
@@ -57,6 +78,20 @@ fn main() -> ExitCode {
}
}
}
Some("tensors") => {
let Some(dir) = args.get(1) else {
eprintln!("error: missing <safetensors-dir>");
usage();
return ExitCode::from(2);
};
match cmd_tensors(dir, args.get(2).map(|s| s.as_str())) {
Ok(()) => ExitCode::SUCCESS,
Err(e) => {
eprintln!("error: {e}");
ExitCode::FAILURE
}
}
}
_ => {
usage();
ExitCode::from(2)