Direct answer
A runtime artifact contract is the set of fields that must match before a model, adapter, tokenizer, router, or evaluator may be composed. Contract checks turn model breeding from a metaphor into a repeatable engineering workflow.
Required artifact families
| Artifact | Identity fields | Evidence fields |
|---|---|---|
| Model | model format, architecture, tensor layout, tokenizer checksum, quantization mode | load result, checksum, parameter count, diagnostics |
| Adapter | parent identity, delta format, tensor entry identity, payload kind | validation result, checksum, affected tensors |
| Evaluation cases | suite version, scope, quality boundary, case count | pass/fail count, exact outputs, generated sidecar |
| Router policy | contract version, budget fields, escalation thresholds | routing accuracy, p95 latency, no-op rate |
| Release packet | candidate digest, parents, operators, approvals, rollback target | shadow/canary metrics and decision record |
Contract-first loading
FUNCTION load_candidate_artifact(model_bytes, adapter_bytes, eval_cases)
model <- PARSE_AND_VALIDATE_MODEL(model_bytes)
REQUIRE model.checksum IS KNOWN
REQUIRE model.tensor_layout_checksum IS RECORDED
REQUIRE model.tokenizer_checksum IS RECORDED
IF adapter_bytes EXISTS
adapter <- PARSE_ADAPTER(adapter_bytes)
REQUIRE adapter.expected_parameter_count == model.parameter_count
REQUIRE adapter.expected_tensor_layout_checksum == model.tensor_layout_checksum
REQUIRE adapter.expected_tokenizer_checksum == model.tokenizer_checksum
REQUIRE adapter.payload_values_are_finite
END IF
evidence <- RUN_EVAL_CASES(model, adapter, eval_cases)
RETURN BUILD_RELEASE_PACKET(model, adapter, evidence)
END FUNCTIONWhy contracts matter
Contracts prevent category errors: merging incompatible tokenizers, applying adapters to the wrong base, comparing models under different evaluation suites, or routing sensitive work to a component that lacks the right locality guarantees. The contract does not make the system safe by itself; it makes errors visible enough to test.
Source reports used for this guide
These reports are preserved verbatim in the site archive. The guide above is an editorial synthesis and may narrow, qualify, or reorganize claims from the source material.