Kiln Documentation

ROCm/HF layer-attribution result schema

Locate numerical divergence after embedding, each transformer layer, and final RMSNorm while preserving source, process, model, and implementation identity.

Source-bound sequential comparison of Hugging Face and Kiln ROCm hidden states after embedding, each of 32 Qwen3.5 transformer layers, and final RMSNorm at one exact first-divergence state. It locates where numerical error grows; it does not establish general model parity.

Schema identity

Property Value
Title Kiln ROCm/HF Layer Attribution Result v2
$id https://ericflo.github.io/kiln/schemas/rocm-hf-layer-attribution-v2.schema.json
Dialect https://json-schema.org/draft/2020-12/schema
Root type object
Root object closed

Root fields

Field Required Type Constraints and default Description
schema yes any const "kiln.rocm-hf-layer-attribution-result.v2" Schema identifier for this layer-attribution result.
result_sha256 yes sha256 - Canonical SHA-256 identity of the complete result after removing this self-hash field.
created_at_utc yes string format date-time UTC time when the result record was created.
duration_seconds yes number exclusive minimum 0 Total wall-clock duration of build, two contained executions, verification, and result assembly.
source yes source - Clean pushed repository identity used to build and execute the workers.
binary yes binary - Bounded offline release build admitted for the Kiln comparison arm.
implementation yes implementation - Content identities of the runners, worker, interpreter, and exact-argument gate.
model_identity yes modelIdentity - Recomputed content identity of the exact model, tokenizer, chat template, configuration, and weight shards.
model_fingerprint yes modelFingerprintEvidence - Implementation and process evidence for the separate contained model-fingerprinting step.
request yes request - Repository-local first-divergence request and its canonical identity.
reference yes reference - Retained Hugging Face boundary artifact and its complete execution evidence.
containment yes containment - Separate host, network, timeout, and exit evidence for the Hugging Face and Kiln arms.
worker yes worker - Boundary-by-boundary Kiln comparison and the location of largest relative error growth.

Definitions

sha256Lowercase SHA-256 digest with the `sha256:` algorithm prefix.0 fields

Type: string. Constraints: pattern ^sha256:[0-9a-f]{64}$.

gitObjectFull lowercase SHA-1 Git object identifier.0 fields

Type: string. Constraints: pattern ^[0-9a-f]{40}$.

tokenIdTokenizer vocabulary ID for the bound Qwen3.5-4B model identity.0 fields

Type: integer. Constraints: minimum 0; maximum 248319.

sourceExact clean commit, matching `origin/main`, and Git tree used for build and execution.3 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
commit yes gitObject - Full Git commit checked out during build and execution.
origin_main yes gitObject - Full origin/main commit required to equal the checked-out commit.
tree yes gitObject - Git tree object for the checked-out commit.
binaryRelease executable produced by the bounded offline build and admitted by exact content identity.4 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
build_duration_seconds yes number exclusive minimum 0 Wall-clock duration of the admitted release build.
build_environment_policy yes any const "closed-source-build-v1" Identifier of the closed build-environment contract applied to the release binary.
path yes any const "target/release/examples/rocm_hf_path_attribution" Repository-relative path of the admitted layer-attribution executable.
sha256 yes sha256 - SHA-256 identity of the exact admitted executable.
implementationContent identities for both worker arms and the code that contains and admits them.5 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
guarded_exec_sha256 yes sha256 - SHA-256 identity of the exact-argument executable gate.
hf_worker_sha256 yes sha256 - SHA-256 identity of the Hugging Face boundary-capture worker.
process_runner_sha256 yes sha256 - SHA-256 identity of the shared process-containment runner.
python_sha256 yes sha256 - SHA-256 identity of the Python executable used by the Hugging Face arm.
runner_sha256 yes sha256 - SHA-256 identity of the source-bound layer-attribution orchestrator.
requestRepository-local first-divergence request consumed by both comparison arms.2 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
path yes string minimum length 1 Repository-relative path to the retained request.
sha256 yes sha256 - Canonical SHA-256 identity of the retained request content.
hfEvidenceEager Hugging Face boundary capture, final logits, runtime identity, and resource evidence for the exact bound request.35 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
attention_implementation yes any const "eager" Transformers full-attention implementation selected for the reference arm.
argmax yes tokenId - Vocabulary ID with the highest final Hugging Face logit.
argmax_text yes string minimum length 1 Tokenizer-decoded text for the Hugging Face argmax token.
boundary_count yes any const 34 Number of captured final-row boundaries: embedding, 32 transformer layers, and final RMSNorm.
boundary_names yes array<string> minimum items 34; maximum items 34 Ordered names for the 34 captured boundaries; positions must align with the retained row tensor.
candidate_tokens yes array<candidateToken> minimum items 2; maximum items 2 The disputed Kiln and vLLM candidates annotated with their Hugging Face logits and ranks.
configuration_sha256 yes sha256 - SHA-256 identity of the fixed Hugging Face execution configuration enforced by the worker.
deterministic_algorithms yes any const true Whether PyTorch deterministic algorithms were required; fixed to true.
device yes string minimum length 1 Diagnostic accelerator name reported by PyTorch. It identifies this run but is not a dispatch-policy input.
dtype yes any const "bfloat16" Model execution dtype used by the Hugging Face reference.
duration_seconds yes number exclusive minimum 0 Wall-clock duration of the contained Hugging Face worker.
hidden_size yes any const 2560 Width of each captured final hidden row.
input_token_count yes any const 166 Complete prompt-plus-continuation token count for this fixed first-divergence request.
input_token_ids_sha256 yes sha256 - Canonical SHA-256 identity of the complete input-token sequence.
layer_last_rows_sha256 yes sha256 - SHA-256 identity of the ordered 34-by-2560 F32 Hugging Face boundary-row bytes.
linear_attention_implementation yes any const "transformers_torch_fallback" Transformers implementation selected for Gated DeltaNet linear-attention layers.
logits_sha256 yes sha256 - SHA-256 identity of the contiguous F32 full-vocabulary Hugging Face logit bytes.
memory_high_events yes any const 0 Cgroup high-threshold events during the Hugging Face worker; retained evidence requires zero.
memory_max_events yes any const 0 Cgroup max-limit events during the Hugging Face worker; retained evidence requires zero.
memory_oom_events yes any const 0 Cgroup out-of-memory events during the Hugging Face worker; retained evidence requires zero.
memory_oom_kill_events yes any const 0 Cgroup out-of-memory kills during the Hugging Face worker; retained evidence requires zero.
memory_peak_bytes yes integer minimum 1 Peak cgroup memory consumption in bytes during the Hugging Face worker.
memory_swap_bytes yes any const 0 Cgroup swap usage in bytes during the Hugging Face worker; retained evidence requires zero.
modeling_sha256 yes sha256 - SHA-256 identity of the pinned Transformers Qwen3.5 modeling implementation.
output_bytes yes integer minimum 1 Exact size in bytes of the retained Hugging Face boundary artifact.
request_id yes string minimum length 1 Identifier copied from the bound next-token request.
request_sha256 yes sha256 - Canonical SHA-256 identity of the bound next-token request.
tf32_allowed yes any const false Whether TF32 matrix operations were permitted; fixed to false.
top_logit_margin yes number exclusive minimum 0 Positive difference between the highest and second-highest final Hugging Face logits.
top_tokens yes array<topToken> minimum items 10; maximum items 10 Exactly the ten highest final Hugging Face tokens and logits, ordered from highest to lowest.
torch_commit yes gitObject - Pinned PyTorch source commit used by the qualification environment.
torch_hip_version yes string minimum length 1 HIP runtime version reported by the pinned PyTorch build.
torch_version yes any const "2.13.0+rocm7.2" Pinned PyTorch distribution version required by this result schema.
transformers_version yes any const "5.13.1" Pinned Transformers distribution version required by this result schema.
vocab yes any const 248320 Vocabulary size used for final logits, ranks, and token-ID bounds.
referenceRetained local Hugging Face artifact containing ordered boundary rows and final logits, plus its execution evidence.4 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
bytes yes integer minimum 1 Exact size of the retained Hugging Face artifact in bytes.
evidence yes hfEvidence - Hugging Face runtime, input, boundary, logits, and resource evidence bound to the artifact.
location yes any const "local_ignored" Retention class; local_ignored means the artifact is intentionally outside tracked source.
sha256 yes sha256 - SHA-256 identity of the retained artifact's exact bytes.
containmentArmHost-memory preflight, network isolation, and bounded-process evidence for one comparison arm.3 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
host_available_before_gib yes integer minimum 1 Whole GiB of host memory reported available immediately before this arm launched.
network yes any const "forbidden" Network policy applied to this arm; fixed to an isolated namespace with access forbidden.
process yes processEvidence - Bounded process and exit evidence for this arm.
containmentIndependent containment evidence for the Hugging Face reference arm and the Kiln comparison arm.2 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
hf yes containmentArm - Containment evidence for Hugging Face boundary capture.
kiln yes containmentArm - Containment evidence for Kiln ROCm boundary capture and comparison.
boundaryNumerical comparison of the final hidden row at one aligned model boundary.10 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
cosine_similarity yes number minimum -1; maximum 1 Cosine similarity between the 2560-element Hugging Face and Kiln final-row vectors.
hf_sha256 yes sha256 - SHA-256 identity of the contiguous F32 Hugging Face final-row bytes.
index yes integer minimum 0; maximum 33 Zero-based boundary position: embedding, transformer layers 0–31, then final RMSNorm.
kiln_sha256 yes sha256 - SHA-256 identity of the contiguous F32 Kiln final-row bytes.
max_abs_error yes number minimum 0 Largest elementwise absolute difference between the two boundary rows.
mean_abs_error yes number minimum 0 Mean elementwise absolute difference between the two boundary rows.
name yes string minimum length 1 Boundary name aligned with the retained Hugging Face boundary-name list.
reference_root_mean_square yes number exclusive minimum 0 Root mean square magnitude of the Hugging Face boundary row, used as the relative-error denominator.
relative_root_mean_square_error yes number minimum 0 Root mean square error divided by the Hugging Face row's root mean square magnitude.
root_mean_square_error yes number minimum 0 Root mean square of the elementwise Kiln-minus-Hugging-Face difference.
errorGrowthBoundary whose relative root mean square error increased most from the preceding boundary.3 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
index yes integer minimum 0; maximum 33 Zero-based index of the boundary with the largest stepwise relative-error increase.
name yes string minimum length 1 Name of the boundary with the largest stepwise relative-error increase.
relative_root_mean_square_error_delta yes number - This boundary's relative root mean square error minus the preceding boundary's value.
workerKiln boundary comparisons, final output identity, experiment route, and largest error-growth location for the exact bound request.10 fields

Type: object. Constraints: closed object.

Field Required Type Constraints and default Description
schema yes any const "kiln.rocm-hf-layer-attribution.v2" Schema identifier for the contained Kiln worker marker.
boundaries yes array<boundary> minimum items 34; maximum items 34 Exactly 34 ordered boundary comparisons: embedding, transformer layers 0–31, and final RMSNorm.
final_logits_sha256 yes sha256 - SHA-256 identity of the Kiln final F32 full-vocabulary logits at the bound state.
hf_layer_last_rows_sha256 yes sha256 - SHA-256 identity of the Hugging Face boundary-row bytes loaded by the Kiln worker.
input_token_count yes any const 166 Complete prompt-plus-continuation token count for this fixed first-divergence request.
input_token_ids_sha256 yes sha256 - Canonical SHA-256 identity of the complete input-token sequence.
kernel_policy yes string enum "qualified", "portable_fallback", "model_fallback", "tensor_fallback", "fused_norm_mlp_fallback", "fused_norm_mlp_only", "fused_rmsnorm_fallback", "fused_mlp_silu_mul_fallback", "fused_mlp_gate_up_prefill_fallback", "gdn_fallback", "non_gdn_fallback", "split_q_gate_fallback", "split_q_gate_only" ROCm experiment profile used to run the Kiln arm. Fallback profiles isolate specific backend route groups; they are attribution controls, not general serving recommendations.
largest_relative_error_growth yes errorGrowth - Boundary with the largest increase in relative root mean square error from its predecessor.
observed_next_tokens yes array<tokenId> minimum items 4; maximum items 4 Four Kiln predictions: one after the prompt and one after each of the three forced common continuation tokens.
request_id yes string minimum length 1 Identifier copied from the bound next-token request.