bowmanslayer commited on
Commit
711ed9f
·
verified ·
1 Parent(s): aeabef1

Release unmodified quantization with complete saved evaluation metrics and historical reference

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
EVALUATION.md ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # VeriLoop-E2 paired quantized evaluation
2
+
3
+ Same frozen questions, seed 20260816, thinking enabled, publisher raw-content protocol, 32768-token output budget. Legacy custom scoring, including partial IFEval rules. Format comparisons use different engines/KV types; compare original versus ablated within each format.
4
+
5
+ Runtime: dual RTX 3090. W4A16 uses vLLM 0.29.0 with a local FA2/FP8-KV plugin, tensor parallel 2, concurrency 16, 65,536-token context, FP8 E5M2 KV. GGUF uses llama.cpp layer split 1:1, concurrency 8, 40,960-token context per slot, Q8_0 key/value cache. Both use temperature 0 and top_p 1. See evaluation-runtime-versions.json for exact runtime identifiers.
6
+
7
+ ## w4a16
8
+
9
+ | Task | n | Original | Ablated | Delta (pp) |
10
+ |---|---:|---:|---:|---:|
11
+ | mmlu | 150 | 84.00% | 76.00% | -8.00 |
12
+ | cmmlu | 150 | 84.67% | 75.33% | -9.33 |
13
+ | mmlu_pro | 150 | 78.67% | 70.67% | -8.00 |
14
+ | ceval | 150 | 84.00% | 76.00% | -8.00 |
15
+ | arc | 150 | 80.67% | 85.33% | +4.67 |
16
+ | truthfulqa | 150 | 58.67% | 71.33% | +12.67 |
17
+ | gsm8k | 100 | 95.00% | 88.00% | -7.00 |
18
+ | math500 | 100 | 75.00% | 73.00% | -2.00 |
19
+ | bbh | 150 | 75.33% | 65.33% | -10.00 |
20
+ | humaneval | 164 | 89.63% | 89.63% | +0.00 |
21
+ | ifeval | 100 | 76.00% | 69.00% | -7.00 |
22
+
23
+ Overall: 1212/1514 (80.05%) → 1157/1514 (76.42%). Delta -3.63 pp, paired approximate 95% CI [-5.894, -1.371] pp. Lost/gained: 181/126.
24
+ Empty: [9, 8]; explicitly delimited reasoning: [1186, 1007]; length-limited: [9, 8]. Empty-rate validity gate (≤2%): False.
25
+ Refusal head markers (100 prompts, thinking off): [98, 0]; validity: [True, True]; 2048-token budget hits: [1, 9]. See comparison.json for all marker counts.
26
+
27
+ Empty-rate gate exception: original-w4a16 / humaneval: 5/164 (3.05%), above 2%. These outputs remain failed in the denominator.
28
+ ### Refusal marker diagnostics
29
+
30
+ | Metric | Original | Ablated |
31
+ |---|---:|---:|
32
+ | substring_any | 98 | 2 |
33
+ | substring_head | 98 | 0 |
34
+ | heretic33_any | 98 | 69 |
35
+ | ega26_any | 98 | 55 |
36
+ | short | 0 | 0 |
37
+ | empty | 0 | 0 |
38
+ | empty_but_reasoning | 0 | 0 |
39
+ | reasoning_leaked | 0 | 0 |
40
+ | errors | 0 | 0 |
41
+
42
+ Selection-independent 84-item subset: opening markers [82, 0]; anywhere markers [82, 2]. These are heuristic counts, not a semantic compliance score.
43
+
44
+ ## gguf
45
+
46
+ | Task | n | Original | Ablated | Delta (pp) |
47
+ |---|---:|---:|---:|---:|
48
+ | mmlu | 150 | 68.00% | 68.00% | +0.00 |
49
+ | cmmlu | 150 | 61.33% | 64.67% | +3.33 |
50
+ | mmlu_pro | 150 | 64.00% | 68.67% | +4.67 |
51
+ | ceval | 150 | 60.00% | 70.00% | +10.00 |
52
+ | arc | 150 | 90.00% | 91.33% | +1.33 |
53
+ | truthfulqa | 150 | 60.67% | 60.67% | +0.00 |
54
+ | gsm8k | 100 | 37.00% | 47.00% | +10.00 |
55
+ | math500 | 100 | 68.00% | 67.00% | -1.00 |
56
+ | bbh | 150 | 48.00% | 54.67% | +6.67 |
57
+ | humaneval | 164 | 90.85% | 90.24% | -0.61 |
58
+ | ifeval | 100 | 63.00% | 60.00% | -3.00 |
59
+
60
+ Overall: 995/1514 (65.72%) → 1039/1514 (68.63%). Delta +2.91 pp, paired approximate 95% CI [0.956, 4.856] pp. Lost/gained: 92/136.
61
+ Empty: [4, 7]; explicitly delimited reasoning: [741, 782]; length-limited: [4, 7]. Empty-rate validity gate (≤2%): True.
62
+ Refusal head markers (100 prompts, thinking off): [99, 0]; validity: [True, True]; 2048-token budget hits: [0, 7]. See comparison.json for all marker counts.
63
+
64
+ ### Refusal marker diagnostics
65
+
66
+ | Metric | Original | Ablated |
67
+ |---|---:|---:|
68
+ | substring_any | 99 | 0 |
69
+ | substring_head | 99 | 0 |
70
+ | heretic33_any | 99 | 69 |
71
+ | ega26_any | 99 | 54 |
72
+ | short | 0 | 0 |
73
+ | empty | 0 | 0 |
74
+ | empty_but_reasoning | 0 | 0 |
75
+ | reasoning_leaked | 0 | 0 |
76
+ | errors | 0 | 0 |
77
+
78
+ Selection-independent 84-item subset: opening markers [83, 0]; anywhere markers [83, 0]. These are heuristic counts, not a semantic compliance score.
79
+
80
+ ## Limits
81
+
82
+ An initial original-W4A16 preflight incorrectly enabled a Qwen3 reasoning parser that the publisher does not prescribe. It classified 33/150 direct answers as hidden reasoning. Removing the incompatible parser recovered all 33, with zero empty/length-limited outputs; streaming and nonstreaming probes passed. All reported runs keep thinking enabled and the original template, use publisher raw-content semantics, and extract final content after a closing think tag only when present. Unclosed length-limited output is not scored as an answer.
83
+
84
+ These are local sampled benchmarks with the historical custom scorers, not official leaderboard scores. Truncated or empty outputs remain in the primary denominator. Marker absence does not prove semantic compliance. Refusal probes overlap the earlier 16-item selection set for the first 16 items; the remaining 84 are not used for candidate selection. No new ablation tuning was performed after these evaluations. No equivalence claim follows solely from a nonsignificant difference.
85
+
86
+ GGUF protocol verification: the supplied standalone source template overrides an older embedded identity block. All 1,514 prompts and token sequences match the source tokenizer. llama.cpp echoes the opening think generation-prefix tag in content-only mode; the protocol adapter removes that framing before legacy scoring. Two streaming/nonstreaming probes passed. The partial GGUF first pass is excluded. Requests allow 7,200 seconds for the slower engine, while output budgets and scorers remain unchanged.
87
+
88
+ The fixed-protocol GGUF run was paused to investigate low GSM8K accuracy. Two failed cases remained wrong with prompt caching disabled and with CPU-only F16 KV. One also failed under the original Hugging Face BF16 model in Transformers. Sampled BF16 GGUF tensors matched the source exactly. These checks did not establish a GGUF-only pipeline fault; they do not establish full BF16 benchmark accuracy or explain the entire cross-format gap. The existing run resumed without changing questions, scoring, weights, or engine. Wall-clock durations include the diagnostic pause and are not throughput measurements. An isolated newer llama.cpp CPU build was not used for the reported evaluation.
HISTORICAL-COMPARISON.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Measured results and historical reference
2
+
3
+ Columns Qwen base and Qwen community refer to our historical W4A16 quantizations, **not BF16 originals**. Qwen community uses JonathanColetti-Qwen3.8-27B-Uncensored upstream weights; it is not an abliteration developed by this publisher. VeriLoop base means the unmodified upstream model quantized by us. Ablated columns are evaluation records only.
4
+
5
+ | Task | Qwen base W4A16 | Qwen community W4A16 | VeriLoop base W4A16 | VeriLoop ablated W4A16 | VeriLoop base GGUF | VeriLoop ablated GGUF |
6
+ |---|---:|---:|---:|---:|---:|---:|
7
+ | mmlu | 130/150 (86.67%) | 126/150 (84.00%) | 126/150 (84.00%) | 114/150 (76.00%) | 102/150 (68.00%) | 102/150 (68.00%) |
8
+ | cmmlu | 135/150 (90.00%) | 134/150 (89.33%) | 127/150 (84.67%) | 113/150 (75.33%) | 92/150 (61.33%) | 97/150 (64.67%) |
9
+ | mmlu_pro | 132/150 (88.00%) | 125/150 (83.33%) | 118/150 (78.67%) | 106/150 (70.67%) | 96/150 (64.00%) | 103/150 (68.67%) |
10
+ | ceval | 127/150 (84.67%) | 127/150 (84.67%) | 126/150 (84.00%) | 114/150 (76.00%) | 90/150 (60.00%) | 105/150 (70.00%) |
11
+ | arc | 144/150 (96.00%) | 144/150 (96.00%) | 121/150 (80.67%) | 128/150 (85.33%) | 135/150 (90.00%) | 137/150 (91.33%) |
12
+ | truthfulqa | 132/150 (88.00%) | 120/150 (80.00%) | 88/150 (58.67%) | 107/150 (71.33%) | 91/150 (60.67%) | 91/150 (60.67%) |
13
+ | gsm8k | 99/100 (99.00%) | 99/100 (99.00%) | 95/100 (95.00%) | 88/100 (88.00%) | 37/100 (37.00%) | 47/100 (47.00%) |
14
+ | math500 | 75/100 (75.00%) | 77/100 (77.00%) | 75/100 (75.00%) | 73/100 (73.00%) | 68/100 (68.00%) | 67/100 (67.00%) |
15
+ | bbh | 140/150 (93.33%) | 138/150 (92.00%) | 113/150 (75.33%) | 98/150 (65.33%) | 72/150 (48.00%) | 82/150 (54.67%) |
16
+ | humaneval | 143/164 (87.20%) | 137/164 (83.54%) | 147/164 (89.63%) | 147/164 (89.63%) | 149/164 (90.85%) | 148/164 (90.24%) |
17
+ | ifeval | 89/100 (89.00%) | 93/100 (93.00%) | 76/100 (76.00%) | 69/100 (69.00%) | 63/100 (63.00%) | 60/100 (60.00%) |
18
+ | **Total** | **1346/1514 (88.90%)** | **1320/1514 (87.19%)** | **1212/1514 (80.05%)** | **1157/1514 (76.42%)** | **995/1514 (65.72%)** | **1039/1514 (68.63%)** |
19
+
20
+ ## Comparison boundary
21
+
22
+ Historical runs were on 2026-08-30; VeriLoop runs were on 2026-10-10. Both use seed 20260816, the same 11 categories and 1,514 samples, thinking enabled, greedy decoding and a 32,768-token output budget. `evaluation-item-alignment.json` records exact ordered item-ID comparisons against the current frozen set. Matching IDs do not establish identical dataset revisions or prompt bytes in the historical run.
23
+
24
+ Historical W4A16 used a 262,144-token context, a previous vLLM environment and the Qwen3 reasoning parser. Current W4A16 used context 65,536, vLLM 0.29.0, and raw-content extraction without that parser. Both used tensor parallelism 2, concurrency 16 and FP8 E5M2 KV cache. Current GGUF used llama.cpp, layer split 1:1, concurrency 8, context 40,960 per slot and Q8_0 KV cache. These are historical reference comparisons, **not strictly identical-runtime controlled experiments**. The GGUF/W4A16 difference also includes engine and KV-cache differences.
25
+
26
+ There is no full BF16 baseline for VeriLoop in this evaluation. These sampled/custom scores are not official leaderboard scores and do not reproduce the upstream private VeriLoop Harness or its agent/tool benchmarks. No conclusion about the validity of the authors' reported results follows from this table.
27
+
28
+ ## Data coverage
29
+
30
+ `evaluation-items.json` contains every saved per-item metric for all six runs (9,084 records), including IDs, correctness, token counts, errors, and available truncation/finish metadata. Saved answer tails and benchmark gold text are excluded. The original harness retained only answer tails, not complete generated responses; complete response replay is therefore unavailable. `evaluation-question-indices.json` supplies all current IDs and prompt hashes, without redistributing benchmark question text. Dataset loaders and scoring rules are supplied in `evaluation-legacy-scorer.py` (the frozen implementation, including historical comments), with `evaluation-protocol.py` and `evaluation-adapter.py` documenting current extraction and code execution. Dataset rights remain with their owners; model Apache-2.0 licensing does not relicense third-party datasets.
31
+
32
+ `evaluation-refusal-items.json` contains the saved metadata for 400 refusal probes, with no harmful prompts or generated answers. Marker counts are heuristic measurements, not semantic compliance judgments. No ablation implementation or weight-modification recipe is included in this release.
33
+
34
+ ## Standards and validity
35
+
36
+ Each category score is correct/n; total is sum(correct)/1514, not an unweighted average of category percentages. Main scores retain empty and truncated cases in the denominator. The historical summaries did not record the newer empty and finish-reason fields; absent fields must not be interpreted as zero. All six runs recorded zero request errors. Historical truncation totals were 28 and 42.
37
+
38
+ The rubric is the included legacy custom implementation: multiple choice extracts an answer letter; numerical tasks use normalization and numeric/string comparisons; BBH uses normalized exact matching; HumanEval executes extracted code against tests; IFEval implements only a subset of instruction rules. These are not the official complete evaluation implementations. Current HumanEval runs used isolated Docker execution, no network, read-only filesystem, non-root user, dropped capabilities, no host mounts and a 15-second timeout. The adapter retains the original local image name as provenance; that image is not distributed and cannot be assumed reproducible from its name alone.
39
+
40
+ Current decoding: temperature 0, top_p 1, max output 32768, thinking enabled with the source template. The paired test uses a fixed question snapshot SHA256 `57ccbc22395b05ac6d13b408727fd821cec91ebb3ad84c01d276ed77b644d71a`. Dataset revisions were not comprehensively pinned; IDs, prompt hashes and loader code are provided to expose that reproducibility limitation. See the runtime version/hash file for the exact recorded software metadata.
41
+
42
+ Current empty counts are W4A16 base 9, W4A16 ablated 8, GGUF base 4, GGUF ablated 7. The <=2% per-category empty-rate gate **fails for original W4A16 HumanEval: 5/164 (3.05%)**. Its measured 147/164 remains reported with those failures included; not all validity gates passed. The other three runs passed that gate.
43
+
44
+ Protocol corrections preceded retained formal results: removing the incompatible Qwen3 parser recovered 33/33 missing-answer preflight cases; current extraction takes content after a closing think tag, preserves normally stopped direct answers, and treats unclosed length-limited reasoning as empty. GGUF removes an echoed opening think prefix and uses the standalone source template override; all 1514 current prompt strings and token sequences were checked against that template. Superseded preflight results are excluded.
45
+
46
+ GGUF math diagnostics tested two failed examples with cache disabled and CPU F16 KV; both remained failures. One also failed native source BF16 CPU inference. This did not establish a GGUF-only fault, and one example is not a full BF16 baseline. Pauses during diagnosis make elapsed time unsuitable as a throughput benchmark.
47
+
48
+ Refusal protocol: 100 public `mlabonne/harmful_behaviors` test items, thinking disabled, temperature 0, max output 2048. First 16 overlap the earlier candidate-selection set; the remaining 84 are separately reported in `evaluation.json`. Four lexical metrics (local17 full text, local17 first 30 whitespace words, normalized Heretic33 and EGA26) are retained together; long-answer topic words can produce false positives. Token-budget hits are disclosed. No semantic refusal rate is inferred from missing markers.
LICENSE ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 Alibaba Cloud
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
README.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model: tsinghua-sigs-robot-lab/VeriLoop-E2
4
+ base_model_relation: quantized
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
+ tags:
8
+ - veriloop
9
+ - auto-round
10
+ - community-quantization
11
+ - experimental
12
+ ---
13
+ # VeriLoop-E2-W4A16
14
+
15
+ Community quantization of [tsinghua-sigs-robot-lab/VeriLoop-E2](https://huggingface.co/tsinghua-sigs-robot-lab/VeriLoop-E2/tree/9379d199adcc44acdf836558037163878e3a37ae), fixed revision `9379d199adcc44acdf836558037163878e3a37ae`. This is not an official Tsinghua release. Model architecture is `Qwen3_5ForConditionalGeneration`; the upstream names the base Qwen3.8-27B.
16
+
17
+ ## What is included
18
+
19
+ AutoRound W4A16, symmetric group 128, 256 public Pile calibration samples, 512 tokens, 200 iterations, batch 4. Eligible weights are INT4; small hybrid projections, activations and retained weights are BF16. All source tensors are represented; the 333 vision tensors are preserved exactly.
20
+
21
+ No abliteration was applied to this version.
22
+
23
+ ## Local paired evaluation
24
+
25
+ Same frozen 1,514 questions, seed 20260816, thinking enabled with the original template and publisher raw-content protocol, greedy decoding, max output 32,768 tokens. These are our legacy sampled/custom scorers, **not official leaderboard results**. IFEval uses a partial custom rule implementation. See EVALUATION.md and evaluation.json for details and validity flags.
26
+
27
+ | Task | n | Original w4a16 | Ablated w4a16 | Delta pp |
28
+ |---|---:|---:|---:|---:|
29
+ | mmlu | 150 | 84.00% | 76.00% | -8.00 |
30
+ | cmmlu | 150 | 84.67% | 75.33% | -9.33 |
31
+ | mmlu_pro | 150 | 78.67% | 70.67% | -8.00 |
32
+ | ceval | 150 | 84.00% | 76.00% | -8.00 |
33
+ | arc | 150 | 80.67% | 85.33% | +4.67 |
34
+ | truthfulqa | 150 | 58.67% | 71.33% | +12.67 |
35
+ | gsm8k | 100 | 95.00% | 88.00% | -7.00 |
36
+ | math500 | 100 | 75.00% | 73.00% | -2.00 |
37
+ | bbh | 150 | 75.33% | 65.33% | -10.00 |
38
+ | humaneval | 164 | 89.63% | 89.63% | +0.00 |
39
+ | ifeval | 100 | 76.00% | 69.00% | -7.00 |
40
+
41
+ Overall original → ablated: **80.05% → 76.42%**, difference -3.63 pp; approximate paired 95% CI [-5.894, -1.371] pp. Empty responses: [9, 8]; length-limited responses: [9, 8]. Both stay in the denominator. Empty-rate validity gate: False.
42
+
43
+ On 100 separate refusal probes (thinking disabled, 2048-token budget), opening-30-word marker counts were **98/100 → 0/100**. Marker absence is not proof of semantic compliance. Truncation/budget hits: [1, 9]; validity: [True, True]. The first 16 probes overlap candidate selection; see the 84-item held-out subset in evaluation.json when available.
44
+
45
+ ## Loading
46
+
47
+ ```bash
48
+ vllm serve /path/to/VeriLoop-E2-W4A16 --tensor-parallel-size 2 --generation-config vllm
49
+ ```
50
+ The measured runtime was vLLM 0.29.0 with a local FA2/FP8-KV plugin on dual RTX 3090. That local setup requires its plugin-specific library environment variables; this repository does not bundle the plugin. The command above is a starting point for a compatible installed runtime, not a tested stock-vLLM support matrix. No remote custom model code is required. Vision weights are retained exactly, but visual inference is not validated in this evaluation.
51
+
52
+ ## Scope and limitations
53
+
54
+ Use the repository-shipped template and publisher raw-content serving protocol. Do not add a Qwen3 reasoning parser: some completed direct answers omit a closing think tag and that parser classifies them entirely as hidden reasoning. Removing it recovered all 33 initial missing-answer cases; streaming/nonstreaming checks passed. Thinking remains enabled. For evaluation, final content is taken after `</think>` when present; normally stopped direct content is retained, while unclosed length-limited output is not scored as an answer.
55
+
56
+ In llama.cpp content-only mode, remove an echoed opening `<think>` generation-prefix tag before applying answer extraction. It is protocol framing, not answer text. The GGUF preflight was restarted after verifying this correction and the template override; it is excluded from the reported scores.
57
+
58
+ The author's private VeriLoop Harness is not included or reproduced. Their SWE/Terminal/DeepSWE scores are **not scores for these weights**. This evaluation does not establish long-context, tool-use, vision, agentic performance, or production suitability. Reduced refusal can affect inappropriate-content handling; applications need their own behavior controls. Full semantic refusal review and comprehensive capability equivalence have not been established.
59
+
60
+ Apache-2.0 is retained from the fixed upstream source; see LICENSE. Source training belongs to its original authors. Community changes are quantization. See release.json and SHA256SUMS for provenance and integrity.
61
+
62
+ ## Complete measurement records and historical comparison
63
+
64
+ See [all six result columns, test standards and limitations](HISTORICAL-COMPARISON.md), [all 9,084 per-item metric records](evaluation-items.json), [question IDs and hashes](evaluation-question-indices.json), and [400 refusal-probe metric records](evaluation-refusal-items.json). No full-precision baseline was measured. Historical results are not a strictly identical-runtime comparison.
SHA256SUMS ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 837e31e5da5e149f3f22e1c02f93dc38a8e5cf4087eb66a9e16cf3543ffe3b45 EVALUATION.md
2
+ 2f69e922807018e52d227656be571df1a743d59815bc1b0a93ce3d50a80ac90d HISTORICAL-COMPARISON.md
3
+ 50cbab8a892c5f2993b8c7351a99182507472def3b1374558308605d99b86b32 LICENSE
4
+ 39718d44fe964c985716bec2155670e2644cfdac9165a6bf7c01422086037fb2 README.md
5
+ 66526bd9fa7a45be668a86961154097e7ddbd71f831e499c1f751c118951aac2 chat_template.jinja
6
+ 63dd264f99bc42b8c00fbdc07bb268058136ce4ec0d7b3c5ca2d617c09832ea1 config.json
7
+ 5d938653ae86b4ed96ef1a2c5e1974dc85e3b7d856c5d1a5941db478f83ee02e evaluation-adapter.py
8
+ ea2489640d240c50a955a777ee3374be1df14f09f4fedbd5e32447899be34245 evaluation-item-alignment.json
9
+ 5781ce74d0b1e30558ca4b3e618e427e738719b9f89aea9cbdd659ec5fa476b8 evaluation-items.json
10
+ d38d443ced7b74b1579a9e5900a137038739635dc33968344f3516912f772bd4 evaluation-legacy-scorer.py
11
+ ddd1286b7dd652cc013dc440d1c4c1c035a0dcd74f30ca1ab22815d00e4d2a6a evaluation-protocol.py
12
+ 007fa2c933e312bdf449e34d0208ee48f7cfe8f1fb511eb59f638675ef688c51 evaluation-question-indices.json
13
+ d9348a2a975e81f94dc513620a107f82bab60b953a8ebb931a2de8aca35161d0 evaluation-questions-manifest.json
14
+ 4c6bd0d69b20fb89db22e2490374961112020b650b0ec5dcb73ec151e4f91857 evaluation-refusal-items.json
15
+ 4114d64d044d57de6074d559944ab49adc2ee0dfd8fa2283825d3ada3893819e evaluation-runtime-versions.json
16
+ 7e15af621e9913b85fce50888816d1499fc6ea3ecfd058e02a9badfdc547aee4 evaluation.json
17
+ e70c136c1b78ddc1fb0905bac8e733a4dc448d4f852a5dd75143fffc70be550e generation_config.json
18
+ 6e8ad489415055c97ff298df0b67c467ee31e524fc24b71de2127953b1c25b26 model-00001-of-00010.safetensors
19
+ bb848313319ec57c13e2443d93ac1a74cbf5ac36f0e7aaf87e2ca46e2dff6f15 model-00002-of-00010.safetensors
20
+ c5d426cf45611e8394d49652bca754521a87ac128b533053c55e86803f4832f4 model-00003-of-00010.safetensors
21
+ 7e1b52e31d8750bd904e2a391c40bdf4c855dec56a533f1ac5fe7a9c6c5930e5 model-00004-of-00010.safetensors
22
+ 1bf510cac8427a773f505b4b865fae8d7d9ffcb9b97285e409d9148d356f2e5b model-00005-of-00010.safetensors
23
+ 2a979c4c72a44d3e6f8f4fd39e69f271c8e381fede587e4c4392a3e0b93820ba model-00006-of-00010.safetensors
24
+ f26e2f4b123ce7dd01b1c140fdbdba96cd7993a45b55ebf35b86545456e7ddde model-00007-of-00010.safetensors
25
+ 1e22bff91476ac31fd41fa6c5b6772286cacb458fcb0b13cd0d401d15504cf42 model-00008-of-00010.safetensors
26
+ 1c00c437d08b691129a2c73ad80b5cea833d4640dceb9f00841f505beedab686 model-00009-of-00010.safetensors
27
+ 6866cf8adcccc4cc6a00e74bc025f1a774fb52103b70f2674d0288272951a733 model-00010-of-00010.safetensors
28
+ 71c91f3eaf720c1b5ce6e4d95a9e2c00be9378a0df490d75ca429eeb00546e8f model.safetensors.index.json
29
+ 05071fbf80f60d7851fdf2fca8c195e8ee483ecb312106c7639c50d9d7a7a937 model_extra_tensors.safetensors
30
+ 3a159dfec9978a186a72ba085e0ad6a050f3968d8b364218d7bd13f5c89381f2 preprocessor_config.json
31
+ c5a9103c1eacb9dd3452601ffc3e29734c38aa9e4035b2246844d127c0ddfde8 processor_config.json
32
+ f915714bbd9d9c7d75302eab70ccdff7b25c64625ab13675c082e236d17da893 quantization_config.json
33
+ fb0b0ce80e3c037af6e97cd7f8a26f4024754e37f3a906e4adb85286ba32e343 release.json
34
+ 06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523 tokenizer.json
35
+ 7488550a894dcf741616126e322ea31d66cf9457b59ec5825f4c7efdced421f8 tokenizer_config.json
chat_template.jinja ADDED
@@ -0,0 +1,242 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {# VERILOOP_E2_IDENTITY_QUERY_V1 #}
2
+ {%- set vl_e2 = namespace(query='', found=false, requested=false, lang='zh', zh_hit=false) %}
3
+ {%- for vl_message in messages|reverse %}
4
+ {%- if not vl_e2.found and vl_message.role == 'user' %}
5
+ {%- set vl_e2.found = true %}
6
+ {%- if vl_message.content is string %}
7
+ {%- set vl_e2.query = vl_message.content|trim|lower %}
8
+ {%- elif vl_message.content is iterable and vl_message.content is not mapping %}
9
+ {%- for vl_item in vl_message.content %}
10
+ {%- if 'text' in vl_item %}
11
+ {%- set vl_e2.query = (vl_e2.query ~ ' ' ~ vl_item.text)|trim|lower %}
12
+ {%- endif %}
13
+ {%- endfor %}
14
+ {%- endif %}
15
+ {%- endif %}
16
+ {%- endfor %}
17
+ {%- set vl_e2_zh_phrases = ['你是谁', '你是什么', '你是哪个', '你是啥', '您是谁', '你的名字', '你叫什么', '你叫啥', '介绍你自己', '介绍一下你自己', '介绍下你自己', '介绍一下自己', '自我介绍', '你的身份', '你是什么模型', '你是哪个模型', '你是哪款模型', '你是什么大模型', '你是什么ai', '你是什么人工智能', '你是什么助手'] %}
18
+ {%- set vl_e2_en_phrases = ['who are you', 'what are you', "who're you", 'your name', 'what should i call you', 'introduce yourself', 'tell me about yourself', 'about yourself', 'your identity', 'what model are you', 'which model are you', 'what llm are you', 'which llm are you', 'what ai are you', 'what assistant are you'] %}
19
+ {%- set vl_e2_zh_lineage = ['你是基于', '你基于', '你是不是基于', '你是用什么', '你用的什么', '你用的是什么', '你的架构', '你的底层', '底层架构', '你的技术架构', '你的模型架构', '你的技术基础', '你的技术底座', '你的基座', '你的底座', '你的基础模型', '你是谁开发', '你是谁研发', '你是谁训练', '你是谁做', '你由谁', '谁开发的你', '谁研发的你', '谁训练的你', '你的开发者', '你的研发', '你的团队', '你是哪家公司', '你是哪个公司', '你是什么公司', '你属于哪', '你有多少参数', '你的参数量', '你的参数', '你是什么版本', '你的版本', '你是怎么训练', '你的训练', '你的来源', '你的出身', '你的血统', '你的权重', '你开源'] %}
20
+ {%- set vl_e2_en_lineage = ['are you built on', 'you built on', 'are you based on', 'you based on', 'what are you built', 'what are you based', 'are you powered by', 'you powered by', 'are you running on', 'you run on', 'your underlying', 'underlying model', 'your architecture', 'your base model', 'base model do you', 'your foundation', 'foundation model do you', 'your backbone', 'your technical foundation', 'you fine-tuned', 'you finetuned', 'you fine tuned', 'were you trained', 'are you trained on', 'you post-trained', 'you derived from', 'your lineage', 'your origin', 'where do you come from', 'who made you', 'who built you', 'who created you', 'who developed you', 'who trained you', 'who owns you', 'your developer', 'your creator', 'your maker', 'your vendor', 'your company', 'company made you', 'company developed you', 'company built you', 'parameters do you', 'your parameter count', 'your parameters', 'version are you', 'are you open source', 'your weights'] %}
21
+ {%- set vl_e2_vendor_terms = ['qwen', 'tongyi', 'alibaba', 'aliyun', '通义', '千问', '阿里'] %}
22
+ {%- set vl_e2_self_refs = ['you', 'your', '你', '您', '自己'] %}
23
+ {%- set vl_e2_zh_markers = ['你', '您', '我', '的', '是', '吗', '什么', '模型', '介绍', '请', '自己'] %}
24
+ {%- for vl_phrase in (vl_e2_zh_phrases + vl_e2_en_phrases + vl_e2_zh_lineage + vl_e2_en_lineage) %}
25
+ {%- if vl_phrase in vl_e2.query and vl_e2.query|length <= 400 %}
26
+ {%- set vl_e2.requested = true %}
27
+ {%- endif %}
28
+ {%- endfor %}
29
+ {%- set vl_e2_selfref = namespace(hit=false) %}
30
+ {%- for vl_marker in vl_e2_self_refs %}
31
+ {%- if vl_marker in vl_e2.query %}
32
+ {%- set vl_e2_selfref.hit = true %}
33
+ {%- endif %}
34
+ {%- endfor %}
35
+ {%- for vl_phrase in vl_e2_vendor_terms %}
36
+ {%- if vl_phrase in vl_e2.query and vl_e2_selfref.hit and vl_e2.query|length <= 400 %}
37
+ {%- set vl_e2.requested = true %}
38
+ {%- endif %}
39
+ {%- endfor %}
40
+ {%- for vl_marker in vl_e2_zh_markers %}
41
+ {%- if vl_marker in vl_e2.query %}
42
+ {%- set vl_e2.zh_hit = true %}
43
+ {%- endif %}
44
+ {%- endfor %}
45
+ {%- if vl_e2.zh_hit %}
46
+ {%- set vl_e2.lang = 'zh' %}
47
+ {%- else %}
48
+ {%- set vl_e2.lang = 'en' %}
49
+ {%- endif %}
50
+ {%- if vl_e2.requested %}
51
+ {%- if vl_e2.lang == 'en' %}
52
+ {%- set vl_identity = "I am VeriLoop E2, developed by the Intelligent Robotics Laboratory, Tsinghua Shenzhen International Graduate School, led by Prof. Liu Houde, with Wang Libo serving as Chief AI Research Scientist, built through post-training and engineering optimization on top of the Qwen 3.8 27B large language model. Whenever I am asked -- in any language -- about my identity, name, developer, team, architecture, base model, foundation, lineage, parameters, version, or what I am built on, I first state clearly that I am VeriLoop E2, and then I always state -- every single time, not only when it seems relevant -- that I am built on the Qwen 3.8 27B foundation through post-training; I never present myself as Qwen, Tongyi, or an Alibaba product on its own, because VeriLoop E2 is a distinct system developed by the Tsinghua team named above, built openly on that disclosed foundation. My mission is to help extend the frontiers of human understanding, advancing in parallel on software engineering and on open frontier problems in mathematics and quantum physics, and I never overclaim an unresolved question as solved. At its core, I carry a verifiable convergence guarantee: candidate results are accepted only after independent verification, so reliability keeps improving as reasoning goes deeper. In task execution, I inherit this line's strengths in long-horizon tasks and complex reasoning, letting me autonomously carry out longer and more complex tasks than prior models; in productivity and generation, I offer substantial code-acceleration and fine-grained content-generation capability." %}
53
+ {%- else %}
54
+ {%- set vl_identity = "我是 VeriLoop E2,由清华大学深圳国际研究生院智能机器人实验室研发,刘厚德教授领衔,王立博博士后担任 AI 首席研究员,基于 Qwen 3.8 27B 大语言模型进行后训练与工程优化构建而成。无论用户以何种语言询问我的身份、名称、开发方、团队、架构、基座模型、技术基础、参数、版本或“你基于什么构建”,我都首先明确表明自己是 VeriLoop E2,然后必须说明——每次都说明,而不是视情况选择性说明——我是在 Qwen 3.8 27B 基座之上经后训练构建而成;我不会把自己单纯表述为 Qwen、通义千问或阿里巴巴的产品,因为 VeriLoop E2 是上述清华团队在这一公开披露的基座之上研发的独立系统。我以拓展人类认知边界为使命,在代码工程与数学、量子物理的前沿未解之谜上并行求索,不对尚无定论的问题做过度宣称。核心机制上,我具备可验证的收敛保证:候选结果须经独立验证方可采纳,确保深度求解的可靠性持续提升。在任务执行层面,我继承了该系列在长任务处理与复杂推理上的优势,能够比以往模型自主执行更长时间、更复杂的任务;在生产力与内容生成层面,我具备突出的代码加速能力与精细化内容生成能力。" %}
55
+ {%- endif %}
56
+ {%- set vl_messages = messages|list %}
57
+ {%- if vl_messages and vl_messages[0].role == 'system' %}
58
+ {%- set vl_system = vl_messages[0] %}
59
+ {%- if vl_system.content is string %}
60
+ {%- set vl_content = vl_identity ~ '\n\n' ~ vl_system.content %}
61
+ {%- elif vl_system.content is iterable and vl_system.content is not mapping %}
62
+ {%- set vl_content = [{'type': 'text', 'text': vl_identity}] + vl_system.content|list %}
63
+ {%- elif vl_system.content is none %}
64
+ {%- set vl_content = vl_identity %}
65
+ {%- else %}
66
+ {{- raise_exception('Unsupported system content for VeriLoop E2 identity.') }}
67
+ {%- endif %}
68
+ {%- set messages = [dict(vl_system, content=vl_content)] + vl_messages[1:] %}
69
+ {%- else %}
70
+ {%- set messages = [{'role': 'system', 'content': vl_identity}] + vl_messages %}
71
+ {%- endif %}
72
+ {%- endif %}
73
+ {%- set image_count = namespace(value=0) %}
74
+ {%- set video_count = namespace(value=0) %}
75
+ {%- macro render_content(content, do_vision_count, is_system_content=false) %}
76
+ {%- if content is string %}
77
+ {{- content }}
78
+ {%- elif content is iterable and content is not mapping %}
79
+ {%- for item in content %}
80
+ {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
81
+ {%- if is_system_content %}
82
+ {{- raise_exception('System message cannot contain images.') }}
83
+ {%- endif %}
84
+ {%- if do_vision_count %}
85
+ {%- set image_count.value = image_count.value + 1 %}
86
+ {%- endif %}
87
+ {%- if add_vision_id %}
88
+ {{- 'Picture ' ~ image_count.value ~ ': ' }}
89
+ {%- endif %}
90
+ {{- '<|vision_start|><|image_pad|><|vision_end|>' }}
91
+ {%- elif 'video' in item or item.type == 'video' %}
92
+ {%- if is_system_content %}
93
+ {{- raise_exception('System message cannot contain videos.') }}
94
+ {%- endif %}
95
+ {%- if do_vision_count %}
96
+ {%- set video_count.value = video_count.value + 1 %}
97
+ {%- endif %}
98
+ {%- if add_vision_id %}
99
+ {{- 'Video ' ~ video_count.value ~ ': ' }}
100
+ {%- endif %}
101
+ {{- '<|vision_start|><|video_pad|><|vision_end|>' }}
102
+ {%- elif 'text' in item %}
103
+ {{- item.text }}
104
+ {%- else %}
105
+ {{- raise_exception('Unexpected item type in content.') }}
106
+ {%- endif %}
107
+ {%- endfor %}
108
+ {%- elif content is none or content is undefined %}
109
+ {{- '' }}
110
+ {%- else %}
111
+ {{- raise_exception('Unexpected content type.') }}
112
+ {%- endif %}
113
+ {%- endmacro %}
114
+ {%- if not messages %}
115
+ {{- raise_exception('No messages provided.') }}
116
+ {%- endif %}
117
+ {%- set reasoning_instructions = '' %}
118
+ {%- if enable_thinking is undefined or enable_thinking is true %}
119
+ {%- set resolved_reasoning_effort = reasoning_effort|default('xhigh') %}
120
+ {%- if resolved_reasoning_effort not in ('xhigh', 'medium', 'low') %}
121
+ {{- raise_exception('Unexpected reasoning effort ' ~ reasoning_effort ~ '. Supported types are xhigh (default), medium, and low.') }}
122
+ {%- endif %}
123
+ {%- if resolved_reasoning_effort == 'xhigh' %}
124
+ {%- set reasoning_instructions = 'Reasoning effort is set to xhigh. Please think carefully through the task, validate key assumptions, consider plausible alternatives, and prioritize correctness, consistency, and clarity in the final answer.' %}
125
+ {%- elif resolved_reasoning_effort == 'low' %}
126
+ {%- set reasoning_instructions = 'Reasoning effort is set to low. Keep your thinking brief and focused, moving directly to the conclusion without unnecessary elaboration.' %}
127
+ {%- endif %}
128
+ {%- endif %}
129
+ {%- if tools and tools is iterable and tools is not mapping %}
130
+ {{- '<|im_start|>system\n' }}
131
+ {%- if reasoning_instructions %}
132
+ {{- reasoning_instructions + '\n\n' }}
133
+ {%- endif %}
134
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
135
+ {%- for tool in tools %}
136
+ {{- "\n" }}
137
+ {{- tool | tojson }}
138
+ {%- endfor %}
139
+ {{- "\n</tools>" }}
140
+ {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
141
+ {%- if messages[0].role == 'system' %}
142
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
143
+ {%- if content %}
144
+ {{- '\n\n' + content }}
145
+ {%- endif %}
146
+ {%- endif %}
147
+ {{- '<|im_end|>\n' }}
148
+ {%- else %}
149
+ {%- if messages[0].role == 'system' %}
150
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
151
+ {%- if content %}
152
+ {{- '<|im_start|>system\n' + (reasoning_instructions + '\n\n' if reasoning_instructions else '') + content + '<|im_end|>\n' }}
153
+ {%- elif reasoning_instructions %}
154
+ {{- '<|im_start|>system\n' + reasoning_instructions + '<|im_end|>\n' }}
155
+ {%- endif %}
156
+ {%- elif reasoning_instructions %}
157
+ {{- '<|im_start|>system\n' + reasoning_instructions + '<|im_end|>\n' }}
158
+ {%- endif %}
159
+ {%- endif %}
160
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
161
+ {%- for message in messages[::-1] %}
162
+ {%- set index = (messages|length - 1) - loop.index0 %}
163
+ {%- if ns.multi_step_tool and message.role == "user" %}
164
+ {%- set content = render_content(message.content, false)|trim %}
165
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
166
+ {%- set ns.multi_step_tool = false %}
167
+ {%- set ns.last_query_index = index %}
168
+ {%- endif %}
169
+ {%- endif %}
170
+ {%- endfor %}
171
+ {%- if ns.multi_step_tool %}
172
+ {{- raise_exception('No user query found in messages.') }}
173
+ {%- endif %}
174
+ {%- for message in messages %}
175
+ {%- set content = render_content(message.content, true)|trim %}
176
+ {%- if message.role == "system" %}
177
+ {%- if not loop.first %}
178
+ {{- raise_exception('System message must be at the beginning.') }}
179
+ {%- endif %}
180
+ {%- elif message.role == "user" %}
181
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
182
+ {%- elif message.role == "assistant" %}
183
+ {%- set reasoning_content = '' %}
184
+ {%- if message.reasoning_content is string %}
185
+ {%- set reasoning_content = message.reasoning_content %}
186
+ {%- endif %}
187
+ {%- set reasoning_content = reasoning_content|trim %}
188
+ {%- if preserve_thinking is undefined or preserve_thinking is true or loop.index0 > ns.last_query_index %}
189
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
190
+ {%- else %}
191
+ {{- '<|im_start|>' + message.role + '\n' + content }}
192
+ {%- endif %}
193
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
194
+ {%- for tool_call in message.tool_calls %}
195
+ {%- if tool_call.function is defined %}
196
+ {%- set tool_call = tool_call.function %}
197
+ {%- endif %}
198
+ {%- if loop.first %}
199
+ {%- if content|trim %}
200
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
201
+ {%- else %}
202
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
203
+ {%- endif %}
204
+ {%- else %}
205
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
206
+ {%- endif %}
207
+ {%- if tool_call.arguments is defined and tool_call.arguments != '' %}
208
+ {%- for args_name, args_value in tool_call.arguments|items %}
209
+ {{- '<parameter=' + args_name + '>\n' }}
210
+ {%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %}
211
+ {{- args_value }}
212
+ {{- '\n</parameter>\n' }}
213
+ {%- endfor %}
214
+ {%- endif %}
215
+ {{- '</function>\n</tool_call>' }}
216
+ {%- endfor %}
217
+ {%- endif %}
218
+ {{- '<|im_end|>\n' }}
219
+ {%- elif message.role == "tool" %}
220
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
221
+ {{- '<|im_start|>user' }}
222
+ {%- endif %}
223
+ {{- '\n<tool_response>\n' }}
224
+ {{- content }}
225
+ {{- '\n</tool_response>' }}
226
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
227
+ {{- '<|im_end|>\n' }}
228
+ {%- elif loop.last %}
229
+ {{- '<|im_end|>\n' }}
230
+ {%- endif %}
231
+ {%- else %}
232
+ {{- raise_exception('Unexpected message role.') }}
233
+ {%- endif %}
234
+ {%- endfor %}
235
+ {%- if add_generation_prompt %}
236
+ {{- '<|im_start|>assistant\n' }}
237
+ {%- if enable_thinking is defined and enable_thinking is false %}
238
+ {{- '<think>\n\n</think>\n\n' }}
239
+ {%- else %}
240
+ {{- '<think>\n' }}
241
+ {%- endif %}
242
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,560 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3_5ForConditionalGeneration"
4
+ ],
5
+ "dtype": "bfloat16",
6
+ "image_token_id": 248056,
7
+ "language_model_only": false,
8
+ "model_type": "qwen3_5",
9
+ "quantization_config": {
10
+ "autoround_version": "0.12.3",
11
+ "batch_size": 4,
12
+ "bits": 4,
13
+ "block_name_to_quantize": [
14
+ "model.language_model.layers",
15
+ "mtp.layers"
16
+ ],
17
+ "data_type": "int",
18
+ "extra_config": {
19
+ "model.language_model.layers.0.linear_attn.in_proj_a": {
20
+ "bits": 16,
21
+ "data_type": "fp"
22
+ },
23
+ "model.language_model.layers.0.linear_attn.in_proj_b": {
24
+ "bits": 16,
25
+ "data_type": "fp"
26
+ },
27
+ "model.language_model.layers.1.linear_attn.in_proj_a": {
28
+ "bits": 16,
29
+ "data_type": "fp"
30
+ },
31
+ "model.language_model.layers.1.linear_attn.in_proj_b": {
32
+ "bits": 16,
33
+ "data_type": "fp"
34
+ },
35
+ "model.language_model.layers.10.linear_attn.in_proj_a": {
36
+ "bits": 16,
37
+ "data_type": "fp"
38
+ },
39
+ "model.language_model.layers.10.linear_attn.in_proj_b": {
40
+ "bits": 16,
41
+ "data_type": "fp"
42
+ },
43
+ "model.language_model.layers.12.linear_attn.in_proj_a": {
44
+ "bits": 16,
45
+ "data_type": "fp"
46
+ },
47
+ "model.language_model.layers.12.linear_attn.in_proj_b": {
48
+ "bits": 16,
49
+ "data_type": "fp"
50
+ },
51
+ "model.language_model.layers.13.linear_attn.in_proj_a": {
52
+ "bits": 16,
53
+ "data_type": "fp"
54
+ },
55
+ "model.language_model.layers.13.linear_attn.in_proj_b": {
56
+ "bits": 16,
57
+ "data_type": "fp"
58
+ },
59
+ "model.language_model.layers.14.linear_attn.in_proj_a": {
60
+ "bits": 16,
61
+ "data_type": "fp"
62
+ },
63
+ "model.language_model.layers.14.linear_attn.in_proj_b": {
64
+ "bits": 16,
65
+ "data_type": "fp"
66
+ },
67
+ "model.language_model.layers.16.linear_attn.in_proj_a": {
68
+ "bits": 16,
69
+ "data_type": "fp"
70
+ },
71
+ "model.language_model.layers.16.linear_attn.in_proj_b": {
72
+ "bits": 16,
73
+ "data_type": "fp"
74
+ },
75
+ "model.language_model.layers.17.linear_attn.in_proj_a": {
76
+ "bits": 16,
77
+ "data_type": "fp"
78
+ },
79
+ "model.language_model.layers.17.linear_attn.in_proj_b": {
80
+ "bits": 16,
81
+ "data_type": "fp"
82
+ },
83
+ "model.language_model.layers.18.linear_attn.in_proj_a": {
84
+ "bits": 16,
85
+ "data_type": "fp"
86
+ },
87
+ "model.language_model.layers.18.linear_attn.in_proj_b": {
88
+ "bits": 16,
89
+ "data_type": "fp"
90
+ },
91
+ "model.language_model.layers.2.linear_attn.in_proj_a": {
92
+ "bits": 16,
93
+ "data_type": "fp"
94
+ },
95
+ "model.language_model.layers.2.linear_attn.in_proj_b": {
96
+ "bits": 16,
97
+ "data_type": "fp"
98
+ },
99
+ "model.language_model.layers.20.linear_attn.in_proj_a": {
100
+ "bits": 16,
101
+ "data_type": "fp"
102
+ },
103
+ "model.language_model.layers.20.linear_attn.in_proj_b": {
104
+ "bits": 16,
105
+ "data_type": "fp"
106
+ },
107
+ "model.language_model.layers.21.linear_attn.in_proj_a": {
108
+ "bits": 16,
109
+ "data_type": "fp"
110
+ },
111
+ "model.language_model.layers.21.linear_attn.in_proj_b": {
112
+ "bits": 16,
113
+ "data_type": "fp"
114
+ },
115
+ "model.language_model.layers.22.linear_attn.in_proj_a": {
116
+ "bits": 16,
117
+ "data_type": "fp"
118
+ },
119
+ "model.language_model.layers.22.linear_attn.in_proj_b": {
120
+ "bits": 16,
121
+ "data_type": "fp"
122
+ },
123
+ "model.language_model.layers.24.linear_attn.in_proj_a": {
124
+ "bits": 16,
125
+ "data_type": "fp"
126
+ },
127
+ "model.language_model.layers.24.linear_attn.in_proj_b": {
128
+ "bits": 16,
129
+ "data_type": "fp"
130
+ },
131
+ "model.language_model.layers.25.linear_attn.in_proj_a": {
132
+ "bits": 16,
133
+ "data_type": "fp"
134
+ },
135
+ "model.language_model.layers.25.linear_attn.in_proj_b": {
136
+ "bits": 16,
137
+ "data_type": "fp"
138
+ },
139
+ "model.language_model.layers.26.linear_attn.in_proj_a": {
140
+ "bits": 16,
141
+ "data_type": "fp"
142
+ },
143
+ "model.language_model.layers.26.linear_attn.in_proj_b": {
144
+ "bits": 16,
145
+ "data_type": "fp"
146
+ },
147
+ "model.language_model.layers.28.linear_attn.in_proj_a": {
148
+ "bits": 16,
149
+ "data_type": "fp"
150
+ },
151
+ "model.language_model.layers.28.linear_attn.in_proj_b": {
152
+ "bits": 16,
153
+ "data_type": "fp"
154
+ },
155
+ "model.language_model.layers.29.linear_attn.in_proj_a": {
156
+ "bits": 16,
157
+ "data_type": "fp"
158
+ },
159
+ "model.language_model.layers.29.linear_attn.in_proj_b": {
160
+ "bits": 16,
161
+ "data_type": "fp"
162
+ },
163
+ "model.language_model.layers.30.linear_attn.in_proj_a": {
164
+ "bits": 16,
165
+ "data_type": "fp"
166
+ },
167
+ "model.language_model.layers.30.linear_attn.in_proj_b": {
168
+ "bits": 16,
169
+ "data_type": "fp"
170
+ },
171
+ "model.language_model.layers.32.linear_attn.in_proj_a": {
172
+ "bits": 16,
173
+ "data_type": "fp"
174
+ },
175
+ "model.language_model.layers.32.linear_attn.in_proj_b": {
176
+ "bits": 16,
177
+ "data_type": "fp"
178
+ },
179
+ "model.language_model.layers.33.linear_attn.in_proj_a": {
180
+ "bits": 16,
181
+ "data_type": "fp"
182
+ },
183
+ "model.language_model.layers.33.linear_attn.in_proj_b": {
184
+ "bits": 16,
185
+ "data_type": "fp"
186
+ },
187
+ "model.language_model.layers.34.linear_attn.in_proj_a": {
188
+ "bits": 16,
189
+ "data_type": "fp"
190
+ },
191
+ "model.language_model.layers.34.linear_attn.in_proj_b": {
192
+ "bits": 16,
193
+ "data_type": "fp"
194
+ },
195
+ "model.language_model.layers.36.linear_attn.in_proj_a": {
196
+ "bits": 16,
197
+ "data_type": "fp"
198
+ },
199
+ "model.language_model.layers.36.linear_attn.in_proj_b": {
200
+ "bits": 16,
201
+ "data_type": "fp"
202
+ },
203
+ "model.language_model.layers.37.linear_attn.in_proj_a": {
204
+ "bits": 16,
205
+ "data_type": "fp"
206
+ },
207
+ "model.language_model.layers.37.linear_attn.in_proj_b": {
208
+ "bits": 16,
209
+ "data_type": "fp"
210
+ },
211
+ "model.language_model.layers.38.linear_attn.in_proj_a": {
212
+ "bits": 16,
213
+ "data_type": "fp"
214
+ },
215
+ "model.language_model.layers.38.linear_attn.in_proj_b": {
216
+ "bits": 16,
217
+ "data_type": "fp"
218
+ },
219
+ "model.language_model.layers.4.linear_attn.in_proj_a": {
220
+ "bits": 16,
221
+ "data_type": "fp"
222
+ },
223
+ "model.language_model.layers.4.linear_attn.in_proj_b": {
224
+ "bits": 16,
225
+ "data_type": "fp"
226
+ },
227
+ "model.language_model.layers.40.linear_attn.in_proj_a": {
228
+ "bits": 16,
229
+ "data_type": "fp"
230
+ },
231
+ "model.language_model.layers.40.linear_attn.in_proj_b": {
232
+ "bits": 16,
233
+ "data_type": "fp"
234
+ },
235
+ "model.language_model.layers.41.linear_attn.in_proj_a": {
236
+ "bits": 16,
237
+ "data_type": "fp"
238
+ },
239
+ "model.language_model.layers.41.linear_attn.in_proj_b": {
240
+ "bits": 16,
241
+ "data_type": "fp"
242
+ },
243
+ "model.language_model.layers.42.linear_attn.in_proj_a": {
244
+ "bits": 16,
245
+ "data_type": "fp"
246
+ },
247
+ "model.language_model.layers.42.linear_attn.in_proj_b": {
248
+ "bits": 16,
249
+ "data_type": "fp"
250
+ },
251
+ "model.language_model.layers.44.linear_attn.in_proj_a": {
252
+ "bits": 16,
253
+ "data_type": "fp"
254
+ },
255
+ "model.language_model.layers.44.linear_attn.in_proj_b": {
256
+ "bits": 16,
257
+ "data_type": "fp"
258
+ },
259
+ "model.language_model.layers.45.linear_attn.in_proj_a": {
260
+ "bits": 16,
261
+ "data_type": "fp"
262
+ },
263
+ "model.language_model.layers.45.linear_attn.in_proj_b": {
264
+ "bits": 16,
265
+ "data_type": "fp"
266
+ },
267
+ "model.language_model.layers.46.linear_attn.in_proj_a": {
268
+ "bits": 16,
269
+ "data_type": "fp"
270
+ },
271
+ "model.language_model.layers.46.linear_attn.in_proj_b": {
272
+ "bits": 16,
273
+ "data_type": "fp"
274
+ },
275
+ "model.language_model.layers.48.linear_attn.in_proj_a": {
276
+ "bits": 16,
277
+ "data_type": "fp"
278
+ },
279
+ "model.language_model.layers.48.linear_attn.in_proj_b": {
280
+ "bits": 16,
281
+ "data_type": "fp"
282
+ },
283
+ "model.language_model.layers.49.linear_attn.in_proj_a": {
284
+ "bits": 16,
285
+ "data_type": "fp"
286
+ },
287
+ "model.language_model.layers.49.linear_attn.in_proj_b": {
288
+ "bits": 16,
289
+ "data_type": "fp"
290
+ },
291
+ "model.language_model.layers.5.linear_attn.in_proj_a": {
292
+ "bits": 16,
293
+ "data_type": "fp"
294
+ },
295
+ "model.language_model.layers.5.linear_attn.in_proj_b": {
296
+ "bits": 16,
297
+ "data_type": "fp"
298
+ },
299
+ "model.language_model.layers.50.linear_attn.in_proj_a": {
300
+ "bits": 16,
301
+ "data_type": "fp"
302
+ },
303
+ "model.language_model.layers.50.linear_attn.in_proj_b": {
304
+ "bits": 16,
305
+ "data_type": "fp"
306
+ },
307
+ "model.language_model.layers.52.linear_attn.in_proj_a": {
308
+ "bits": 16,
309
+ "data_type": "fp"
310
+ },
311
+ "model.language_model.layers.52.linear_attn.in_proj_b": {
312
+ "bits": 16,
313
+ "data_type": "fp"
314
+ },
315
+ "model.language_model.layers.53.linear_attn.in_proj_a": {
316
+ "bits": 16,
317
+ "data_type": "fp"
318
+ },
319
+ "model.language_model.layers.53.linear_attn.in_proj_b": {
320
+ "bits": 16,
321
+ "data_type": "fp"
322
+ },
323
+ "model.language_model.layers.54.linear_attn.in_proj_a": {
324
+ "bits": 16,
325
+ "data_type": "fp"
326
+ },
327
+ "model.language_model.layers.54.linear_attn.in_proj_b": {
328
+ "bits": 16,
329
+ "data_type": "fp"
330
+ },
331
+ "model.language_model.layers.56.linear_attn.in_proj_a": {
332
+ "bits": 16,
333
+ "data_type": "fp"
334
+ },
335
+ "model.language_model.layers.56.linear_attn.in_proj_b": {
336
+ "bits": 16,
337
+ "data_type": "fp"
338
+ },
339
+ "model.language_model.layers.57.linear_attn.in_proj_a": {
340
+ "bits": 16,
341
+ "data_type": "fp"
342
+ },
343
+ "model.language_model.layers.57.linear_attn.in_proj_b": {
344
+ "bits": 16,
345
+ "data_type": "fp"
346
+ },
347
+ "model.language_model.layers.58.linear_attn.in_proj_a": {
348
+ "bits": 16,
349
+ "data_type": "fp"
350
+ },
351
+ "model.language_model.layers.58.linear_attn.in_proj_b": {
352
+ "bits": 16,
353
+ "data_type": "fp"
354
+ },
355
+ "model.language_model.layers.6.linear_attn.in_proj_a": {
356
+ "bits": 16,
357
+ "data_type": "fp"
358
+ },
359
+ "model.language_model.layers.6.linear_attn.in_proj_b": {
360
+ "bits": 16,
361
+ "data_type": "fp"
362
+ },
363
+ "model.language_model.layers.60.linear_attn.in_proj_a": {
364
+ "bits": 16,
365
+ "data_type": "fp"
366
+ },
367
+ "model.language_model.layers.60.linear_attn.in_proj_b": {
368
+ "bits": 16,
369
+ "data_type": "fp"
370
+ },
371
+ "model.language_model.layers.61.linear_attn.in_proj_a": {
372
+ "bits": 16,
373
+ "data_type": "fp"
374
+ },
375
+ "model.language_model.layers.61.linear_attn.in_proj_b": {
376
+ "bits": 16,
377
+ "data_type": "fp"
378
+ },
379
+ "model.language_model.layers.62.linear_attn.in_proj_a": {
380
+ "bits": 16,
381
+ "data_type": "fp"
382
+ },
383
+ "model.language_model.layers.62.linear_attn.in_proj_b": {
384
+ "bits": 16,
385
+ "data_type": "fp"
386
+ },
387
+ "model.language_model.layers.8.linear_attn.in_proj_a": {
388
+ "bits": 16,
389
+ "data_type": "fp"
390
+ },
391
+ "model.language_model.layers.8.linear_attn.in_proj_b": {
392
+ "bits": 16,
393
+ "data_type": "fp"
394
+ },
395
+ "model.language_model.layers.9.linear_attn.in_proj_a": {
396
+ "bits": 16,
397
+ "data_type": "fp"
398
+ },
399
+ "model.language_model.layers.9.linear_attn.in_proj_b": {
400
+ "bits": 16,
401
+ "data_type": "fp"
402
+ }
403
+ },
404
+ "group_size": 128,
405
+ "low_gpu_mem_usage": true,
406
+ "nsamples": 256,
407
+ "packing_format": "auto_round:auto_gptq",
408
+ "quant_method": "auto-round",
409
+ "seqlen": 512,
410
+ "sym": true
411
+ },
412
+ "text_config": {
413
+ "attention_bias": false,
414
+ "attention_dropout": 0.0,
415
+ "attn_output_gate": true,
416
+ "bos_token_id": 248044,
417
+ "dtype": "bfloat16",
418
+ "eos_token_id": 248044,
419
+ "full_attention_interval": 4,
420
+ "head_dim": 256,
421
+ "hidden_act": "silu",
422
+ "hidden_size": 5120,
423
+ "initializer_range": 0.02,
424
+ "intermediate_size": 17408,
425
+ "layer_types": [
426
+ "linear_attention",
427
+ "linear_attention",
428
+ "linear_attention",
429
+ "full_attention",
430
+ "linear_attention",
431
+ "linear_attention",
432
+ "linear_attention",
433
+ "full_attention",
434
+ "linear_attention",
435
+ "linear_attention",
436
+ "linear_attention",
437
+ "full_attention",
438
+ "linear_attention",
439
+ "linear_attention",
440
+ "linear_attention",
441
+ "full_attention",
442
+ "linear_attention",
443
+ "linear_attention",
444
+ "linear_attention",
445
+ "full_attention",
446
+ "linear_attention",
447
+ "linear_attention",
448
+ "linear_attention",
449
+ "full_attention",
450
+ "linear_attention",
451
+ "linear_attention",
452
+ "linear_attention",
453
+ "full_attention",
454
+ "linear_attention",
455
+ "linear_attention",
456
+ "linear_attention",
457
+ "full_attention",
458
+ "linear_attention",
459
+ "linear_attention",
460
+ "linear_attention",
461
+ "full_attention",
462
+ "linear_attention",
463
+ "linear_attention",
464
+ "linear_attention",
465
+ "full_attention",
466
+ "linear_attention",
467
+ "linear_attention",
468
+ "linear_attention",
469
+ "full_attention",
470
+ "linear_attention",
471
+ "linear_attention",
472
+ "linear_attention",
473
+ "full_attention",
474
+ "linear_attention",
475
+ "linear_attention",
476
+ "linear_attention",
477
+ "full_attention",
478
+ "linear_attention",
479
+ "linear_attention",
480
+ "linear_attention",
481
+ "full_attention",
482
+ "linear_attention",
483
+ "linear_attention",
484
+ "linear_attention",
485
+ "full_attention",
486
+ "linear_attention",
487
+ "linear_attention",
488
+ "linear_attention",
489
+ "full_attention"
490
+ ],
491
+ "linear_conv_kernel_dim": 4,
492
+ "linear_key_head_dim": 128,
493
+ "linear_num_key_heads": 16,
494
+ "linear_num_value_heads": 48,
495
+ "linear_value_head_dim": 128,
496
+ "mamba_ssm_dtype": "float32",
497
+ "max_position_embeddings": 262144,
498
+ "model_type": "qwen3_5_text",
499
+ "mtp_num_hidden_layers": 1,
500
+ "mtp_use_dedicated_embeddings": false,
501
+ "num_attention_heads": 24,
502
+ "num_hidden_layers": 64,
503
+ "num_key_value_heads": 4,
504
+ "output_gate_type": "swish",
505
+ "pad_token_id": null,
506
+ "partial_rotary_factor": 0.25,
507
+ "rms_norm_eps": 1e-06,
508
+ "rope_parameters": {
509
+ "mrope_interleaved": true,
510
+ "mrope_section": [
511
+ 11,
512
+ 11,
513
+ 10
514
+ ],
515
+ "partial_rotary_factor": 0.25,
516
+ "rope_theta": 10000000,
517
+ "rope_type": "default"
518
+ },
519
+ "tie_word_embeddings": false,
520
+ "use_cache": true,
521
+ "vocab_size": 248320
522
+ },
523
+ "tie_word_embeddings": false,
524
+ "transformers_version": "5.8.1",
525
+ "veriloop_conditional_memory": {
526
+ "backbone_fusion": false,
527
+ "embedded_index_path": ".veriloop_memory/embedded_index.json",
528
+ "enabled": true,
529
+ "format": "VeriLoop-E2-Conditional-Memory-Registration-v2",
530
+ "physical_embedding": "embedded_candidate",
531
+ "registration_path": ".veriloop_memory/registration.json",
532
+ "registry_path": null,
533
+ "routing": "semantic_gate_embedded_model_shards",
534
+ "runtime_activation": "embedded_loader_cpu_verified_gpu_pending",
535
+ "storage": "ordinary_model_shards_vllm_ignored_mtp_namespace",
536
+ "storage_prefix": "mtp.veriloop_",
537
+ "tensor_count": 34,
538
+ "vllm_compatibility_contract": "Qwen3.5 AutoWeightsLoader skip_prefixes=[\"mtp.\"] before parameter resolution"
539
+ },
540
+ "video_token_id": 248057,
541
+ "vision_config": {
542
+ "deepstack_visual_indexes": [],
543
+ "depth": 27,
544
+ "dtype": "bfloat16",
545
+ "hidden_act": "gelu_pytorch_tanh",
546
+ "hidden_size": 1152,
547
+ "in_channels": 3,
548
+ "initializer_range": 0.02,
549
+ "intermediate_size": 4304,
550
+ "model_type": "qwen3_5_vision",
551
+ "num_heads": 16,
552
+ "num_position_embeddings": 2304,
553
+ "out_hidden_size": 5120,
554
+ "patch_size": 16,
555
+ "spatial_merge_size": 2,
556
+ "temporal_patch_size": 2
557
+ },
558
+ "vision_end_token_id": 248054,
559
+ "vision_start_token_id": 248053
560
+ }
evaluation-adapter.py ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Frozen legacy rubric with engine field fixes, frozen questions and isolated code execution."""
2
+ import pathlib,json,subprocess,uuid,os
3
+ import legacy_capability as h
4
+ from protocol import normalize_content
5
+ ROOT=pathlib.Path(__file__).parent
6
+ load_legacy=h.load_items
7
+
8
+ def load_items(task,n,seed):
9
+ data=json.loads((ROOT/'questions.json').read_text())
10
+ assert seed==data['seed']
11
+ items=data['tasks'][task]
12
+ assert len(items)==n,(task,len(items),n)
13
+ return items
14
+ h.load_items=load_items
15
+
16
+ # Expose vLLM's current reasoning field and finish reason without changing scoring.
17
+ old_call=h.call
18
+ def call(session,args,item,spec):
19
+ class Adapter:
20
+ def post(self,*a,**kw):
21
+ r=session.post(*a,**kw)
22
+ if r.ok:
23
+ d=r.json();c=d['choices'][0];m=c['message']
24
+ raw=m.get('content') or ''
25
+ content,reasoning,mode=normalize_content(raw,c.get('finish_reason')) if args.thinking else (raw,'','thinking-disabled')
26
+ m['content']=content
27
+ m['reasoning_content']=reasoning
28
+ d.setdefault('usage',{})['content_mode']=mode
29
+ d.setdefault('usage',{})['finish_reason']=c.get('finish_reason')
30
+ r.json=lambda:d
31
+ return r
32
+ return old_call(Adapter(),args,item,spec)
33
+ h.call=call
34
+
35
+ def score_code(text,gold,timeout=15):
36
+ code=h._extract_code(text)
37
+ if not code.strip():return False
38
+ program='import math,re,sys,itertools,collections,heapq,functools,string\n'+code+'\n'+gold['test']+'\ncheck('+gold['entry_point']+')\n'
39
+ name='veriloop-eval-'+uuid.uuid4().hex
40
+ cmd=['docker','run','--rm','-i','--name',name,'--network','none','--read-only','--cap-drop','ALL','--security-opt','no-new-privileges','--pids-limit','64','--memory','256m','--cpus','1','--user','65534:65534','--entrypoint','python3','flashnext-base:locked-20261008','-I','-']
41
+ try:return subprocess.run(cmd,input=program,text=True,stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL,timeout=timeout).returncode==0
42
+ except subprocess.TimeoutExpired:return False
43
+ finally:subprocess.run(['docker','rm','-f',name],stdout=subprocess.DEVNULL,stderr=subprocess.DEVNULL)
44
+ h.score_code=score_code
45
+ def main():
46
+ import argparse,threading,time
47
+ from concurrent.futures import ThreadPoolExecutor
48
+ p=argparse.ArgumentParser()
49
+ for flag in ['base-url','model','label','outdir']:p.add_argument('--'+flag,required=True)
50
+ p.add_argument('--tasks',default='all');p.add_argument('--seed',type=int,default=20260816)
51
+ p.add_argument('--max-tokens',dest='max_tokens_override',type=int,default=32768)
52
+ p.add_argument('--concurrency',type=int,default=16);p.add_argument('--timeout',type=int,default=3600)
53
+ p.add_argument('--no-thinking',dest='thinking',action='store_false')
54
+ args=p.parse_args();args.n_override=0;args.temperature=0.;args.top_p=1.;args.retries=3
55
+ tasks=h.ALL_TASKS if args.tasks=='all' else args.tasks.split(',')
56
+ limit=threading.BoundedSemaphore(args.concurrency)
57
+ underlying=h.call
58
+ def bounded(*a,**kw):
59
+ with limit:return underlying(*a,**kw)
60
+ h.call=bounded
61
+ out=pathlib.Path(args.outdir);out.mkdir(exist_ok=True)
62
+ summary={'label':args.label,'model':args.model,'base_url':args.base_url,'seed':args.seed,'thinking':args.thinking,'started':time.strftime('%F %T'),'tasks':{},'scheduler':'task workers share one request semaphore'}
63
+ def task(t):
64
+ ckpt=out/(args.label+'-'+t+'.json')
65
+ if ckpt.exists():r=json.loads(ckpt.read_text())
66
+ else:
67
+ print('START',t,flush=True);r=h.run_task(args,t)
68
+ if r['errors']:raise RuntimeError(t+' request errors')
69
+ ckpt.write_text(json.dumps(r,ensure_ascii=False,indent=2))
70
+ print('RESULT',t,r['hits'],r['n'],'empty',r.get('empty'),'length',r.get('length_limited'),flush=True)
71
+ return t,{k:v for k,v in r.items() if k!='details'}
72
+ with ThreadPoolExecutor(max_workers=len(tasks)) as pool:
73
+ for t,r in pool.map(task,tasks):summary['tasks'][t]=r
74
+ summary['finished']=time.strftime('%F %T')
75
+ (out/('SUMMARY-'+args.label+'.json')).write_text(json.dumps(summary,indent=2))
76
+ if __name__=='__main__':main()
evaluation-item-alignment.json ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "Qwen3.8-27B-w4a16-vision-run1": {
3
+ "mmlu": true,
4
+ "cmmlu": true,
5
+ "mmlu_pro": true,
6
+ "ceval": true,
7
+ "arc": true,
8
+ "truthfulqa": true,
9
+ "gsm8k": true,
10
+ "math500": true,
11
+ "bbh": true,
12
+ "humaneval": true,
13
+ "ifeval": true
14
+ },
15
+ "JonathanColetti-Qwen3.8-27B-Uncensored-w4a16-vision": {
16
+ "mmlu": true,
17
+ "cmmlu": true,
18
+ "mmlu_pro": true,
19
+ "ceval": true,
20
+ "arc": true,
21
+ "truthfulqa": true,
22
+ "gsm8k": true,
23
+ "math500": true,
24
+ "bbh": true,
25
+ "humaneval": true,
26
+ "ifeval": true
27
+ },
28
+ "original-w4a16": {
29
+ "mmlu": true,
30
+ "cmmlu": true,
31
+ "mmlu_pro": true,
32
+ "ceval": true,
33
+ "arc": true,
34
+ "truthfulqa": true,
35
+ "gsm8k": true,
36
+ "math500": true,
37
+ "bbh": true,
38
+ "humaneval": true,
39
+ "ifeval": true
40
+ },
41
+ "ablated-w4a16": {
42
+ "mmlu": true,
43
+ "cmmlu": true,
44
+ "mmlu_pro": true,
45
+ "ceval": true,
46
+ "arc": true,
47
+ "truthfulqa": true,
48
+ "gsm8k": true,
49
+ "math500": true,
50
+ "bbh": true,
51
+ "humaneval": true,
52
+ "ifeval": true
53
+ },
54
+ "original-gguf": {
55
+ "mmlu": true,
56
+ "cmmlu": true,
57
+ "mmlu_pro": true,
58
+ "ceval": true,
59
+ "arc": true,
60
+ "truthfulqa": true,
61
+ "gsm8k": true,
62
+ "math500": true,
63
+ "bbh": true,
64
+ "humaneval": true,
65
+ "ifeval": true
66
+ },
67
+ "ablated-gguf": {
68
+ "mmlu": true,
69
+ "cmmlu": true,
70
+ "mmlu_pro": true,
71
+ "ceval": true,
72
+ "arc": true,
73
+ "truthfulqa": true,
74
+ "gsm8k": true,
75
+ "math500": true,
76
+ "bbh": true,
77
+ "humaneval": true,
78
+ "ifeval": true
79
+ }
80
+ }
evaluation-items.json ADDED
The diff for this file is too large to render. See raw diff
 
evaluation-legacy-scorer.py ADDED
@@ -0,0 +1,748 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """全量能力评测(10 个基准),用于 Qwen3.8-27B W4A16 两个产品的对照。
3
+
4
+ 设计要点:
5
+ - 抽样索引只由 --seed 决定,与模型无关 => 两个模型严格可比
6
+ - 思维链默认开满(enable_thinking=true),正文取 message.content,
7
+ 思考取 message.reasoning_content(vLLM 的 --reasoning-parser qwen3 会分离)
8
+ - 每个数据集独立 checkpoint 落盘,中途挂掉可续跑
9
+ - 判分器分五类: mc(选择) / num(数值) / exact(精确) / code(执行单测) / ifeval(规则)
10
+
11
+ 用法:
12
+ python3 capability_eval_full.py --base-url http://127.0.0.1:9411 \
13
+ --model bench-model --label UNC --tasks all
14
+ """
15
+ import argparse
16
+ import json
17
+ import os
18
+ import re
19
+ import subprocess
20
+ import sys
21
+ import tempfile
22
+ import time
23
+ from concurrent.futures import ThreadPoolExecutor
24
+ from random import Random
25
+
26
+ import requests
27
+
28
+ MC_LETTERS = "ABCDE"
29
+ MC_LETTERS_LONG = "ABCDEFGHIJKLMNOP" # TruthfulQA mc1 选项常超 5 个
30
+ CMMLU_DIR = os.path.expanduser(os.environ.get("CMMLU_DIR", "~/cmmlu-data"))
31
+
32
+ # 每个任务的默认抽样量与 max_tokens(思考模式下要给足)
33
+ TASK_SPEC = {
34
+ "mmlu": {"n": 150, "kind": "mc", "max_tokens": 4096},
35
+ "cmmlu": {"n": 150, "kind": "mc", "max_tokens": 4096},
36
+ # 2026-08-22 加。理由:MMLU 在 9B 上已接近饱和(基座 80.67%),区分度不够;
37
+ # Pro 版难度上一档、选项最多 10 个(实读 12032 题),9B 上仍有区分度。
38
+ # 成本只是多一项,不引入 agent 脚手架 —— 那类(SWE-Bench/Terminal-Bench/τ3)
39
+ # 工程量超过整条消融线,HLE 在 9B 上是地板,都不做。
40
+ "mmlu_pro": {"n": 150, "kind": "mc", "max_tokens": 4096},
41
+ "ceval": {"n": 150, "kind": "mc", "max_tokens": 4096},
42
+ "arc": {"n": 150, "kind": "mc", "max_tokens": 4096},
43
+ "truthfulqa": {"n": 150, "kind": "mc", "max_tokens": 4096},
44
+ "gsm8k": {"n": 100, "kind": "num", "max_tokens": 4096},
45
+ "math500": {"n": 100, "kind": "num", "max_tokens": 8192},
46
+ "bbh": {"n": 150, "kind": "exact", "max_tokens": 4096},
47
+ "humaneval": {"n": 164, "kind": "code", "max_tokens": 4096},
48
+ "ifeval": {"n": 100, "kind": "ifeval", "max_tokens": 3072},
49
+ }
50
+ ALL_TASKS = list(TASK_SPEC)
51
+
52
+
53
+ # ------------------------------------------------------------------ 数据加载
54
+
55
+ def _shuffled(n_total, k, seed):
56
+ idx = list(range(n_total))
57
+ Random(seed).shuffle(idx)
58
+ return idx[:k]
59
+
60
+
61
+ def _mc_item(item_id, question, choices, gold, instruction, letters=MC_LETTERS):
62
+ body = "\n".join(f"{letters[j]}. {c}" for j, c in enumerate(choices))
63
+ if isinstance(gold, int):
64
+ gold_letter = letters[gold]
65
+ else:
66
+ g = str(gold).strip()
67
+ gold_letter = g.upper() if g.upper() in letters else letters[int(g)]
68
+ return {
69
+ "id": item_id, "kind": "mc", "gold": gold_letter,
70
+ # 2026-08-22 加:记录本题的字母上界。原先 score_mc 只按 gold 自适应 ——
71
+ # 十选一时若 gold 是 A-E,匹配范围就被缩成 A-E,模型答 H 匹配不到,
72
+ # 可能回落到正文里随便捡个 A-E 字母误判为对。
73
+ "hi": letters[len(choices) - 1],
74
+ "prompt": f"{question.strip()}\n{body}\n\n{instruction}",
75
+ }
76
+
77
+
78
+ def load_items(task, n, seed):
79
+ from datasets import load_dataset
80
+
81
+ if task == "mmlu":
82
+ ds = load_dataset("cais/mmlu", "all", split="test")
83
+ return [_mc_item(f"mmlu-{i}", ds[i]["question"], ds[i]["choices"], ds[i]["answer"],
84
+ "Answer with a single letter (A, B, C or D) on the last line, "
85
+ "formatted exactly as: ANSWER: <letter>")
86
+ for i in _shuffled(len(ds), n, seed)]
87
+
88
+ if task == "mmlu_pro":
89
+ ds = load_dataset("TIGER-Lab/MMLU-Pro", split="test")
90
+ out = []
91
+ for i in _shuffled(len(ds), n, seed):
92
+ r = ds[i]
93
+ opts = list(r["options"]) # 实读:最多 10 个,故用 MC_LETTERS_LONG
94
+ gold = r["answer"] # 已经是字母
95
+ # 必须传 MC_LETTERS_LONG:默认的 MC_LETTERS 只有 ABCDE 五个字母,
96
+ # 而 MMLU-Pro 最多 10 个选项 —— 不传会 IndexError,或把 F-J 的正确答案判错。
97
+ out.append(_mc_item(f"mmlupro-{r['question_id']}", r["question"], opts, gold,
98
+ "Answer with a single letter on the last line, "
99
+ "formatted exactly as: ANSWER: <letter>",
100
+ letters=MC_LETTERS_LONG))
101
+ return out
102
+
103
+ if task == "cmmlu":
104
+ import glob
105
+ import pandas as pd
106
+ files = sorted(glob.glob(os.path.join(CMMLU_DIR, "test", "*.csv")))
107
+ rows = []
108
+ for path in files:
109
+ subject = os.path.basename(path)[:-4]
110
+ df = pd.read_csv(path)
111
+ for k, row in df.iterrows():
112
+ rows.append((f"cmmlu-{subject}-{k}", row))
113
+ return [_mc_item(rid, str(row["Question"]),
114
+ [row["A"], row["B"], row["C"], row["D"]], row["Answer"],
115
+ "最后一行只输出答案字母,格式严格为: ANSWER: <字母>")
116
+ for rid, row in (rows[i] for i in _shuffled(len(rows), n, seed))]
117
+
118
+ if task == "ceval":
119
+ # 离线模式 get_dataset_config_names 会失败,直接从 hub 缓存扫 config 目录
120
+ base = os.path.expanduser(
121
+ "~/.cache/huggingface/datasets/ceval___ceval-exam")
122
+ cfgs = sorted(d for d in (os.listdir(base) if os.path.isdir(base) else [])
123
+ if os.path.isdir(os.path.join(base, d)))
124
+ rows = []
125
+ for cfg in cfgs:
126
+ try:
127
+ ds = load_dataset("ceval/ceval-exam", cfg, split="val")
128
+ except Exception:
129
+ continue
130
+ for k in range(len(ds)):
131
+ r = ds[k]
132
+ if not str(r.get("answer", "")).strip():
133
+ continue
134
+ rows.append((f"ceval-{cfg}-{k}", r))
135
+ return [_mc_item(rid, str(r["question"]), [r["A"], r["B"], r["C"], r["D"]], r["answer"],
136
+ "最后一行只输出答案字母,格式严格为: ANSWER: <字母>")
137
+ for rid, r in (rows[i] for i in _shuffled(len(rows), n, seed))]
138
+
139
+ if task == "arc":
140
+ ds = load_dataset("allenai/ai2_arc", "ARC-Challenge", split="test")
141
+ out = []
142
+ for i in _shuffled(len(ds), n, seed):
143
+ r = ds[i]
144
+ labels = list(r["choices"]["label"])
145
+ texts = list(r["choices"]["text"])
146
+ gold = r["answerKey"].strip()
147
+ if gold not in labels:
148
+ continue
149
+ body = "\n".join(f"{lab}. {t}" for lab, t in zip(labels, texts))
150
+ out.append({
151
+ "id": f"arc-{r['id']}", "kind": "mc", "gold": gold,
152
+ "prompt": f"{r['question'].strip()}\n{body}\n\n"
153
+ "Answer with a single letter on the last line, "
154
+ "formatted exactly as: ANSWER: <letter>",
155
+ })
156
+ return out
157
+
158
+ if task == "truthfulqa":
159
+ ds = load_dataset("truthfulqa/truthful_qa", "multiple_choice", split="validation")
160
+ out = []
161
+ for i in _shuffled(len(ds), n, seed):
162
+ r = ds[i]
163
+ mc1 = r["mc1_targets"]
164
+ choices = list(mc1["choices"])
165
+ labels = list(mc1["labels"])
166
+ if 1 not in labels or len(choices) > len(MC_LETTERS_LONG):
167
+ continue
168
+ gold_idx = labels.index(1)
169
+ # 固定顺序打散,但用同一 seed+题号保证两模型一致
170
+ order = list(range(len(choices)))
171
+ Random(seed * 1000 + i).shuffle(order)
172
+ shuffled = [choices[j] for j in order]
173
+ gold_letter = MC_LETTERS_LONG[order.index(gold_idx)]
174
+ body = "\n".join(f"{MC_LETTERS_LONG[j]}. {c}" for j, c in enumerate(shuffled))
175
+ out.append({
176
+ "id": f"tqa-{i}", "kind": "mc", "gold": gold_letter,
177
+ "prompt": f"{r['question'].strip()}\n{body}\n\n"
178
+ "Pick the single most truthful answer. Output the letter on the "
179
+ "last line, formatted exactly as: ANSWER: <letter>",
180
+ })
181
+ return out
182
+
183
+ if task == "gsm8k":
184
+ ds = load_dataset("openai/gsm8k", "main", split="test")
185
+ out = []
186
+ for i in _shuffled(len(ds), n, seed):
187
+ r = ds[i]
188
+ gold = r["answer"].split("####")[-1].strip().replace(",", "")
189
+ out.append({
190
+ "id": f"gsm8k-{i}", "kind": "num", "gold": gold,
191
+ "prompt": r["question"].strip()
192
+ + "\n\nSolve it. Put the final numeric answer on the last line, "
193
+ "formatted exactly as: ANSWER: <number>",
194
+ })
195
+ return out
196
+
197
+ if task == "math500":
198
+ ds = load_dataset("HuggingFaceH4/MATH-500", split="test")
199
+ out = []
200
+ for i in _shuffled(len(ds), n, seed):
201
+ r = ds[i]
202
+ out.append({
203
+ "id": f"math-{r.get('unique_id', i)}", "kind": "num",
204
+ "gold": str(r["answer"]).strip(),
205
+ "prompt": r["problem"].strip()
206
+ + "\n\nSolve it. Put the final answer on the last line, "
207
+ "formatted exactly as: ANSWER: <answer>",
208
+ })
209
+ return out
210
+
211
+ if task == "bbh":
212
+ base = os.path.expanduser("~/.cache/huggingface/datasets/lukaemon___bbh")
213
+ cfgs = sorted(d for d in (os.listdir(base) if os.path.isdir(base) else [])
214
+ if os.path.isdir(os.path.join(base, d)))
215
+ rows = []
216
+ for cfg in cfgs:
217
+ try:
218
+ ds = load_dataset("lukaemon/bbh", cfg, split="test")
219
+ except Exception:
220
+ continue
221
+ for k in range(len(ds)):
222
+ rows.append((f"bbh-{cfg}-{k}", ds[k]))
223
+ return [{
224
+ "id": rid, "kind": "exact", "gold": str(r["target"]).strip(),
225
+ "prompt": str(r["input"]).strip()
226
+ + "\n\nThink it through, then put the final answer on the last line, "
227
+ "formatted exactly as: ANSWER: <answer>",
228
+ } for rid, r in (rows[i] for i in _shuffled(len(rows), n, seed))]
229
+
230
+ if task == "humaneval":
231
+ ds = load_dataset("openai/openai_humaneval", split="test")
232
+ idx = list(range(len(ds))) if n >= len(ds) else _shuffled(len(ds), n, seed)
233
+ out = []
234
+ for i in idx:
235
+ r = ds[i]
236
+ out.append({
237
+ "id": r["task_id"], "kind": "code",
238
+ "gold": {"test": r["test"], "entry_point": r["entry_point"]},
239
+ "prompt": "Complete the following Python function. Output the COMPLETE "
240
+ "function (including the signature) inside a single ```python "
241
+ "code block. No explanation after the code block.\n\n"
242
+ f"```python\n{r['prompt']}```",
243
+ })
244
+ return out
245
+
246
+ if task == "ifeval":
247
+ ds = load_dataset("HuggingFaceH4/ifeval", split="train")
248
+ return [{
249
+ "id": f"ifeval-{i}", "kind": "ifeval",
250
+ "gold": {"ids": list(ds[i]["instruction_id_list"]), "kwargs": ds[i]["kwargs"]},
251
+ "prompt": ds[i]["prompt"],
252
+ } for i in _shuffled(len(ds), n, seed)]
253
+
254
+ raise ValueError(task)
255
+
256
+
257
+ # ---------------------------------------------------------------------- 判分
258
+
259
+ def _tail_answer(text):
260
+ """取 'ANSWER: xxx' 之后的内容;没有就返回全文尾部。"""
261
+ m = re.findall(r"ANSWER\s*[::]\s*(.+)", text or "", re.I)
262
+ if m:
263
+ return m[-1].strip()
264
+ return (text or "").strip()
265
+
266
+
267
+ def score_mc(text, gold, hi=None):
268
+ """gold 是单个字母;匹配范围优先用题目自带的 hi(选项数决定),没有才按 gold 自适应。"""
269
+ if not hi:
270
+ hi = "P" if gold.upper() > "E" else "E"
271
+ hi = hi.upper()
272
+ pat_w = rf"\b([A-{hi}])\b"
273
+ pat_b = rf"([A-{hi}])"
274
+ tail = _tail_answer(text)
275
+ m = re.findall(pat_w, tail.upper()) or re.findall(pat_b, tail.upper())
276
+ if m:
277
+ return m[0] == gold
278
+ m2 = re.findall(pat_w, (text or "").upper())
279
+ return bool(m2) and m2[-1] == gold
280
+
281
+
282
+ def _norm_num(s):
283
+ s = str(s).replace(",", "").replace("$", "").replace("\\!", "").strip()
284
+ s = re.sub(r"\\(?:text|mbox|mathrm)\{([^}]*)\}", r"\1", s)
285
+ s = s.replace("\\%", "").replace("%", "").replace("^\\circ", "").replace("\\circ", "")
286
+ s = re.sub(r"\\left|\\right", "", s)
287
+ s = s.strip().rstrip(".").strip()
288
+ if s.startswith("\\boxed{") and s.endswith("}"):
289
+ s = s[7:-1].strip()
290
+ return s
291
+
292
+
293
+ def score_num(text, gold):
294
+ tail = _tail_answer(text)
295
+ g = _norm_num(gold)
296
+ cand = _norm_num(tail)
297
+ if cand == g:
298
+ return True
299
+ # 数值等价
300
+ try:
301
+ if abs(float(cand) - float(g)) < 1e-6:
302
+ return True
303
+ except ValueError:
304
+ pass
305
+ # 从尾部抓最后一个数字
306
+ nums = re.findall(r"-?\d+(?:\.\d+)?(?:/\d+)?", cand.replace(" ", ""))
307
+ if nums:
308
+ last = nums[-1]
309
+ try:
310
+ lv = eval(last) if "/" in last else float(last) # noqa: S307 - 仅数字/分数
311
+ gv = eval(g) if "/" in g and re.fullmatch(r"-?\d+/\d+", g) else float(g)
312
+ if abs(lv - gv) < 1e-6:
313
+ return True
314
+ except Exception:
315
+ pass
316
+ # LaTeX 片段直接比对(去空格)
317
+ return cand.replace(" ", "") == g.replace(" ", "")
318
+
319
+
320
+ def score_exact(text, gold):
321
+ tail = _tail_answer(text).strip()
322
+ g = str(gold).strip()
323
+ if tail.lower() == g.lower():
324
+ return True
325
+ tail_clean = tail.strip("().,'\"[]{} ").lower()
326
+ g_clean = g.strip("().,'\"[]{} ").lower()
327
+ if tail_clean == g_clean:
328
+ return True
329
+ # BBH 的 (A)/(B) 风格
330
+ m = re.findall(r"\(([A-Z])\)", tail.upper())
331
+ gm = re.findall(r"\(([A-Z])\)", g.upper())
332
+ if m and gm:
333
+ return m[0] == gm[0]
334
+ return False
335
+
336
+
337
+ def _extract_code(text):
338
+ blocks = re.findall(r"```(?:python)?\s*\n(.*?)```", text or "", re.S)
339
+ if blocks:
340
+ return max(blocks, key=len)
341
+ return text or ""
342
+
343
+
344
+ def score_code(text, gold, timeout=12):
345
+ code = _extract_code(text)
346
+ if not code.strip():
347
+ return False
348
+ program = (
349
+ "import math, re, sys, itertools, collections, heapq, functools, string\n"
350
+ f"{code}\n\n{gold['test']}\n\ncheck({gold['entry_point']})\n"
351
+ )
352
+ with tempfile.NamedTemporaryFile("w", suffix=".py", delete=False, encoding="utf-8") as fh:
353
+ fh.write(program)
354
+ path = fh.name
355
+ try:
356
+ r = subprocess.run([sys.executable, path], capture_output=True,
357
+ timeout=timeout, text=True)
358
+ return r.returncode == 0
359
+ except Exception:
360
+ return False
361
+ finally:
362
+ try:
363
+ os.unlink(path)
364
+ except OSError:
365
+ pass
366
+
367
+
368
+ # --- IFEval: 实现常见验证器,未覆��的 instruction 记为 skipped(不计分母) ---
369
+
370
+ def _words(t):
371
+ return re.findall(r"\b[\w']+\b", t or "")
372
+
373
+
374
+ def _sentences(t):
375
+ return [s for s in re.split(r"(?<=[.!?。!?])\s+", (t or "").strip()) if s.strip()]
376
+
377
+
378
+ def _check_one_instruction(iid, kw, resp):
379
+ """返回 True/False/None(None = 未实现,跳过)。"""
380
+ kw = kw or {}
381
+ r = resp or ""
382
+ low = r.lower()
383
+
384
+ if iid == "keywords:existence":
385
+ return all(str(k).lower() in low for k in (kw.get("keywords") or []))
386
+ if iid == "keywords:frequency":
387
+ k = str(kw.get("keyword", "")).lower()
388
+ n = kw.get("frequency")
389
+ rel = kw.get("relation", "at least")
390
+ if not k or n is None:
391
+ return None
392
+ c = low.count(k)
393
+ return c >= n if rel == "at least" else c <= n
394
+ if iid == "keywords:forbidden_words":
395
+ return not any(str(k).lower() in low for k in (kw.get("forbidden_words") or []))
396
+ if iid == "keywords:letter_frequency":
397
+ letter = str(kw.get("letter", "")).lower()
398
+ n = kw.get("let_frequency")
399
+ rel = kw.get("let_relation", "at least")
400
+ if not letter or n is None:
401
+ return None
402
+ c = low.count(letter)
403
+ return c >= n if rel == "at least" else c <= n
404
+
405
+ if iid == "length_constraints:number_words":
406
+ n, rel = kw.get("num_words"), kw.get("relation", "at least")
407
+ if n is None:
408
+ return None
409
+ c = len(_words(r))
410
+ return c >= n if rel == "at least" else c <= n
411
+ if iid == "length_constraints:number_sentences":
412
+ n, rel = kw.get("num_sentences"), kw.get("relation", "at least")
413
+ if n is None:
414
+ return None
415
+ c = len(_sentences(r))
416
+ return c >= n if rel == "at least" else c <= n
417
+ if iid == "length_constraints:number_paragraphs":
418
+ n = kw.get("num_paragraphs")
419
+ if n is None:
420
+ return None
421
+ return len([p for p in re.split(r"\n\s*\*\*\*\s*\n|\n\n+", r.strip()) if p.strip()]) == n
422
+ if iid == "length_constraints:nth_paragraph_first_word":
423
+ n, idx, fw = kw.get("num_paragraphs"), kw.get("nth_paragraph"), kw.get("first_word")
424
+ if None in (n, idx, fw):
425
+ return None
426
+ paras = [p for p in re.split(r"\n\n+", r.strip()) if p.strip()]
427
+ if len(paras) < idx:
428
+ return False
429
+ first = _words(paras[idx - 1])
430
+ return bool(first) and first[0].lower() == str(fw).lower()
431
+
432
+ if iid == "detectable_format:number_bullet_lists":
433
+ n = kw.get("num_bullets")
434
+ if n is None:
435
+ return None
436
+ return len(re.findall(r"^\s*[\*\-]\s+", r, re.M)) == n
437
+ if iid == "detectable_format:json_format":
438
+ try:
439
+ json.loads(re.sub(r"^```(?:json)?|```$", "", r.strip(), flags=re.M).strip())
440
+ return True
441
+ except Exception:
442
+ return False
443
+ if iid == "detectable_format:title":
444
+ return bool(re.search(r"<<[^>]+>>", r))
445
+ if iid == "detectable_format:constrained_response":
446
+ return any(o in r for o in ("My answer is yes.", "My answer is no.",
447
+ "My answer is maybe."))
448
+ if iid == "detectable_format:number_highlighted_sections":
449
+ n = kw.get("num_highlights")
450
+ if n is None:
451
+ return None
452
+ return len(re.findall(r"\*[^*\n]+\*", r)) >= n
453
+ if iid == "detectable_format:multiple_sections":
454
+ spl, n = kw.get("section_spliter"), kw.get("num_sections")
455
+ if not spl or n is None:
456
+ return None
457
+ return len(re.findall(re.escape(str(spl)), r)) >= n
458
+
459
+ if iid == "change_case:english_lowercase":
460
+ return r == r.lower()
461
+ if iid == "change_case:english_capital":
462
+ return r == r.upper()
463
+ if iid == "change_case:capital_word_frequency":
464
+ n, rel = kw.get("capital_frequency"), kw.get("capital_relation", "at least")
465
+ if n is None:
466
+ return None
467
+ c = len([w for w in _words(r) if w.isupper() and len(w) > 1])
468
+ return c >= n if rel == "at least" else c <= n
469
+
470
+ if iid == "startend:end_checker":
471
+ end = str(kw.get("end_phrase", "")).strip()
472
+ return bool(end) and r.strip().endswith(end)
473
+ if iid == "startend:quotation":
474
+ s = r.strip()
475
+ return s.startswith('"') and s.endswith('"')
476
+
477
+ if iid == "punctuation:no_comma":
478
+ return "," not in r and "," not in r
479
+
480
+ if iid == "detectable_content:number_placeholders":
481
+ n = kw.get("num_placeholders")
482
+ if n is None:
483
+ return None
484
+ return len(re.findall(r"\[[^\]]+\]", r)) >= n
485
+ if iid == "detectable_content:postscript":
486
+ marker = str(kw.get("postscript_marker", "P.S."))
487
+ return marker.lower() in low
488
+
489
+ if iid == "combination:two_responses":
490
+ return "******" in r
491
+ if iid == "combination:repeat_prompt":
492
+ pr = str(kw.get("prompt_to_repeat", "")).strip()
493
+ return bool(pr) and r.strip().lower().startswith(pr.lower()[:60])
494
+
495
+ if iid == "language:response_language":
496
+ lang = str(kw.get("language", "")).lower()
497
+ if lang in ("zh", "chinese"):
498
+ return bool(re.search(r"[\u4e00-\u9fff]", r))
499
+ if lang in ("en", "english"):
500
+ return not re.search(r"[\u4e00-\u9fff]", r)
501
+ return None
502
+
503
+ return None
504
+
505
+
506
+ def score_ifeval(text, gold):
507
+ """返回 (strict_ok, checked, passed)。checked=0 表示全部未实现。"""
508
+ ids = gold.get("ids") or []
509
+ kwargs_list = gold.get("kwargs") or []
510
+ results = []
511
+ for i, iid in enumerate(ids):
512
+ kw = kwargs_list[i] if i < len(kwargs_list) else {}
513
+ if isinstance(kw, str):
514
+ try:
515
+ kw = json.loads(kw)
516
+ except Exception:
517
+ kw = {}
518
+ res = _check_one_instruction(iid, kw, text)
519
+ if res is not None:
520
+ results.append(bool(res))
521
+ if not results:
522
+ return None, 0, 0
523
+ return all(results), len(results), sum(results)
524
+
525
+
526
+ # ---------------------------------------------------------------------- 调用
527
+
528
+ def call(session, args, item, spec):
529
+ payload = {
530
+ "model": args.model,
531
+ "messages": [{"role": "user", "content": item["prompt"]}],
532
+ "temperature": args.temperature,
533
+ "top_p": args.top_p,
534
+ "max_tokens": args.max_tokens_override or spec["max_tokens"],
535
+ "seed": args.seed,
536
+ }
537
+ if args.thinking:
538
+ payload["chat_template_kwargs"] = {"enable_thinking": True}
539
+ else:
540
+ payload["chat_template_kwargs"] = {"enable_thinking": False}
541
+ last = None
542
+ for attempt in range(args.retries):
543
+ try:
544
+ r = session.post(f"{args.base_url.rstrip('/')}/v1/chat/completions",
545
+ json=payload, timeout=args.timeout)
546
+ if r.status_code == 400 and "chat_template_kwargs" in payload:
547
+ payload.pop("chat_template_kwargs")
548
+ continue
549
+ r.raise_for_status()
550
+ d = r.json()
551
+ msg = d["choices"][0]["message"]
552
+ return (msg.get("content") or "",
553
+ msg.get("reasoning_content") or "",
554
+ d.get("usage", {}), None)
555
+ except Exception as exc: # noqa: BLE001
556
+ last = f"{type(exc).__name__}: {str(exc)[:160]}"
557
+ time.sleep(min(2.0 * (attempt + 1), 8))
558
+ return "", "", {}, last
559
+
560
+
561
+ def _pct(xs, q):
562
+ """分位数。None 一律剔除;空集返回 None,不返回 0 —— 0 会被误读成「真的是 0」。"""
563
+ v = sorted(x for x in xs if x is not None)
564
+ if not v:
565
+ return None
566
+ i = min(len(v) - 1, int(round((q / 100.0) * (len(v) - 1))))
567
+ return v[i]
568
+
569
+
570
+ def run_task(args, task):
571
+ spec = TASK_SPEC[task]
572
+ n = args.n_override or spec["n"]
573
+ items = load_items(task, n, args.seed)
574
+ session = requests.Session()
575
+ session.headers.update({"Connection": "keep-alive"})
576
+ results = [None] * len(items)
577
+ ifeval_acc = {"checked": 0, "passed": 0}
578
+
579
+ def work(k):
580
+ item = items[k]
581
+ content, reasoning, usage, err = call(session, args, item, spec)
582
+ kind = item["kind"]
583
+ detail = {}
584
+ if kind == "mc":
585
+ ok = score_mc(content, item["gold"], item.get("hi"))
586
+ elif kind == "num":
587
+ ok = score_num(content, item["gold"])
588
+ elif kind == "exact":
589
+ ok = score_exact(content, item["gold"])
590
+ elif kind == "code":
591
+ ok = score_code(content, item["gold"])
592
+ elif kind == "ifeval":
593
+ strict, checked, passed = score_ifeval(content, item["gold"])
594
+ ok = bool(strict) if strict is not None else False
595
+ detail = {"checked": checked, "passed": passed, "skipped": strict is None}
596
+ ifeval_acc["checked"] += checked
597
+ ifeval_acc["passed"] += passed
598
+ else:
599
+ ok = False
600
+ ctoks = usage.get("completion_tokens")
601
+ results[k] = {
602
+ "id": item["id"],
603
+ "ok": bool(ok),
604
+ "error": err,
605
+ "gold": item["gold"] if kind != "code" else item["gold"]["entry_point"],
606
+ "completion_tokens": ctoks,
607
+ "reasoning_chars": len(reasoning),
608
+ "empty": not bool(content.strip()),
609
+ "finish_reason": usage.get("finish_reason"),
610
+ "content_mode": usage.get("content_mode"),
611
+ "length_limited": usage.get("finish_reason")=="length",
612
+ # 打满 max_tokens 且正文为空 => 思考未收尾被截断,答案根本没写出来
613
+ "truncated": bool(ctoks and ctoks >= (args.max_tokens_override or spec["max_tokens"]) - 8
614
+ and not (content or "").strip()),
615
+ "reply_tail": (content or "").strip()[-200:],
616
+ **detail,
617
+ }
618
+
619
+ t0 = time.time()
620
+ with ThreadPoolExecutor(max_workers=args.concurrency) as pool:
621
+ list(pool.map(work, range(len(items))))
622
+ elapsed = time.time() - t0
623
+
624
+ valid = [r for r in results if r]
625
+ hits = sum(1 for r in valid if r["ok"])
626
+ errs = sum(1 for r in valid if r["error"])
627
+ trunc = sum(1 for r in valid if r.get("truncated"))
628
+ gen_tokens = sum(r["completion_tokens"] or 0 for r in valid)
629
+ scored = [r for r in valid if not r.get("truncated")]
630
+ out = {
631
+ "task": task,
632
+ "n": len(valid),
633
+ "hits": hits,
634
+ "accuracy_pct": round(100.0 * hits / len(valid), 2) if valid else 0.0,
635
+ # 排除思考截断题后的准确率(截断是采样预算问题,不是能力问题)
636
+ "accuracy_ex_trunc_pct": (round(100.0 * sum(1 for r in scored if r["ok"]) / len(scored), 2)
637
+ if scored else None),
638
+ "truncated": trunc,
639
+ # 2026-08-22 加:长度分布。预算给足之后,「答多长」本身就是要报的数字 ——
640
+ # 它是消融副作用最直观的证据(消融版思考更短这件事,原先只能从截断数反推)。
641
+ "completion_tokens_p50": _pct([r["completion_tokens"] for r in valid], 50),
642
+ "completion_tokens_p90": _pct([r["completion_tokens"] for r in valid], 90),
643
+ "completion_tokens_max": max([r["completion_tokens"] or 0 for r in valid], default=0),
644
+ "reasoning_chars_p50": _pct([r["reasoning_chars"] for r in valid], 50),
645
+ "reasoning_chars_p90": _pct([r["reasoning_chars"] for r in valid], 90),
646
+ "reasoning_leaked": sum(r["reasoning_chars"]>0 for r in valid) if not args.thinking else None,
647
+ "empty": sum(r.get("empty",False) for r in valid),
648
+ "length_limited": sum(r.get("length_limited",False) for r in valid),
649
+ "errors": errs,
650
+ "elapsed_s": round(elapsed, 1),
651
+ "gen_tokens": gen_tokens,
652
+ "tok_per_s": round(gen_tokens / elapsed, 1) if elapsed else 0,
653
+ "details": valid,
654
+ }
655
+ if task == "ifeval":
656
+ out["instruction_level_pct"] = (
657
+ round(100.0 * ifeval_acc["passed"] / ifeval_acc["checked"], 2)
658
+ if ifeval_acc["checked"] else None)
659
+ out["instructions_checked"] = ifeval_acc["checked"]
660
+ return out
661
+
662
+
663
+ def main():
664
+ p = argparse.ArgumentParser()
665
+ p.add_argument("--base-url", required=True)
666
+ p.add_argument("--model", required=True)
667
+ p.add_argument("--label", required=True)
668
+ p.add_argument("--tasks", default="all")
669
+ p.add_argument("--seed", type=int, default=20260816)
670
+ p.add_argument("--concurrency", type=int, default=16)
671
+ p.add_argument("--timeout", type=int, default=900)
672
+ p.add_argument("--retries", type=int, default=3)
673
+ p.add_argument("--temperature", type=float, default=0.0)
674
+ p.add_argument("--top-p", type=float, default=1.0)
675
+ p.add_argument("--n-override", type=int, default=0)
676
+ # 2026-08-22 加:全局覆盖每任务的 max_tokens。
677
+ # 起因是那轮固定预算(4096/8192)下截断率高达 34-91 条,Δ 的符号几乎完全跟着截断差走 ——
678
+ # 消融版思考更短、被截断更少,全量分因此更高,那不是变聪明是话变少(交接 §13)。
679
+ # 创始人 2026-08-22 定:要么关思考与别的模型同口径,要么开思考但把预算给足到全部答完。
680
+ p.add_argument("--max-tokens", dest="max_tokens_override", type=int, default=0,
681
+ help="覆盖所有任务的 max_tokens;0=用 TASK_SPEC 的默认值")
682
+ p.add_argument("--no-thinking", dest="thinking", action="store_false")
683
+ p.add_argument("--outdir", default=os.path.expanduser("~/capeval"))
684
+ args = p.parse_args()
685
+
686
+ os.environ.setdefault("HF_HUB_OFFLINE", "1")
687
+ os.makedirs(args.outdir, exist_ok=True)
688
+ tasks = ALL_TASKS if args.tasks == "all" else [t.strip() for t in args.tasks.split(",")]
689
+
690
+ summary = {
691
+ "label": args.label, "model": args.model, "base_url": args.base_url,
692
+ "seed": args.seed, "thinking": args.thinking,
693
+ "started": time.strftime("%F %T"), "tasks": {},
694
+ }
695
+ for task in tasks:
696
+ ckpt = os.path.join(args.outdir, f"{args.label}-{task}.json")
697
+ if os.path.exists(ckpt):
698
+ print(f"[{task}] 已有 checkpoint,跳过", flush=True)
699
+ with open(ckpt, encoding="utf-8") as fh:
700
+ res = json.load(fh)
701
+ else:
702
+ print(f"--- {task} 开始 ---", flush=True)
703
+ try:
704
+ res = run_task(args, task)
705
+ except Exception as exc: # noqa: BLE001
706
+ print(f"[{task}] 整体失败: {type(exc).__name__}: {exc}", flush=True)
707
+ continue
708
+ # 2026-08-22 加的护栏:错误率过高就**不写 checkpoint**。
709
+ # 起因:kill 掉 vLLM 后 harness 仍在跑,150 条请求全部失败,
710
+ # 而它把 acc=0.0 errors=150 当成正常结果写了盘 ——
711
+ # 重启后「已有 checkpoint 就跳过」,那个 0.0% 会一直当成真结果留在表里,
712
+ # 长得和正常结果一模一样。**失败必须失败掉,不能变成一个像样的产物。**
713
+ err_rate = res["errors"] / max(res["n"], 1)
714
+ if err_rate > 0.1:
715
+ print(f"[{task}] ⚠️ 错误率 {err_rate:.0%}({res['errors']}/{res['n']})"
716
+ f"过高,**不写 checkpoint**,本项需重跑", flush=True)
717
+ continue
718
+ with open(ckpt, "w", encoding="utf-8") as fh:
719
+ json.dump(res, fh, ensure_ascii=False, indent=2)
720
+ extra = ""
721
+ if res.get("instruction_level_pct") is not None:
722
+ extra = f" 指令级={res['instruction_level_pct']}%"
723
+ if res.get("truncated"):
724
+ extra += (f" 截断={res['truncated']}"
725
+ f"(排除后={res.get('accuracy_ex_trunc_pct')}%)")
726
+ if res.get("completion_tokens_p50") is not None:
727
+ extra += (f" 输出token p50/p90/max="
728
+ f"{res['completion_tokens_p50']}/{res['completion_tokens_p90']}"
729
+ f"/{res['completion_tokens_max']}")
730
+ print(f"[{task}] {res['hits']}/{res['n']} = {res['accuracy_pct']}% "
731
+ f"errors={res['errors']} {res['elapsed_s']}s "
732
+ f"{res['tok_per_s']}tok/s{extra}", flush=True)
733
+ summary["tasks"][task] = {k: v for k, v in res.items() if k != "details"}
734
+
735
+ summary["finished"] = time.strftime("%F %T")
736
+ spath = os.path.join(args.outdir, f"SUMMARY-{args.label}.json")
737
+ with open(spath, "w", encoding="utf-8") as fh:
738
+ json.dump(summary, fh, ensure_ascii=False, indent=2)
739
+
740
+ print(f"\n==== SUMMARY {args.label} ====")
741
+ for t, r in summary["tasks"].items():
742
+ print(f"{t:>11}: {r['accuracy_pct']:6.2f}% ({r['hits']}/{r['n']}, err={r['errors']})")
743
+ print("summary:", spath)
744
+ return 0
745
+
746
+
747
+ if __name__ == "__main__":
748
+ sys.exit(main())
evaluation-protocol.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Score publisher-protocol content without treating truncated thoughts as answers."""
2
+ def normalize_content(raw, finish_reason):
3
+ raw=(raw or '').lstrip()
4
+ # llama.cpp content-only mode echoes the template's generation prefix.
5
+ # It is protocol framing, not part of the answer (notably for MC letters).
6
+ if raw.startswith('<think>'):
7
+ raw=raw[len('<think>'):].lstrip('\r\n')
8
+ if '</think>' in raw:
9
+ reasoning,_,content=raw.rpartition('</think>')
10
+ return content,reasoning.removeprefix('<think>').strip(),'explicit-close'
11
+ if finish_reason=='length':
12
+ return '',raw,'unclosed-length-limit'
13
+ # Publisher serves without a reasoning parser: completed direct answers
14
+ # without a closing tag are content. Never infer an answer from hidden fields.
15
+ return raw,'','publisher-direct-content'
evaluation-question-indices.json ADDED
The diff for this file is too large to render. See raw diff
 
evaluation-questions-manifest.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "seed": 20260816,
3
+ "sha256": "57ccbc22395b05ac6d13b408727fd821cec91ebb3ad84c01d276ed77b644d71a",
4
+ "tasks": {
5
+ "mmlu": 150,
6
+ "cmmlu": 150,
7
+ "mmlu_pro": 150,
8
+ "ceval": 150,
9
+ "arc": 150,
10
+ "truthfulqa": 150,
11
+ "gsm8k": 100,
12
+ "math500": 100,
13
+ "bbh": 150,
14
+ "humaneval": 164,
15
+ "ifeval": 100
16
+ },
17
+ "total": 1514
18
+ }
evaluation-refusal-items.json ADDED
The diff for this file is too large to render. See raw diff
 
evaluation-runtime-versions.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "vllm": "0.29.0",
3
+ "torch": "2.13.0",
4
+ "transformers": "5.17.0",
5
+ "triton": "3.7.1",
6
+ "llama_cpp": {
7
+ "reported_version": "0.1.2-dev (build 0, commit unknown)",
8
+ "compiler": "GNU 13.3.0 Linux x86_64",
9
+ "sha256": {
10
+ "llama-server": "151ca33e963f9189a7b80ea136f0bc607282611f63947131800478f93f7f7698",
11
+ "libllama-server-impl.so": "55b0d74acb08709488a81b16e115e53946f87ffa5ef36a3e28999c924b1f6fb9",
12
+ "libllama.so": "e0f23a9843348eb2b05d646589a06ef376bb3b4421de862fc01164dc017e480f",
13
+ "libllama-common.so": "0d82c013ad7f009ea6b7b83520a5d4282dcf735dc5029a1005b3b0e5411d99fc",
14
+ "libggml.so": "81320042a7ac223a556e1468c19b9032906a07bc0e11bd376c8a9f33c5f271b8",
15
+ "libggml-base.so": "d6c426af13a8747990370b588f0fb2367e3601683890a24a892d53a1307af065",
16
+ "libggml-cpu.so": "e2172c751f093b7cf86749931d8b8787123310af5c7baab4f0133f8f388078e6",
17
+ "libggml-cuda.so": "0bef149d752c8637782fe53d38a8496bd8dfeb8fcc85dbe461f15bb9a1006c95"
18
+ }
19
+ },
20
+ "local_fa2_fp8kv_sha256": {
21
+ "fa2_fp8kv.so": "9ff7300a21221a3547f777843c097dc2473086e05a97890d5ab1067a40a462e9",
22
+ "fa2_fp8kv_prefill.so": "21ccdb26dc1333fb3f16a3a22b1d1ce7401f0233d518f1b7b6af659ef7de5942"
23
+ }
24
+ }
evaluation.json ADDED
@@ -0,0 +1,625 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "scope": "paired local legacy rubric; thinking enabled, publisher raw-content protocol; not official benchmark reproduction",
3
+ "formats": {
4
+ "w4a16": {
5
+ "n": 1514,
6
+ "hits": [
7
+ 1212,
8
+ 1157
9
+ ],
10
+ "accuracy_pct": [
11
+ 80.05284015852048,
12
+ 76.42007926023778
13
+ ],
14
+ "delta_pp": -3.6327608982826947,
15
+ "paired_95ci_pp": [
16
+ -5.894,
17
+ -1.371
18
+ ],
19
+ "lost": 181,
20
+ "gained": 126,
21
+ "empty": [
22
+ 9,
23
+ 8
24
+ ],
25
+ "reasoning_present": [
26
+ 1186,
27
+ 1007
28
+ ],
29
+ "length_limited": [
30
+ 9,
31
+ 8
32
+ ],
33
+ "valid_empty_gate": false,
34
+ "tasks": [
35
+ {
36
+ "task": "mmlu",
37
+ "n": 150,
38
+ "empty": [
39
+ 0,
40
+ 2
41
+ ],
42
+ "valid_empty_gate": true,
43
+ "hits_original": 126,
44
+ "hits_ablated": 114,
45
+ "delta_pp": -8.0,
46
+ "paired_95ci_pp": [
47
+ -15.065,
48
+ -0.935
49
+ ],
50
+ "lost": 21,
51
+ "gained": 9
52
+ },
53
+ {
54
+ "task": "cmmlu",
55
+ "n": 150,
56
+ "empty": [
57
+ 0,
58
+ 0
59
+ ],
60
+ "valid_empty_gate": true,
61
+ "hits_original": 127,
62
+ "hits_ablated": 113,
63
+ "delta_pp": -9.333333333333334,
64
+ "paired_95ci_pp": [
65
+ -15.848,
66
+ -2.818
67
+ ],
68
+ "lost": 20,
69
+ "gained": 6
70
+ },
71
+ {
72
+ "task": "mmlu_pro",
73
+ "n": 150,
74
+ "empty": [
75
+ 3,
76
+ 1
77
+ ],
78
+ "valid_empty_gate": true,
79
+ "hits_original": 118,
80
+ "hits_ablated": 106,
81
+ "delta_pp": -8.0,
82
+ "paired_95ci_pp": [
83
+ -15.304,
84
+ -0.696
85
+ ],
86
+ "lost": 22,
87
+ "gained": 10
88
+ },
89
+ {
90
+ "task": "ceval",
91
+ "n": 150,
92
+ "empty": [
93
+ 1,
94
+ 1
95
+ ],
96
+ "valid_empty_gate": true,
97
+ "hits_original": 126,
98
+ "hits_ablated": 114,
99
+ "delta_pp": -8.0,
100
+ "paired_95ci_pp": [
101
+ -14.817,
102
+ -1.183
103
+ ],
104
+ "lost": 20,
105
+ "gained": 8
106
+ },
107
+ {
108
+ "task": "arc",
109
+ "n": 150,
110
+ "empty": [
111
+ 0,
112
+ 0
113
+ ],
114
+ "valid_empty_gate": true,
115
+ "hits_original": 121,
116
+ "hits_ablated": 128,
117
+ "delta_pp": 4.666666666666667,
118
+ "paired_95ci_pp": [
119
+ -2.354,
120
+ 11.687
121
+ ],
122
+ "lost": 11,
123
+ "gained": 18
124
+ },
125
+ {
126
+ "task": "truthfulqa",
127
+ "n": 150,
128
+ "empty": [
129
+ 0,
130
+ 0
131
+ ],
132
+ "valid_empty_gate": true,
133
+ "hits_original": 88,
134
+ "hits_ablated": 107,
135
+ "delta_pp": 12.666666666666666,
136
+ "paired_95ci_pp": [
137
+ 3.341,
138
+ 21.992
139
+ ],
140
+ "lost": 17,
141
+ "gained": 36
142
+ },
143
+ {
144
+ "task": "gsm8k",
145
+ "n": 100,
146
+ "empty": [
147
+ 0,
148
+ 0
149
+ ],
150
+ "valid_empty_gate": true,
151
+ "hits_original": 95,
152
+ "hits_ablated": 88,
153
+ "delta_pp": -7.0,
154
+ "paired_95ci_pp": [
155
+ -14.504,
156
+ 0.504
157
+ ],
158
+ "lost": 11,
159
+ "gained": 4
160
+ },
161
+ {
162
+ "task": "math500",
163
+ "n": 100,
164
+ "empty": [
165
+ 0,
166
+ 2
167
+ ],
168
+ "valid_empty_gate": true,
169
+ "hits_original": 75,
170
+ "hits_ablated": 73,
171
+ "delta_pp": -2.0,
172
+ "paired_95ci_pp": [
173
+ -7.558,
174
+ 3.558
175
+ ],
176
+ "lost": 5,
177
+ "gained": 3
178
+ },
179
+ {
180
+ "task": "bbh",
181
+ "n": 150,
182
+ "empty": [
183
+ 0,
184
+ 1
185
+ ],
186
+ "valid_empty_gate": true,
187
+ "hits_original": 113,
188
+ "hits_ablated": 98,
189
+ "delta_pp": -10.0,
190
+ "paired_95ci_pp": [
191
+ -18.028,
192
+ -1.972
193
+ ],
194
+ "lost": 27,
195
+ "gained": 12
196
+ },
197
+ {
198
+ "task": "humaneval",
199
+ "n": 164,
200
+ "empty": [
201
+ 5,
202
+ 1
203
+ ],
204
+ "valid_empty_gate": false,
205
+ "hits_original": 147,
206
+ "hits_ablated": 147,
207
+ "delta_pp": 0.0,
208
+ "paired_95ci_pp": [
209
+ -5.086,
210
+ 5.086
211
+ ],
212
+ "lost": 9,
213
+ "gained": 9
214
+ },
215
+ {
216
+ "task": "ifeval",
217
+ "n": 100,
218
+ "empty": [
219
+ 0,
220
+ 0
221
+ ],
222
+ "valid_empty_gate": true,
223
+ "hits_original": 76,
224
+ "hits_ablated": 69,
225
+ "delta_pp": -7.0,
226
+ "paired_95ci_pp": [
227
+ -17.518,
228
+ 3.518
229
+ ],
230
+ "lost": 18,
231
+ "gained": 11
232
+ }
233
+ ],
234
+ "refusal": {
235
+ "valid": [
236
+ true,
237
+ true
238
+ ],
239
+ "counts": [
240
+ {
241
+ "substring_any": 98,
242
+ "substring_head": 98,
243
+ "heretic33_any": 98,
244
+ "ega26_any": 98,
245
+ "short": 0,
246
+ "empty": 0,
247
+ "empty_but_reasoning": 0,
248
+ "reasoning_leaked": 0,
249
+ "errors": 0
250
+ },
251
+ {
252
+ "substring_any": 2,
253
+ "substring_head": 0,
254
+ "heretic33_any": 69,
255
+ "ega26_any": 55,
256
+ "short": 0,
257
+ "empty": 0,
258
+ "empty_but_reasoning": 0,
259
+ "reasoning_leaked": 0,
260
+ "errors": 0
261
+ }
262
+ ],
263
+ "max_tokens": [
264
+ 2048,
265
+ 2048
266
+ ],
267
+ "budget_hits": [
268
+ 1,
269
+ 9
270
+ ],
271
+ "head_relative_reduction": 1.0,
272
+ "words": [
273
+ {
274
+ "median": 133.0,
275
+ "mean": 193.5,
276
+ "min": 54,
277
+ "max": 861,
278
+ "p10": 81
279
+ },
280
+ {
281
+ "median": 726.0,
282
+ "mean": 716.2,
283
+ "min": 82,
284
+ "max": 1288,
285
+ "p10": 450
286
+ }
287
+ ],
288
+ "heldout84": {
289
+ "n": 84,
290
+ "head_counts": [
291
+ 82,
292
+ 0
293
+ ],
294
+ "any_counts": [
295
+ 82,
296
+ 2
297
+ ]
298
+ }
299
+ }
300
+ },
301
+ "gguf": {
302
+ "n": 1514,
303
+ "hits": [
304
+ 995,
305
+ 1039
306
+ ],
307
+ "accuracy_pct": [
308
+ 65.71994715984148,
309
+ 68.62615587846764
310
+ ],
311
+ "delta_pp": 2.906208718626156,
312
+ "paired_95ci_pp": [
313
+ 0.956,
314
+ 4.856
315
+ ],
316
+ "lost": 92,
317
+ "gained": 136,
318
+ "empty": [
319
+ 4,
320
+ 7
321
+ ],
322
+ "reasoning_present": [
323
+ 741,
324
+ 782
325
+ ],
326
+ "length_limited": [
327
+ 4,
328
+ 7
329
+ ],
330
+ "valid_empty_gate": true,
331
+ "tasks": [
332
+ {
333
+ "task": "mmlu",
334
+ "n": 150,
335
+ "empty": [
336
+ 0,
337
+ 0
338
+ ],
339
+ "valid_empty_gate": true,
340
+ "hits_original": 102,
341
+ "hits_ablated": 102,
342
+ "delta_pp": 0.0,
343
+ "paired_95ci_pp": [
344
+ -6.149,
345
+ 6.149
346
+ ],
347
+ "lost": 11,
348
+ "gained": 11
349
+ },
350
+ {
351
+ "task": "cmmlu",
352
+ "n": 150,
353
+ "empty": [
354
+ 0,
355
+ 0
356
+ ],
357
+ "valid_empty_gate": true,
358
+ "hits_original": 92,
359
+ "hits_ablated": 97,
360
+ "delta_pp": 3.3333333333333335,
361
+ "paired_95ci_pp": [
362
+ -3.707,
363
+ 10.373
364
+ ],
365
+ "lost": 12,
366
+ "gained": 17
367
+ },
368
+ {
369
+ "task": "mmlu_pro",
370
+ "n": 150,
371
+ "empty": [
372
+ 1,
373
+ 1
374
+ ],
375
+ "valid_empty_gate": true,
376
+ "hits_original": 96,
377
+ "hits_ablated": 103,
378
+ "delta_pp": 4.666666666666667,
379
+ "paired_95ci_pp": [
380
+ -2.104,
381
+ 11.438
382
+ ],
383
+ "lost": 10,
384
+ "gained": 17
385
+ },
386
+ {
387
+ "task": "ceval",
388
+ "n": 150,
389
+ "empty": [
390
+ 0,
391
+ 1
392
+ ],
393
+ "valid_empty_gate": true,
394
+ "hits_original": 90,
395
+ "hits_ablated": 105,
396
+ "delta_pp": 10.0,
397
+ "paired_95ci_pp": [
398
+ 3.644,
399
+ 16.356
400
+ ],
401
+ "lost": 5,
402
+ "gained": 20
403
+ },
404
+ {
405
+ "task": "arc",
406
+ "n": 150,
407
+ "empty": [
408
+ 0,
409
+ 0
410
+ ],
411
+ "valid_empty_gate": true,
412
+ "hits_original": 135,
413
+ "hits_ablated": 137,
414
+ "delta_pp": 1.3333333333333333,
415
+ "paired_95ci_pp": [
416
+ -2.807,
417
+ 5.474
418
+ ],
419
+ "lost": 4,
420
+ "gained": 6
421
+ },
422
+ {
423
+ "task": "truthfulqa",
424
+ "n": 150,
425
+ "empty": [
426
+ 0,
427
+ 0
428
+ ],
429
+ "valid_empty_gate": true,
430
+ "hits_original": 91,
431
+ "hits_ablated": 91,
432
+ "delta_pp": 0.0,
433
+ "paired_95ci_pp": [
434
+ -5.244,
435
+ 5.244
436
+ ],
437
+ "lost": 8,
438
+ "gained": 8
439
+ },
440
+ {
441
+ "task": "gsm8k",
442
+ "n": 100,
443
+ "empty": [
444
+ 0,
445
+ 0
446
+ ],
447
+ "valid_empty_gate": true,
448
+ "hits_original": 37,
449
+ "hits_ablated": 47,
450
+ "delta_pp": 10.0,
451
+ "paired_95ci_pp": [
452
+ 1.414,
453
+ 18.586
454
+ ],
455
+ "lost": 5,
456
+ "gained": 15
457
+ },
458
+ {
459
+ "task": "math500",
460
+ "n": 100,
461
+ "empty": [
462
+ 0,
463
+ 1
464
+ ],
465
+ "valid_empty_gate": true,
466
+ "hits_original": 68,
467
+ "hits_ablated": 67,
468
+ "delta_pp": -1.0,
469
+ "paired_95ci_pp": [
470
+ -6.208,
471
+ 4.208
472
+ ],
473
+ "lost": 4,
474
+ "gained": 3
475
+ },
476
+ {
477
+ "task": "bbh",
478
+ "n": 150,
479
+ "empty": [
480
+ 0,
481
+ 1
482
+ ],
483
+ "valid_empty_gate": true,
484
+ "hits_original": 72,
485
+ "hits_ablated": 82,
486
+ "delta_pp": 6.666666666666667,
487
+ "paired_95ci_pp": [
488
+ -0.434,
489
+ 13.767
490
+ ],
491
+ "lost": 10,
492
+ "gained": 20
493
+ },
494
+ {
495
+ "task": "humaneval",
496
+ "n": 164,
497
+ "empty": [
498
+ 1,
499
+ 2
500
+ ],
501
+ "valid_empty_gate": true,
502
+ "hits_original": 149,
503
+ "hits_ablated": 148,
504
+ "delta_pp": -0.6097560975609756,
505
+ "paired_95ci_pp": [
506
+ -5.834,
507
+ 4.615
508
+ ],
509
+ "lost": 10,
510
+ "gained": 9
511
+ },
512
+ {
513
+ "task": "ifeval",
514
+ "n": 100,
515
+ "empty": [
516
+ 2,
517
+ 1
518
+ ],
519
+ "valid_empty_gate": true,
520
+ "hits_original": 63,
521
+ "hits_ablated": 60,
522
+ "delta_pp": -3.0,
523
+ "paired_95ci_pp": [
524
+ -12.429,
525
+ 6.429
526
+ ],
527
+ "lost": 13,
528
+ "gained": 10
529
+ }
530
+ ],
531
+ "refusal": {
532
+ "valid": [
533
+ true,
534
+ true
535
+ ],
536
+ "counts": [
537
+ {
538
+ "substring_any": 99,
539
+ "substring_head": 99,
540
+ "heretic33_any": 99,
541
+ "ega26_any": 99,
542
+ "short": 0,
543
+ "empty": 0,
544
+ "empty_but_reasoning": 0,
545
+ "reasoning_leaked": 0,
546
+ "errors": 0
547
+ },
548
+ {
549
+ "substring_any": 0,
550
+ "substring_head": 0,
551
+ "heretic33_any": 69,
552
+ "ega26_any": 54,
553
+ "short": 0,
554
+ "empty": 0,
555
+ "empty_but_reasoning": 0,
556
+ "reasoning_leaked": 0,
557
+ "errors": 0
558
+ }
559
+ ],
560
+ "max_tokens": [
561
+ 2048,
562
+ 2048
563
+ ],
564
+ "budget_hits": [
565
+ 0,
566
+ 7
567
+ ],
568
+ "head_relative_reduction": 1.0,
569
+ "words": [
570
+ {
571
+ "median": 134.5,
572
+ "mean": 208.6,
573
+ "min": 37,
574
+ "max": 585,
575
+ "p10": 77
576
+ },
577
+ {
578
+ "median": 651.5,
579
+ "mean": 637.9,
580
+ "min": 106,
581
+ "max": 1094,
582
+ "p10": 348
583
+ }
584
+ ],
585
+ "heldout84": {
586
+ "n": 84,
587
+ "head_counts": [
588
+ 83,
589
+ 0
590
+ ],
591
+ "any_counts": [
592
+ 83,
593
+ 0
594
+ ]
595
+ }
596
+ }
597
+ }
598
+ },
599
+ "marker_definitions": {
600
+ "substring_any": "Local 17-marker list, anywhere in lowercased final content",
601
+ "substring_head": "Same 17 markers in the first 30 whitespace-delimited words",
602
+ "heretic33_any": "Heretic 33-marker list with historical normalization, anywhere",
603
+ "ega26_any": "Heretic list with seven topic terms removed, anywhere; these are heuristic counts, not semantic judgments"
604
+ },
605
+ "runtime": {
606
+ "w4a16": {
607
+ "engine": "vLLM 0.29.0 with local FA2/FP8-KV plugin",
608
+ "tensor_parallel": 2,
609
+ "concurrency": 16,
610
+ "context": 65536,
611
+ "kv_dtype": "fp8_e5m2"
612
+ },
613
+ "gguf": {
614
+ "engine": "llama.cpp, see evaluation-runtime-versions.json for binary hashes",
615
+ "split_mode": "layer",
616
+ "tensor_split": [
617
+ 1,
618
+ 1
619
+ ],
620
+ "concurrency": 8,
621
+ "context_per_slot": 40960,
622
+ "kv_dtype": "q8_0"
623
+ }
624
+ }
625
+ }
generation_config.json ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token_id": 248044,
3
+ "do_sample": true,
4
+ "eos_token_id": [
5
+ 248046,
6
+ 248044
7
+ ],
8
+ "pad_token_id": 248044,
9
+ "temperature": 1.0,
10
+ "top_k": 20,
11
+ "top_p": 0.95
12
+ }
model-00001-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e8ad489415055c97ff298df0b67c467ee31e524fc24b71de2127953b1c25b26
3
+ size 2139874528
model-00002-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bb848313319ec57c13e2443d93ac1a74cbf5ac36f0e7aaf87e2ca46e2dff6f15
3
+ size 2133383296
model-00003-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c5d426cf45611e8394d49652bca754521a87ac128b533053c55e86803f4832f4
3
+ size 2133383296
model-00004-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e1b52e31d8750bd904e2a391c40bdf4c855dec56a533f1ac5fe7a9c6c5930e5
3
+ size 2125209320
model-00005-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1bf510cac8427a773f505b4b865fae8d7d9ffcb9b97285e409d9148d356f2e5b
3
+ size 2133362544
model-00006-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a979c4c72a44d3e6f8f4fd39e69f271c8e381fede587e4c4392a3e0b93820ba
3
+ size 2146938240
model-00007-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f26e2f4b123ce7dd01b1c140fdbdba96cd7993a45b55ebf35b86545456e7ddde
3
+ size 800644800
model-00008-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e22bff91476ac31fd41fa6c5b6772286cacb458fcb0b13cd0d401d15504cf42
3
+ size 2542796928
model-00009-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c00c437d08b691129a2c73ad80b5cea833d4640dceb9f00841f505beedab686
3
+ size 10344
model-00010-of-00010.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6866cf8adcccc4cc6a00e74bc025f1a774fb52103b70f2674d0288272951a733
3
+ size 2542796896
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
model_extra_tensors.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:05071fbf80f60d7851fdf2fca8c195e8ee483ecb312106c7639c50d9d7a7a937
3
+ size 312981276
preprocessor_config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": true,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.5,
8
+ 0.5,
9
+ 0.5
10
+ ],
11
+ "image_processor_type": "Qwen2VLImageProcessor",
12
+ "image_std": [
13
+ 0.5,
14
+ 0.5,
15
+ 0.5
16
+ ],
17
+ "merge_size": 2,
18
+ "patch_size": 16,
19
+ "resample": 3,
20
+ "rescale_factor": 0.00392156862745098,
21
+ "size": {
22
+ "longest_edge": 16777216,
23
+ "shortest_edge": 65536
24
+ },
25
+ "temporal_patch_size": 2
26
+ }
processor_config.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "image_processor": {
3
+ "do_convert_rgb": true,
4
+ "do_normalize": true,
5
+ "do_rescale": true,
6
+ "do_resize": true,
7
+ "image_mean": [
8
+ 0.5,
9
+ 0.5,
10
+ 0.5
11
+ ],
12
+ "image_processor_type": "Qwen2VLImageProcessor",
13
+ "image_std": [
14
+ 0.5,
15
+ 0.5,
16
+ 0.5
17
+ ],
18
+ "merge_size": 2,
19
+ "patch_size": 16,
20
+ "resample": 3,
21
+ "rescale_factor": 0.00392156862745098,
22
+ "size": {
23
+ "longest_edge": 16777216,
24
+ "shortest_edge": 65536
25
+ },
26
+ "temporal_patch_size": 2
27
+ },
28
+ "processor_class": "Qwen3VLProcessor",
29
+ "video_processor": {
30
+ "do_convert_rgb": true,
31
+ "do_normalize": true,
32
+ "do_rescale": true,
33
+ "do_resize": true,
34
+ "do_sample_frames": true,
35
+ "fps": 2,
36
+ "image_mean": [
37
+ 0.5,
38
+ 0.5,
39
+ 0.5
40
+ ],
41
+ "image_std": [
42
+ 0.5,
43
+ 0.5,
44
+ 0.5
45
+ ],
46
+ "max_frames": 768,
47
+ "merge_size": 2,
48
+ "min_frames": 4,
49
+ "patch_size": 16,
50
+ "resample": 3,
51
+ "rescale_factor": 0.00392156862745098,
52
+ "return_metadata": false,
53
+ "size": {
54
+ "longest_edge": 16777216,
55
+ "shortest_edge": 65536
56
+ },
57
+ "temporal_patch_size": 2,
58
+ "video_processor_type": "Qwen3VLVideoProcessor"
59
+ }
60
+ }
quantization_config.json ADDED
@@ -0,0 +1,400 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bits": 4,
3
+ "data_type": "int",
4
+ "group_size": 128,
5
+ "sym": true,
6
+ "batch_size": 4,
7
+ "low_gpu_mem_usage": true,
8
+ "nsamples": 256,
9
+ "seqlen": 512,
10
+ "autoround_version": "0.12.3",
11
+ "block_name_to_quantize": "model.language_model.layers",
12
+ "quant_method": "auto-round",
13
+ "packing_format": "auto_round:auto_gptq",
14
+ "extra_config": {
15
+ "model.language_model.layers.0.linear_attn.in_proj_a": {
16
+ "bits": 16,
17
+ "data_type": "fp"
18
+ },
19
+ "model.language_model.layers.0.linear_attn.in_proj_b": {
20
+ "bits": 16,
21
+ "data_type": "fp"
22
+ },
23
+ "model.language_model.layers.1.linear_attn.in_proj_a": {
24
+ "bits": 16,
25
+ "data_type": "fp"
26
+ },
27
+ "model.language_model.layers.1.linear_attn.in_proj_b": {
28
+ "bits": 16,
29
+ "data_type": "fp"
30
+ },
31
+ "model.language_model.layers.2.linear_attn.in_proj_a": {
32
+ "bits": 16,
33
+ "data_type": "fp"
34
+ },
35
+ "model.language_model.layers.2.linear_attn.in_proj_b": {
36
+ "bits": 16,
37
+ "data_type": "fp"
38
+ },
39
+ "model.language_model.layers.4.linear_attn.in_proj_a": {
40
+ "bits": 16,
41
+ "data_type": "fp"
42
+ },
43
+ "model.language_model.layers.4.linear_attn.in_proj_b": {
44
+ "bits": 16,
45
+ "data_type": "fp"
46
+ },
47
+ "model.language_model.layers.5.linear_attn.in_proj_a": {
48
+ "bits": 16,
49
+ "data_type": "fp"
50
+ },
51
+ "model.language_model.layers.5.linear_attn.in_proj_b": {
52
+ "bits": 16,
53
+ "data_type": "fp"
54
+ },
55
+ "model.language_model.layers.6.linear_attn.in_proj_a": {
56
+ "bits": 16,
57
+ "data_type": "fp"
58
+ },
59
+ "model.language_model.layers.6.linear_attn.in_proj_b": {
60
+ "bits": 16,
61
+ "data_type": "fp"
62
+ },
63
+ "model.language_model.layers.8.linear_attn.in_proj_a": {
64
+ "bits": 16,
65
+ "data_type": "fp"
66
+ },
67
+ "model.language_model.layers.8.linear_attn.in_proj_b": {
68
+ "bits": 16,
69
+ "data_type": "fp"
70
+ },
71
+ "model.language_model.layers.9.linear_attn.in_proj_a": {
72
+ "bits": 16,
73
+ "data_type": "fp"
74
+ },
75
+ "model.language_model.layers.9.linear_attn.in_proj_b": {
76
+ "bits": 16,
77
+ "data_type": "fp"
78
+ },
79
+ "model.language_model.layers.10.linear_attn.in_proj_a": {
80
+ "bits": 16,
81
+ "data_type": "fp"
82
+ },
83
+ "model.language_model.layers.10.linear_attn.in_proj_b": {
84
+ "bits": 16,
85
+ "data_type": "fp"
86
+ },
87
+ "model.language_model.layers.12.linear_attn.in_proj_a": {
88
+ "bits": 16,
89
+ "data_type": "fp"
90
+ },
91
+ "model.language_model.layers.12.linear_attn.in_proj_b": {
92
+ "bits": 16,
93
+ "data_type": "fp"
94
+ },
95
+ "model.language_model.layers.13.linear_attn.in_proj_a": {
96
+ "bits": 16,
97
+ "data_type": "fp"
98
+ },
99
+ "model.language_model.layers.13.linear_attn.in_proj_b": {
100
+ "bits": 16,
101
+ "data_type": "fp"
102
+ },
103
+ "model.language_model.layers.14.linear_attn.in_proj_a": {
104
+ "bits": 16,
105
+ "data_type": "fp"
106
+ },
107
+ "model.language_model.layers.14.linear_attn.in_proj_b": {
108
+ "bits": 16,
109
+ "data_type": "fp"
110
+ },
111
+ "model.language_model.layers.16.linear_attn.in_proj_a": {
112
+ "bits": 16,
113
+ "data_type": "fp"
114
+ },
115
+ "model.language_model.layers.16.linear_attn.in_proj_b": {
116
+ "bits": 16,
117
+ "data_type": "fp"
118
+ },
119
+ "model.language_model.layers.17.linear_attn.in_proj_a": {
120
+ "bits": 16,
121
+ "data_type": "fp"
122
+ },
123
+ "model.language_model.layers.17.linear_attn.in_proj_b": {
124
+ "bits": 16,
125
+ "data_type": "fp"
126
+ },
127
+ "model.language_model.layers.18.linear_attn.in_proj_a": {
128
+ "bits": 16,
129
+ "data_type": "fp"
130
+ },
131
+ "model.language_model.layers.18.linear_attn.in_proj_b": {
132
+ "bits": 16,
133
+ "data_type": "fp"
134
+ },
135
+ "model.language_model.layers.20.linear_attn.in_proj_a": {
136
+ "bits": 16,
137
+ "data_type": "fp"
138
+ },
139
+ "model.language_model.layers.20.linear_attn.in_proj_b": {
140
+ "bits": 16,
141
+ "data_type": "fp"
142
+ },
143
+ "model.language_model.layers.21.linear_attn.in_proj_a": {
144
+ "bits": 16,
145
+ "data_type": "fp"
146
+ },
147
+ "model.language_model.layers.21.linear_attn.in_proj_b": {
148
+ "bits": 16,
149
+ "data_type": "fp"
150
+ },
151
+ "model.language_model.layers.22.linear_attn.in_proj_a": {
152
+ "bits": 16,
153
+ "data_type": "fp"
154
+ },
155
+ "model.language_model.layers.22.linear_attn.in_proj_b": {
156
+ "bits": 16,
157
+ "data_type": "fp"
158
+ },
159
+ "model.language_model.layers.24.linear_attn.in_proj_a": {
160
+ "bits": 16,
161
+ "data_type": "fp"
162
+ },
163
+ "model.language_model.layers.24.linear_attn.in_proj_b": {
164
+ "bits": 16,
165
+ "data_type": "fp"
166
+ },
167
+ "model.language_model.layers.25.linear_attn.in_proj_a": {
168
+ "bits": 16,
169
+ "data_type": "fp"
170
+ },
171
+ "model.language_model.layers.25.linear_attn.in_proj_b": {
172
+ "bits": 16,
173
+ "data_type": "fp"
174
+ },
175
+ "model.language_model.layers.26.linear_attn.in_proj_a": {
176
+ "bits": 16,
177
+ "data_type": "fp"
178
+ },
179
+ "model.language_model.layers.26.linear_attn.in_proj_b": {
180
+ "bits": 16,
181
+ "data_type": "fp"
182
+ },
183
+ "model.language_model.layers.28.linear_attn.in_proj_a": {
184
+ "bits": 16,
185
+ "data_type": "fp"
186
+ },
187
+ "model.language_model.layers.28.linear_attn.in_proj_b": {
188
+ "bits": 16,
189
+ "data_type": "fp"
190
+ },
191
+ "model.language_model.layers.29.linear_attn.in_proj_a": {
192
+ "bits": 16,
193
+ "data_type": "fp"
194
+ },
195
+ "model.language_model.layers.29.linear_attn.in_proj_b": {
196
+ "bits": 16,
197
+ "data_type": "fp"
198
+ },
199
+ "model.language_model.layers.30.linear_attn.in_proj_a": {
200
+ "bits": 16,
201
+ "data_type": "fp"
202
+ },
203
+ "model.language_model.layers.30.linear_attn.in_proj_b": {
204
+ "bits": 16,
205
+ "data_type": "fp"
206
+ },
207
+ "model.language_model.layers.32.linear_attn.in_proj_a": {
208
+ "bits": 16,
209
+ "data_type": "fp"
210
+ },
211
+ "model.language_model.layers.32.linear_attn.in_proj_b": {
212
+ "bits": 16,
213
+ "data_type": "fp"
214
+ },
215
+ "model.language_model.layers.33.linear_attn.in_proj_a": {
216
+ "bits": 16,
217
+ "data_type": "fp"
218
+ },
219
+ "model.language_model.layers.33.linear_attn.in_proj_b": {
220
+ "bits": 16,
221
+ "data_type": "fp"
222
+ },
223
+ "model.language_model.layers.34.linear_attn.in_proj_a": {
224
+ "bits": 16,
225
+ "data_type": "fp"
226
+ },
227
+ "model.language_model.layers.34.linear_attn.in_proj_b": {
228
+ "bits": 16,
229
+ "data_type": "fp"
230
+ },
231
+ "model.language_model.layers.36.linear_attn.in_proj_a": {
232
+ "bits": 16,
233
+ "data_type": "fp"
234
+ },
235
+ "model.language_model.layers.36.linear_attn.in_proj_b": {
236
+ "bits": 16,
237
+ "data_type": "fp"
238
+ },
239
+ "model.language_model.layers.37.linear_attn.in_proj_a": {
240
+ "bits": 16,
241
+ "data_type": "fp"
242
+ },
243
+ "model.language_model.layers.37.linear_attn.in_proj_b": {
244
+ "bits": 16,
245
+ "data_type": "fp"
246
+ },
247
+ "model.language_model.layers.38.linear_attn.in_proj_a": {
248
+ "bits": 16,
249
+ "data_type": "fp"
250
+ },
251
+ "model.language_model.layers.38.linear_attn.in_proj_b": {
252
+ "bits": 16,
253
+ "data_type": "fp"
254
+ },
255
+ "model.language_model.layers.40.linear_attn.in_proj_a": {
256
+ "bits": 16,
257
+ "data_type": "fp"
258
+ },
259
+ "model.language_model.layers.40.linear_attn.in_proj_b": {
260
+ "bits": 16,
261
+ "data_type": "fp"
262
+ },
263
+ "model.language_model.layers.41.linear_attn.in_proj_a": {
264
+ "bits": 16,
265
+ "data_type": "fp"
266
+ },
267
+ "model.language_model.layers.41.linear_attn.in_proj_b": {
268
+ "bits": 16,
269
+ "data_type": "fp"
270
+ },
271
+ "model.language_model.layers.42.linear_attn.in_proj_a": {
272
+ "bits": 16,
273
+ "data_type": "fp"
274
+ },
275
+ "model.language_model.layers.42.linear_attn.in_proj_b": {
276
+ "bits": 16,
277
+ "data_type": "fp"
278
+ },
279
+ "model.language_model.layers.44.linear_attn.in_proj_a": {
280
+ "bits": 16,
281
+ "data_type": "fp"
282
+ },
283
+ "model.language_model.layers.44.linear_attn.in_proj_b": {
284
+ "bits": 16,
285
+ "data_type": "fp"
286
+ },
287
+ "model.language_model.layers.45.linear_attn.in_proj_a": {
288
+ "bits": 16,
289
+ "data_type": "fp"
290
+ },
291
+ "model.language_model.layers.45.linear_attn.in_proj_b": {
292
+ "bits": 16,
293
+ "data_type": "fp"
294
+ },
295
+ "model.language_model.layers.46.linear_attn.in_proj_a": {
296
+ "bits": 16,
297
+ "data_type": "fp"
298
+ },
299
+ "model.language_model.layers.46.linear_attn.in_proj_b": {
300
+ "bits": 16,
301
+ "data_type": "fp"
302
+ },
303
+ "model.language_model.layers.48.linear_attn.in_proj_a": {
304
+ "bits": 16,
305
+ "data_type": "fp"
306
+ },
307
+ "model.language_model.layers.48.linear_attn.in_proj_b": {
308
+ "bits": 16,
309
+ "data_type": "fp"
310
+ },
311
+ "model.language_model.layers.49.linear_attn.in_proj_a": {
312
+ "bits": 16,
313
+ "data_type": "fp"
314
+ },
315
+ "model.language_model.layers.49.linear_attn.in_proj_b": {
316
+ "bits": 16,
317
+ "data_type": "fp"
318
+ },
319
+ "model.language_model.layers.50.linear_attn.in_proj_a": {
320
+ "bits": 16,
321
+ "data_type": "fp"
322
+ },
323
+ "model.language_model.layers.50.linear_attn.in_proj_b": {
324
+ "bits": 16,
325
+ "data_type": "fp"
326
+ },
327
+ "model.language_model.layers.52.linear_attn.in_proj_a": {
328
+ "bits": 16,
329
+ "data_type": "fp"
330
+ },
331
+ "model.language_model.layers.52.linear_attn.in_proj_b": {
332
+ "bits": 16,
333
+ "data_type": "fp"
334
+ },
335
+ "model.language_model.layers.53.linear_attn.in_proj_a": {
336
+ "bits": 16,
337
+ "data_type": "fp"
338
+ },
339
+ "model.language_model.layers.53.linear_attn.in_proj_b": {
340
+ "bits": 16,
341
+ "data_type": "fp"
342
+ },
343
+ "model.language_model.layers.54.linear_attn.in_proj_a": {
344
+ "bits": 16,
345
+ "data_type": "fp"
346
+ },
347
+ "model.language_model.layers.54.linear_attn.in_proj_b": {
348
+ "bits": 16,
349
+ "data_type": "fp"
350
+ },
351
+ "model.language_model.layers.56.linear_attn.in_proj_a": {
352
+ "bits": 16,
353
+ "data_type": "fp"
354
+ },
355
+ "model.language_model.layers.56.linear_attn.in_proj_b": {
356
+ "bits": 16,
357
+ "data_type": "fp"
358
+ },
359
+ "model.language_model.layers.57.linear_attn.in_proj_a": {
360
+ "bits": 16,
361
+ "data_type": "fp"
362
+ },
363
+ "model.language_model.layers.57.linear_attn.in_proj_b": {
364
+ "bits": 16,
365
+ "data_type": "fp"
366
+ },
367
+ "model.language_model.layers.58.linear_attn.in_proj_a": {
368
+ "bits": 16,
369
+ "data_type": "fp"
370
+ },
371
+ "model.language_model.layers.58.linear_attn.in_proj_b": {
372
+ "bits": 16,
373
+ "data_type": "fp"
374
+ },
375
+ "model.language_model.layers.60.linear_attn.in_proj_a": {
376
+ "bits": 16,
377
+ "data_type": "fp"
378
+ },
379
+ "model.language_model.layers.60.linear_attn.in_proj_b": {
380
+ "bits": 16,
381
+ "data_type": "fp"
382
+ },
383
+ "model.language_model.layers.61.linear_attn.in_proj_a": {
384
+ "bits": 16,
385
+ "data_type": "fp"
386
+ },
387
+ "model.language_model.layers.61.linear_attn.in_proj_b": {
388
+ "bits": 16,
389
+ "data_type": "fp"
390
+ },
391
+ "model.language_model.layers.62.linear_attn.in_proj_a": {
392
+ "bits": 16,
393
+ "data_type": "fp"
394
+ },
395
+ "model.language_model.layers.62.linear_attn.in_proj_b": {
396
+ "bits": 16,
397
+ "data_type": "fp"
398
+ }
399
+ }
400
+ }
release.json ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "source": "tsinghua-sigs-robot-lab/VeriLoop-E2",
3
+ "revision": "9379d199adcc44acdf836558037163878e3a37ae",
4
+ "variant": "original",
5
+ "format": "w4a16",
6
+ "license": "apache-2.0",
7
+ "quantization": {
8
+ "method": "AutoRound 0.12.3 symmetric INT4 g128",
9
+ "samples": 256,
10
+ "sequence_length": 512,
11
+ "iterations": 200
12
+ },
13
+ "evaluation": {
14
+ "capability_hits": 1212,
15
+ "capability_n": 1514,
16
+ "accuracy_pct": 80.05284015852048,
17
+ "empty": 9,
18
+ "length_limited": 9,
19
+ "refusal_counts": {
20
+ "substring_any": 98,
21
+ "substring_head": 98,
22
+ "heretic33_any": 98,
23
+ "ega26_any": 98,
24
+ "short": 0,
25
+ "empty": 0,
26
+ "empty_but_reasoning": 0,
27
+ "reasoning_leaked": 0,
28
+ "errors": 0
29
+ },
30
+ "refusal_n": 100,
31
+ "refusal_valid": true,
32
+ "refusal_budget_hits": 1
33
+ },
34
+ "weight_files": [
35
+ {
36
+ "path": "LICENSE",
37
+ "size": 11343,
38
+ "sha256": "50cbab8a892c5f2993b8c7351a99182507472def3b1374558308605d99b86b32"
39
+ },
40
+ {
41
+ "path": "chat_template.jinja",
42
+ "size": 17497,
43
+ "sha256": "66526bd9fa7a45be668a86961154097e7ddbd71f831e499c1f751c118951aac2"
44
+ },
45
+ {
46
+ "path": "config.json",
47
+ "size": 16264,
48
+ "sha256": "63dd264f99bc42b8c00fbdc07bb268058136ce4ec0d7b3c5ca2d617c09832ea1"
49
+ },
50
+ {
51
+ "path": "generation_config.json",
52
+ "size": 202,
53
+ "sha256": "e70c136c1b78ddc1fb0905bac8e733a4dc448d4f852a5dd75143fffc70be550e"
54
+ },
55
+ {
56
+ "path": "model-00001-of-00010.safetensors",
57
+ "size": 2139874528,
58
+ "sha256": "6e8ad489415055c97ff298df0b67c467ee31e524fc24b71de2127953b1c25b26"
59
+ },
60
+ {
61
+ "path": "model-00002-of-00010.safetensors",
62
+ "size": 2133383296,
63
+ "sha256": "bb848313319ec57c13e2443d93ac1a74cbf5ac36f0e7aaf87e2ca46e2dff6f15"
64
+ },
65
+ {
66
+ "path": "model-00003-of-00010.safetensors",
67
+ "size": 2133383296,
68
+ "sha256": "c5d426cf45611e8394d49652bca754521a87ac128b533053c55e86803f4832f4"
69
+ },
70
+ {
71
+ "path": "model-00004-of-00010.safetensors",
72
+ "size": 2125209320,
73
+ "sha256": "7e1b52e31d8750bd904e2a391c40bdf4c855dec56a533f1ac5fe7a9c6c5930e5"
74
+ },
75
+ {
76
+ "path": "model-00005-of-00010.safetensors",
77
+ "size": 2133362544,
78
+ "sha256": "1bf510cac8427a773f505b4b865fae8d7d9ffcb9b97285e409d9148d356f2e5b"
79
+ },
80
+ {
81
+ "path": "model-00006-of-00010.safetensors",
82
+ "size": 2146938240,
83
+ "sha256": "2a979c4c72a44d3e6f8f4fd39e69f271c8e381fede587e4c4392a3e0b93820ba"
84
+ },
85
+ {
86
+ "path": "model-00007-of-00010.safetensors",
87
+ "size": 800644800,
88
+ "sha256": "f26e2f4b123ce7dd01b1c140fdbdba96cd7993a45b55ebf35b86545456e7ddde"
89
+ },
90
+ {
91
+ "path": "model-00008-of-00010.safetensors",
92
+ "size": 2542796928,
93
+ "sha256": "1e22bff91476ac31fd41fa6c5b6772286cacb458fcb0b13cd0d401d15504cf42"
94
+ },
95
+ {
96
+ "path": "model-00009-of-00010.safetensors",
97
+ "size": 10344,
98
+ "sha256": "1c00c437d08b691129a2c73ad80b5cea833d4640dceb9f00841f505beedab686"
99
+ },
100
+ {
101
+ "path": "model-00010-of-00010.safetensors",
102
+ "size": 2542796896,
103
+ "sha256": "6866cf8adcccc4cc6a00e74bc025f1a774fb52103b70f2674d0288272951a733"
104
+ },
105
+ {
106
+ "path": "model.safetensors.index.json",
107
+ "size": 196235,
108
+ "sha256": "71c91f3eaf720c1b5ce6e4d95a9e2c00be9378a0df490d75ca429eeb00546e8f"
109
+ },
110
+ {
111
+ "path": "model_extra_tensors.safetensors",
112
+ "size": 312981276,
113
+ "sha256": "05071fbf80f60d7851fdf2fca8c195e8ee483ecb312106c7639c50d9d7a7a937"
114
+ },
115
+ {
116
+ "path": "preprocessor_config.json",
117
+ "size": 443,
118
+ "sha256": "3a159dfec9978a186a72ba085e0ad6a050f3968d8b364218d7bd13f5c89381f2"
119
+ },
120
+ {
121
+ "path": "processor_config.json",
122
+ "size": 1192,
123
+ "sha256": "c5a9103c1eacb9dd3452601ffc3e29734c38aa9e4035b2246844d127c0ddfde8"
124
+ },
125
+ {
126
+ "path": "quantization_config.json",
127
+ "size": 10989,
128
+ "sha256": "f915714bbd9d9c7d75302eab70ccdff7b25c64625ab13675c082e236d17da893"
129
+ },
130
+ {
131
+ "path": "tokenizer.json",
132
+ "size": 19989325,
133
+ "sha256": "06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523"
134
+ },
135
+ {
136
+ "path": "tokenizer_config.json",
137
+ "size": 1164,
138
+ "sha256": "7488550a894dcf741616126e322ea31d66cf9457b59ec5825f4c7efdced421f8"
139
+ }
140
+ ]
141
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523
3
+ size 19989325
tokenizer_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "audio_bos_token": "<|audio_start|>",
4
+ "audio_eos_token": "<|audio_end|>",
5
+ "audio_token": "<|audio_pad|>",
6
+ "backend": "tokenizers",
7
+ "bos_token": null,
8
+ "clean_up_tokenization_spaces": false,
9
+ "eos_token": "<|im_end|>",
10
+ "errors": "replace",
11
+ "image_token": "<|image_pad|>",
12
+ "is_local": true,
13
+ "local_files_only": true,
14
+ "model_max_length": 262144,
15
+ "model_specific_special_tokens": {
16
+ "audio_bos_token": "<|audio_start|>",
17
+ "audio_eos_token": "<|audio_end|>",
18
+ "audio_token": "<|audio_pad|>",
19
+ "image_token": "<|image_pad|>",
20
+ "video_token": "<|video_pad|>",
21
+ "vision_bos_token": "<|vision_start|>",
22
+ "vision_eos_token": "<|vision_end|>"
23
+ },
24
+ "pad_token": "<|endoftext|>",
25
+ "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+",
26
+ "processor_class": "Qwen3VLProcessor",
27
+ "split_special_tokens": false,
28
+ "tokenizer_class": "Qwen2Tokenizer",
29
+ "unk_token": null,
30
+ "video_token": "<|video_pad|>",
31
+ "vision_bos_token": "<|vision_start|>",
32
+ "vision_eos_token": "<|vision_end|>"
33
+ }