Merge DGR-025 (certified-artifact-byte recipe identity) from ralph-fable-loop lane

This commit is contained in:
Dobromir Popov
2026-07-21 13:23:17 +03:00
10 changed files with 1277 additions and 69 deletions

View File

@@ -34,11 +34,25 @@ from meshnet_node.runtime_recipe import ( # noqa: E402
DerivativeBinding,
RuntimeRecipe,
ShardIdentity,
tokenizer_identity,
)
from meshnet_tracker.recipe import ( # noqa: E402
parse_identity,
tokenizer_identity as tracker_tokenizer_identity,
)
from meshnet_tracker.recipe import parse_identity # noqa: E402
VECTORS = _ROOT / "tests" / "data" / "recipe_fingerprint_vectors.json"
SCHEMA_VERSION = 1
SCHEMA_VERSION = 2
# The tokenizer axis is content-addressed: a digest over the tokenizer's actual
# bytes, never a repository label. These example bytes are part of the wire
# contract exactly like the digests derived from them.
_TOKENIZER_FILES = {
"tokenizer.json": b'{"version":"example","vocab":{"a":0,"b":1}}\n',
"tokenizer_config.json": b'{"model_max_length":8}\n',
}
_TOKENIZER_IDENTITY = tokenizer_identity(_TOKENIZER_FILES)
assert _TOKENIZER_IDENTITY == tracker_tokenizer_identity(_TOKENIZER_FILES)
_RECIPE = RuntimeRecipe(
weight_quantization="Q4_K_M",
@@ -46,10 +60,13 @@ _RECIPE = RuntimeRecipe(
compute_dtype="float32",
kv_dtype="q8_0",
kv_layout="paged-v1",
tokenizer_revision="0123456789abcdef",
tokenizer_revision=_TOKENIZER_IDENTITY,
architecture_adapter="llama/range-v1",
backend_id="llama.cpp",
runtime_version="llama.cpp@" + "d" * 40 + "+patchstack." + "e" * 64,
runtime_version=(
"llama.cpp@" + "d" * 40 + "+patchstack." + "e" * 64
+ "+build." + "f" * 64 + "+artifact." + "a" * 64
),
recipe_id="example-gguf",
recipe_version="1",
catalogue_version="2026.07.1",