File size: 6,046 Bytes
c7f732a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
{
 "name": "light-sufficiency-predictor-gguf8",
 "status": "draft, not uploaded",
 "exported": "2026-11-04",
 "light_model": {
  "base_model": "Qwen/Qwen3-0.6B (BF16)",
  "license": "Apache-2.0",
  "gguf_source": "unsloth/Qwen3-0.6B-GGUF/Qwen3-0.6B-BF16.gguf",
  "backend": "llama",
  "gguf_8_blocks": "model.gguf, the source GGUF cut to the first 8 blocks (token_embd, output_norm, output and blk.0 to blk.7)"
 },
 "language": "English only",
 "layers": 8,
 "llama_cpp_output": "per-token embeddings (pooling NONE), includes output_norm",
 "prompt": {
  "app_commit": "97272ef",
  "language": "English prompt",
  "target_words": 100,
  "template": "<|im_start|>user\n<document>\n{text}\n</document>\n\nSummarize the document above in about 100 words (5 sentences). Use your own words and do not copy sentences from the document. Keep only the main points. Write only the summary.<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n",
  "document_placeholder": "{text}"
 },
 "tokenization": {
  "add_bos": false,
  "parse_special": true
 },
 "doc_span_rule": "Byte offsets of every token piece in the prompt (UTF-8, concatenated pieces equal the prompt bytes). The document text occupies bytes [len(prefix), len(prefix) + len(document bytes)) with prefix = '<|im_start|>user\\n<document>\\n'. A token is a document token when its byte range overlaps that range, so the token that merges the last document character with the following newline is included. The document text is used as given, not stripped.",
 "pooling": "Mean over the document tokens of the per-token embeddings (llama.cpp pooling NONE, output after output_norm of block 8), one float32 vector of 1024 values.",
 "probe": {
  "file": "probe.json",
  "formula": "z = w.x + b; p_sufficient = sigmoid(A * z + B); p_insufficient = 1 - p_sufficient",
  "platt": {
   "A": 0.9374034404754639,
   "B": 0.22994965314865112
  },
  "fold_max_abs_diff": 3.743143861534293e-08
 },
 "label": "Label v2: sufficient (1) when the light summary passes the technical checks without too_long and the Gemma 3 12B judge scores faithfulness >= 4.",
 "routing": {
  "version": 1,
  "points": [
   [
    0.0,
    0.5
   ],
   [
    0.5,
    0.8
   ],
   [
    1.0,
    0.95
   ]
  ],
  "interpolation": "linear",
  "probability": "p_sufficient",
  "rule": "light when p_sufficient >= threshold(quality_preference)",
  "chosen_on": "validation (206 texts); Platt also fitted on validation, so optimistic"
 },
 "advice": {
  "version": 1,
  "mode": "none_with_prediction",
  "rule": "with a prediction, do not suggest the heavy model; without one, the app's length advisor decides",
  "why": "on validation the probe does not separate failures among light-routed texts (see threshold_analysis.md)"
 },
 "data": {
  "train": {
   "n": 616,
   "insufficient": 104
  },
  "validation": {
   "n": 206,
   "insufficient": 30
  },
  "test": {
   "n": 151,
   "insufficient": 33
  }
 },
 "validation_results": {
  "n": 206,
  "insufficient": 30,
  "auroc": [
   0.709659090909091,
   0.5965633167023046,
   0.8156790847945943
  ],
  "ap_insufficient": [
   0.40988197040299046,
   0.25027936396129463,
   0.5809268882725719
  ],
  "hf_probe_auroc": [
   0.7147727272727273,
   0.6003268490904481,
   0.8179235442920104
  ],
  "note": "Platt is fitted on these validation texts; Brier and ECE are not reported on validation (in-sample)."
 },
 "test_results": {
  "n": 151,
  "insufficient": 33,
  "models": {
   "option 1 (GGUF 8 blocks)": {
    "auroc": [
     0.714175654853621,
     0.6110126188571936,
     0.8137687406296852
    ],
    "ap_insufficient": [
     0.4899080000407883,
     0.3316064804585212,
     0.6475444944318816
    ],
    "brier": [
     0.1548335387019752,
     0.11751881178600608,
     0.19731360723457353
    ],
    "ece": [
     0.05743244270615229,
     0.035149464366451805,
     0.1338328302005269
    ]
   },
   "HF probe": {
    "auroc": [
     0.7362609142270159,
     0.6393254108153633,
     0.8310708898944192
    ],
    "ap_insufficient": [
     0.5168968170940059,
     0.354532133131363,
     0.680021461893627
    ],
    "brier": [
     0.14991831587870777,
     0.11258698218320425,
     0.19120589099252627
    ],
    "ece": [
     0.06840796502220707,
     0.03506714001988732,
     0.13394637805539247
    ]
   },
   "(d)": {
    "auroc": [
     0.6612737544940934,
     0.552839229640059,
     0.7657977009611183
    ],
    "ap_insufficient": [
     0.4070139012278786,
     0.2702898589196186,
     0.5720459590368682
    ],
    "brier": [
     0.16557182463689082,
     0.12485330876672007,
     0.21032840020535495
    ],
    "ece": [
     0.059371011029426074,
     0.03998848389548617,
     0.14327356208017625
    ]
   }
  },
  "diffs": {
   "option 1 (GGUF 8 blocks) - (d)": [
    0.052901900359527576,
    -0.04098152794175529,
    0.1478525632814101
   ],
   "option 1 (GGUF 8 blocks) - HF probe": [
    -0.022085259373394894,
    -0.0400642421602785,
    -0.004463789682539562
   ]
  },
  "reproduction": {
   "HF probe": {
    "max_abs_diff": 0.0,
    "ok": true
   },
   "(d)": {
    "max_abs_diff": 0.0,
    "ok": true
   }
  },
  "note": "Second use of the English test set, confirmation only."
 },
 "cost": {
  "device": "llama.cpp, Metal (Apple GPU), median of 3 after a warmup",
  "per_text": [
   {
    "input_tokens": 275,
    "gguf8_embed_s": 0.072,
    "app_full_summary_s": 0.97
   },
   {
    "input_tokens": 941,
    "gguf8_embed_s": 0.231,
    "app_full_summary_s": 1.97
   },
   {
    "input_tokens": 2494,
    "gguf8_embed_s": 0.742,
    "app_full_summary_s": 2.84
   }
  ],
  "note": "gguf8_embed_s covers prompt build, tokenize and the 8-block run; the probe itself is one dot product of 1024 values."
 },
 "parity": {
  "texts": 20,
  "split": "validation",
  "domain": "government (GovReport)",
  "max_abs_diff_probability": 4.1877598239148384e-07,
  "mean_abs_diff_probability": 9.877418592485477e-08,
  "tolerance": 0.0001,
  "ok": true,
  "span_texts_checked": 822,
  "span_mismatches_vs_hf": 0,
  "span_mismatch_ids": []
 }
}