fix(model): match verified second shard identity

This commit is contained in:
Pavlo Ratushnyi
2026-10-09 20:40:29 +02:00
parent 53e8f322ad
commit 0be23fdbdc
2 changed files with 24 additions and 1 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ const PINNED_IDENTITIES: [(u64, [u8; 32]); 2] = [
28_800_138_432,
[
0x31, 0x6b, 0x46, 0xf3, 0xa2, 0xdb, 0xd6, 0x8c, 0x90, 0x0f, 0x43, 0x13, 0x6a, 0xb9,
0x44, 0x9f, 0x9d, 0xcc, 0x37, 0x25, 0xdf, 0x8d, 0xc7, 0x94, 0x84, 0x7c, 0x20, 0x4b,
0x44, 0x9f, 0x9d, 0xcc, 0x37, 0x25, 0xdf, 0xd8, 0xc7, 0x94, 0x84, 0x7c, 0x20, 0x4b,
0xc1, 0x61, 0xe1, 0x13,
],
),
@@ -4,6 +4,29 @@ use super::*;
mod fixtures;
use fixtures::{Meta, TinyOwner};
#[test]
fn production_identity_bytes_match_the_canonical_verified_shard_digests() {
// Literal identities from STRA-143 Speck v4 and independently verified
// source shards; this is not a fixture pin or an artifact admission bypass.
let expected = [
(
54_817_524_224,
"4c1eb2ceb4915e1192f4f386021897bde56a97f40a0bb78bb86465e0f7d2aca3",
),
(
28_800_138_432,
"316b46f3a2dbd68c900f43136ab9449f9dcc3725dfd8c794847c204bc161e113",
),
];
for ((actual_size, digest), (expected_size, expected_hex)) in
PINNED_IDENTITIES.iter().zip(expected)
{
let actual_hex: String = digest.iter().map(|byte| format!("{byte:02x}")).collect();
assert_eq!(*actual_size, expected_size);
assert_eq!(actual_hex, expected_hex);
}
}
#[test]
fn legacy_profile_check_ignores_well_formed_unrelated_tokenizer_value_types() {
for field in ["tokenizer.ggml.tokens", "tokenizer.ggml.bos_token_id"] {