File size: 6,555 Bytes
3d9e0ae | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | {
"metadata_version": "0.2",
"kind": "decision-backbone",
"name": "clef_flash_decode_fp16_pf64",
"assets": {
"main": "clef_flash_decode_fp16_pf64.aimodel"
},
"language": {
"tokenizer": "Cloudflare/clef-flash",
"vocab_size": 248320,
"max_context_length": 4096,
"embedded_tokenizer": true,
"prefill_chunk": 64,
"static_inputs": [
"image_embeds",
"image_rc",
"rope_shift_start",
"rope_shift_amount"
],
"image_tokens_max": 1024,
"output": "hidden [1, 64, 4096] fp16, every position",
"function_map": {
"main": [
"main"
]
}
},
"source": {
"model_definition": "torch",
"hf_model_id": "Cloudflare/clef-flash",
"hf_revision": "17f0b0ad64efb65d273590632833508766b2aae6"
},
"compression": null,
"decision": {
"output": "hidden [1, S, 4096] per call: the final-norm hidden state at every position (no vocabulary head in the graph)",
"readout": "fresh zero states; a row of T ids runs as ceil(T / 64) calls of 'main' (static S = 64): call k gets ids[64k : 64k + 64] with position_ids 0..64k+63; the last call is padded with <|endoftext|> (248044) and the hidden rows of the padded positions are discarded (causal: they cannot reach a real position). The hidden rows [1, 64, 4096] of every call, concatenated and cut to T, are the backbone's final-norm last_hidden_state [T, 4096] the head reads.",
"prompt": {
"source": "the author's encode_record() (joint_schema_model.py at the pinned revision, sha256 0e304cf7c6500e8bb59bef7e2afd2c6373f82596dfb3b57d1aa93c175e2dc3a3); every piece tokenized on its own without special tokens, then concatenated (conversion/clef_flash/host.py build_ids)",
"layout": "prefix + [image block] + state + schema + suffix",
"prefix": "<|im_start|>system\\n{system prompt}<|im_end|>\\n<|im_start|>user\\nSTATE:\\n",
"prefix_tokens": 36,
"system_prompt": "Read the complete state and schema. Decide every field jointly. Each answer must be exactly one of that field's allowed options.",
"image_block": "at index 36 (right after the prefix): <|vision_start|> (248053), N <|image_pad|> (248056) sent to the graph as ids V+k (k = 0..N-1 row-major over the merged grid, V = 248320), <|vision_end|> (248054), '\\n'; N + 3 ids",
"state": "render(state): a string as is, anything else compact JSON (sorted keys, ensure_ascii off); cut so the whole row fits max_length",
"schema": "'\\n\\nSCHEMA FIELDS:\\n', then per question i (1-based) '\\nFIELD {i}\\nID: {id}\\nTYPE: {type}\\nINSTRUCTION: ' + render(instructions or id) + '\\nALLOWED OPTIONS:\\n' + per option j (1-based) 'OPTION {j}: ' + render({option_id, description}) + '\\n', then 'END FIELD\\n'",
"suffix": "\\n<|im_end|>\\n<|im_start|>assistant\\n<think>\\n\\n</think>\\n\\nJOINT SCHEMA DECISIONS:",
"suffix_tokens": 18,
"last_token": "':' (25)",
"add_special_tokens": false,
"chat_template": null,
"max_length_author": 16384,
"max_tokens_this_graph": "max_context_length (the row and its last padded call must fit)"
},
"spans": {
"question": "[start, end) of the render(instructions or id) tokens of the question",
"option": "[start, end) of the render({option_id, description}) tokens of each option",
"ids": "spans index the processor-form ids (N x <|image_pad|>), the same positions as the graph's"
},
"option_order": {
"noul": [
"true",
"false"
],
"choice": "option ids sorted as strings",
"score": "levels 0..n-1"
},
"question_types": {
"noul": 0,
"choice": 1,
"score": 2
},
"noul_default_criteria": {
"true": "The proposition is true or the answer is yes.",
"false": "The proposition is false or the answer is no."
},
"head": {
"files": [
"joint_head.safetensors",
"joint_head_config.json"
],
"code": "JointSchemaHead in the checkpoint's joint_schema_model.py (sha256 0e304cf7c6500e8bb59bef7e2afd2c6373f82596dfb3b57d1aa93c175e2dc3a3)",
"reads": "last_hidden_state [T, 4096] at every position; LayerNorm(4096) -> memory; the global vector = the last token; question / option vectors = the mean of the LayerNorm-ed rows over each span",
"lexical": "lm_head.weight rows (untied [248320, 4096], model-00001-of-00004.safetensors) averaged over each option span's ids; the table is not in this graph",
"dtype_of_record": "fp32 (the gate reads the graph's fp16 hidden through the fp32 head)"
},
"softmax": "per question, fp32, over that question's options (temperature 1)",
"response": {
"shape": "SystemOne-compatible: {model, answers: {question_id: answer}, usage: {input_tokens: T, output_tokens: 0}}",
"noul": "{type: 'noul', noul: p(true)}",
"choice": "{type: 'choice', choice: argmax option id, confidence: its p, probabilities: {id: p}}",
"score": "{type: 'score', score: sum(level * p), confidence: max p, legend: {level: criterion}, probabilities: {level: p}}",
"rounding": "4 decimals"
}
},
"vision": {
"n_image_max": 1024,
"image_token_base": 248320,
"image_embeds": "tower rows 0..N-1 (N = H*W merged tokens) as fp16, rows N.. zero",
"image_rc": "image_rc[k] = (k // W, k % W) for k < N, rows N.. zero",
"rope_shift_start": "37 + H*W (the <|vision_end|> index; the image block starts at 36)",
"rope_shift_amount": "H*W - max(H, W)",
"text_only": {
"rope_shift_start": 1073741824,
"rope_shift_amount": 0,
"image_embeds": "zero",
"image_rc": "zero"
},
"towers": [
{
"name": "clef_flash_g256_vision_fp16w32",
"merged_grid": [
8,
8
],
"tile": 256,
"patches": [
256,
1536
],
"image_embeds": [
64,
4096
]
},
{
"name": "clef_flash_g448_vision_fp16w32",
"merged_grid": [
14,
14
],
"tile": 448,
"patches": [
784,
1536
],
"image_embeds": [
196,
4096
]
}
],
"host_preprocess": "RGB -> Pillow BICUBIC resize to (32*grid) x (32*grid), aspect not kept -> /255 -> (x - 0.5) / 0.5 -> merge-block-major patchify, the frame repeated at both temporal slots (conversion/clef_flash/host.py preprocess)"
},
"compilation": {
"date": "2026-10-03T02:53:35.119832+00:00",
"targets": []
}
} |