mesh: the real engines address their weights, so a grant's ModelIn can admit them and a receipt binds what answered #311
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/mesh-engine-weights-digest"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The gap
The real engines in
mesh-engine-gguf(Gemma and Falcon-H1) reported noweights_digestand noprecision. Two things followed:ModelIncouldn't match. #294 routes on the model a backend names, so a grant whoseModelIncaveat named its permitted model refused every real backend. A real backend names no model.The engine's own comment recorded the intended fix: address the weights once, at load, over every byte, and report nothing rather than a partial digest.
The fix
mesh_engine::weights_digest(dir, files)is the shared rule (SPEC §3.6). It is BLAKE3 over the canonical list of the files the forward pass reads, in path order. Each file is named by its path relative to the model directory and addressed by the streamed BLAKE3 of all its bytes. File names are part of the address; listing order is not.GgufEngineaddressesconfig.jsonplusmodel.safetensors, or the index plus every shard it names. A named shard missing from disk is an error, not a smaller address. It reportsfp32: the loader widens every tensor to f32.FalconEngineaddressesconfig.jsonplusmodel.safetensors. The tokenizer is not addressed: it maps text to the ids a caller sends and never reaches the forward pass. It reportsbf16, the only dtype it binds.ServingEngine::weights_digest) and the same digest in the outcome, which mesh-core's model check requires.Checked
On the build host:
gguffeature, which CI's mesh-rs leg builds.Cargo.lockis current (--locked), including joulehook-rs, which locks mesh-engine.🤖 Generated with Claude Code