abhishekgahlot commited on
Commit
b77b0ff
·
0 Parent(s):

OpenJev Flash 9B v1

Browse files
.gitattributes ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
2
+ assets/distance_from_jev.png filter=lfs diff=lfs merge=lfs -text
3
+ assets/jevbench_families.png filter=lfs diff=lfs merge=lfs -text
4
+ assets/latency.png filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,408 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Attribution-NonCommercial 4.0 International
2
+
3
+ =======================================================================
4
+
5
+ Creative Commons Corporation ("Creative Commons") is not a law firm and
6
+ does not provide legal services or legal advice. Distribution of
7
+ Creative Commons public licenses does not create a lawyer-client or
8
+ other relationship. Creative Commons makes its licenses and related
9
+ information available on an "as-is" basis. Creative Commons gives no
10
+ warranties regarding its licenses, any material licensed under their
11
+ terms and conditions, or any related information. Creative Commons
12
+ disclaims all liability for damages resulting from their use to the
13
+ fullest extent possible.
14
+
15
+ Using Creative Commons Public Licenses
16
+
17
+ Creative Commons public licenses provide a standard set of terms and
18
+ conditions that creators and other rights holders may use to share
19
+ original works of authorship and other material subject to copyright
20
+ and certain other rights specified in the public license below. The
21
+ following considerations are for informational purposes only, are not
22
+ exhaustive, and do not form part of our licenses.
23
+
24
+ Considerations for licensors: Our public licenses are
25
+ intended for use by those authorized to give the public
26
+ permission to use material in ways otherwise restricted by
27
+ copyright and certain other rights. Our licenses are
28
+ irrevocable. Licensors should read and understand the terms
29
+ and conditions of the license they choose before applying it.
30
+ Licensors should also secure all rights necessary before
31
+ applying our licenses so that the public can reuse the
32
+ material as expected. Licensors should clearly mark any
33
+ material not subject to the license. This includes other CC-
34
+ licensed material, or material used under an exception or
35
+ limitation to copyright. More considerations for licensors:
36
+ wiki.creativecommons.org/Considerations_for_licensors
37
+
38
+ Considerations for the public: By using one of our public
39
+ licenses, a licensor grants the public permission to use the
40
+ licensed material under specified terms and conditions. If
41
+ the licensor's permission is not necessary for any reason--for
42
+ example, because of any applicable exception or limitation to
43
+ copyright--then that use is not regulated by the license. Our
44
+ licenses grant only permissions under copyright and certain
45
+ other rights that a licensor has authority to grant. Use of
46
+ the licensed material may still be restricted for other
47
+ reasons, including because others have copyright or other
48
+ rights in the material. A licensor may make special requests,
49
+ such as asking that all changes be marked or described.
50
+ Although not required by our licenses, you are encouraged to
51
+ respect those requests where reasonable. More considerations
52
+ for the public:
53
+ wiki.creativecommons.org/Considerations_for_licensees
54
+
55
+ =======================================================================
56
+
57
+ Creative Commons Attribution-NonCommercial 4.0 International Public
58
+ License
59
+
60
+ By exercising the Licensed Rights (defined below), You accept and agree
61
+ to be bound by the terms and conditions of this Creative Commons
62
+ Attribution-NonCommercial 4.0 International Public License ("Public
63
+ License"). To the extent this Public License may be interpreted as a
64
+ contract, You are granted the Licensed Rights in consideration of Your
65
+ acceptance of these terms and conditions, and the Licensor grants You
66
+ such rights in consideration of benefits the Licensor receives from
67
+ making the Licensed Material available under these terms and
68
+ conditions.
69
+
70
+
71
+ Section 1 -- Definitions.
72
+
73
+ a. Adapted Material means material subject to Copyright and Similar
74
+ Rights that is derived from or based upon the Licensed Material
75
+ and in which the Licensed Material is translated, altered,
76
+ arranged, transformed, or otherwise modified in a manner requiring
77
+ permission under the Copyright and Similar Rights held by the
78
+ Licensor. For purposes of this Public License, where the Licensed
79
+ Material is a musical work, performance, or sound recording,
80
+ Adapted Material is always produced where the Licensed Material is
81
+ synched in timed relation with a moving image.
82
+
83
+ b. Adapter's License means the license You apply to Your Copyright
84
+ and Similar Rights in Your contributions to Adapted Material in
85
+ accordance with the terms and conditions of this Public License.
86
+
87
+ c. Copyright and Similar Rights means copyright and/or similar rights
88
+ closely related to copyright including, without limitation,
89
+ performance, broadcast, sound recording, and Sui Generis Database
90
+ Rights, without regard to how the rights are labeled or
91
+ categorized. For purposes of this Public License, the rights
92
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
93
+ Rights.
94
+ d. Effective Technological Measures means those measures that, in the
95
+ absence of proper authority, may not be circumvented under laws
96
+ fulfilling obligations under Article 11 of the WIPO Copyright
97
+ Treaty adopted on December 20, 1996, and/or similar international
98
+ agreements.
99
+
100
+ e. Exceptions and Limitations means fair use, fair dealing, and/or
101
+ any other exception or limitation to Copyright and Similar Rights
102
+ that applies to Your use of the Licensed Material.
103
+
104
+ f. Licensed Material means the artistic or literary work, database,
105
+ or other material to which the Licensor applied this Public
106
+ License.
107
+
108
+ g. Licensed Rights means the rights granted to You subject to the
109
+ terms and conditions of this Public License, which are limited to
110
+ all Copyright and Similar Rights that apply to Your use of the
111
+ Licensed Material and that the Licensor has authority to license.
112
+
113
+ h. Licensor means the individual(s) or entity(ies) granting rights
114
+ under this Public License.
115
+
116
+ i. NonCommercial means not primarily intended for or directed towards
117
+ commercial advantage or monetary compensation. For purposes of
118
+ this Public License, the exchange of the Licensed Material for
119
+ other material subject to Copyright and Similar Rights by digital
120
+ file-sharing or similar means is NonCommercial provided there is
121
+ no payment of monetary compensation in connection with the
122
+ exchange.
123
+
124
+ j. Share means to provide material to the public by any means or
125
+ process that requires permission under the Licensed Rights, such
126
+ as reproduction, public display, public performance, distribution,
127
+ dissemination, communication, or importation, and to make material
128
+ available to the public including in ways that members of the
129
+ public may access the material from a place and at a time
130
+ individually chosen by them.
131
+
132
+ k. Sui Generis Database Rights means rights other than copyright
133
+ resulting from Directive 96/9/EC of the European Parliament and of
134
+ the Council of 11 March 1996 on the legal protection of databases,
135
+ as amended and/or succeeded, as well as other essentially
136
+ equivalent rights anywhere in the world.
137
+
138
+ l. You means the individual or entity exercising the Licensed Rights
139
+ under this Public License. Your has a corresponding meaning.
140
+
141
+
142
+ Section 2 -- Scope.
143
+
144
+ a. License grant.
145
+
146
+ 1. Subject to the terms and conditions of this Public License,
147
+ the Licensor hereby grants You a worldwide, royalty-free,
148
+ non-sublicensable, non-exclusive, irrevocable license to
149
+ exercise the Licensed Rights in the Licensed Material to:
150
+
151
+ a. reproduce and Share the Licensed Material, in whole or
152
+ in part, for NonCommercial purposes only; and
153
+
154
+ b. produce, reproduce, and Share Adapted Material for
155
+ NonCommercial purposes only.
156
+
157
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
158
+ Exceptions and Limitations apply to Your use, this Public
159
+ License does not apply, and You do not need to comply with
160
+ its terms and conditions.
161
+
162
+ 3. Term. The term of this Public License is specified in Section
163
+ 6(a).
164
+
165
+ 4. Media and formats; technical modifications allowed. The
166
+ Licensor authorizes You to exercise the Licensed Rights in
167
+ all media and formats whether now known or hereafter created,
168
+ and to make technical modifications necessary to do so. The
169
+ Licensor waives and/or agrees not to assert any right or
170
+ authority to forbid You from making technical modifications
171
+ necessary to exercise the Licensed Rights, including
172
+ technical modifications necessary to circumvent Effective
173
+ Technological Measures. For purposes of this Public License,
174
+ simply making modifications authorized by this Section 2(a)
175
+ (4) never produces Adapted Material.
176
+
177
+ 5. Downstream recipients.
178
+
179
+ a. Offer from the Licensor -- Licensed Material. Every
180
+ recipient of the Licensed Material automatically
181
+ receives an offer from the Licensor to exercise the
182
+ Licensed Rights under the terms and conditions of this
183
+ Public License.
184
+
185
+ b. No downstream restrictions. You may not offer or impose
186
+ any additional or different terms or conditions on, or
187
+ apply any Effective Technological Measures to, the
188
+ Licensed Material if doing so restricts exercise of the
189
+ Licensed Rights by any recipient of the Licensed
190
+ Material.
191
+
192
+ 6. No endorsement. Nothing in this Public License constitutes or
193
+ may be construed as permission to assert or imply that You
194
+ are, or that Your use of the Licensed Material is, connected
195
+ with, or sponsored, endorsed, or granted official status by,
196
+ the Licensor or others designated to receive attribution as
197
+ provided in Section 3(a)(1)(A)(i).
198
+
199
+ b. Other rights.
200
+
201
+ 1. Moral rights, such as the right of integrity, are not
202
+ licensed under this Public License, nor are publicity,
203
+ privacy, and/or other similar personality rights; however, to
204
+ the extent possible, the Licensor waives and/or agrees not to
205
+ assert any such rights held by the Licensor to the limited
206
+ extent necessary to allow You to exercise the Licensed
207
+ Rights, but not otherwise.
208
+
209
+ 2. Patent and trademark rights are not licensed under this
210
+ Public License.
211
+
212
+ 3. To the extent possible, the Licensor waives any right to
213
+ collect royalties from You for the exercise of the Licensed
214
+ Rights, whether directly or through a collecting society
215
+ under any voluntary or waivable statutory or compulsory
216
+ licensing scheme. In all other cases the Licensor expressly
217
+ reserves any right to collect such royalties, including when
218
+ the Licensed Material is used other than for NonCommercial
219
+ purposes.
220
+
221
+
222
+ Section 3 -- License Conditions.
223
+
224
+ Your exercise of the Licensed Rights is expressly made subject to the
225
+ following conditions.
226
+
227
+ a. Attribution.
228
+
229
+ 1. If You Share the Licensed Material (including in modified
230
+ form), You must:
231
+
232
+ a. retain the following if it is supplied by the Licensor
233
+ with the Licensed Material:
234
+
235
+ i. identification of the creator(s) of the Licensed
236
+ Material and any others designated to receive
237
+ attribution, in any reasonable manner requested by
238
+ the Licensor (including by pseudonym if
239
+ designated);
240
+
241
+ ii. a copyright notice;
242
+
243
+ iii. a notice that refers to this Public License;
244
+
245
+ iv. a notice that refers to the disclaimer of
246
+ warranties;
247
+
248
+ v. a URI or hyperlink to the Licensed Material to the
249
+ extent reasonably practicable;
250
+
251
+ b. indicate if You modified the Licensed Material and
252
+ retain an indication of any previous modifications; and
253
+
254
+ c. indicate the Licensed Material is licensed under this
255
+ Public License, and include the text of, or the URI or
256
+ hyperlink to, this Public License.
257
+
258
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
259
+ reasonable manner based on the medium, means, and context in
260
+ which You Share the Licensed Material. For example, it may be
261
+ reasonable to satisfy the conditions by providing a URI or
262
+ hyperlink to a resource that includes the required
263
+ information.
264
+
265
+ 3. If requested by the Licensor, You must remove any of the
266
+ information required by Section 3(a)(1)(A) to the extent
267
+ reasonably practicable.
268
+
269
+ 4. If You Share Adapted Material You produce, the Adapter's
270
+ License You apply must not prevent recipients of the Adapted
271
+ Material from complying with this Public License.
272
+
273
+
274
+ Section 4 -- Sui Generis Database Rights.
275
+
276
+ Where the Licensed Rights include Sui Generis Database Rights that
277
+ apply to Your use of the Licensed Material:
278
+
279
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
280
+ to extract, reuse, reproduce, and Share all or a substantial
281
+ portion of the contents of the database for NonCommercial purposes
282
+ only;
283
+
284
+ b. if You include all or a substantial portion of the database
285
+ contents in a database in which You have Sui Generis Database
286
+ Rights, then the database in which You have Sui Generis Database
287
+ Rights (but not its individual contents) is Adapted Material; and
288
+
289
+ c. You must comply with the conditions in Section 3(a) if You Share
290
+ all or a substantial portion of the contents of the database.
291
+
292
+ For the avoidance of doubt, this Section 4 supplements and does not
293
+ replace Your obligations under this Public License where the Licensed
294
+ Rights include other Copyright and Similar Rights.
295
+
296
+
297
+ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
298
+
299
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
300
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
301
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
302
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
303
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
304
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
305
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
306
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
307
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
308
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
309
+
310
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
311
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
312
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
313
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
314
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
315
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
316
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
317
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
318
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
319
+
320
+ c. The disclaimer of warranties and limitation of liability provided
321
+ above shall be interpreted in a manner that, to the extent
322
+ possible, most closely approximates an absolute disclaimer and
323
+ waiver of all liability.
324
+
325
+
326
+ Section 6 -- Term and Termination.
327
+
328
+ a. This Public License applies for the term of the Copyright and
329
+ Similar Rights licensed here. However, if You fail to comply with
330
+ this Public License, then Your rights under this Public License
331
+ terminate automatically.
332
+
333
+ b. Where Your right to use the Licensed Material has terminated under
334
+ Section 6(a), it reinstates:
335
+
336
+ 1. automatically as of the date the violation is cured, provided
337
+ it is cured within 30 days of Your discovery of the
338
+ violation; or
339
+
340
+ 2. upon express reinstatement by the Licensor.
341
+
342
+ For the avoidance of doubt, this Section 6(b) does not affect any
343
+ right the Licensor may have to seek remedies for Your violations
344
+ of this Public License.
345
+
346
+ c. For the avoidance of doubt, the Licensor may also offer the
347
+ Licensed Material under separate terms or conditions or stop
348
+ distributing the Licensed Material at any time; however, doing so
349
+ will not terminate this Public License.
350
+
351
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
352
+ License.
353
+
354
+
355
+ Section 7 -- Other Terms and Conditions.
356
+
357
+ a. The Licensor shall not be bound by any additional or different
358
+ terms or conditions communicated by You unless expressly agreed.
359
+
360
+ b. Any arrangements, understandings, or agreements regarding the
361
+ Licensed Material not stated herein are separate from and
362
+ independent of the terms and conditions of this Public License.
363
+
364
+
365
+ Section 8 -- Interpretation.
366
+
367
+ a. For the avoidance of doubt, this Public License does not, and
368
+ shall not be interpreted to, reduce, limit, restrict, or impose
369
+ conditions on any use of the Licensed Material that could lawfully
370
+ be made without permission under this Public License.
371
+
372
+ b. To the extent possible, if any provision of this Public License is
373
+ deemed unenforceable, it shall be automatically reformed to the
374
+ minimum extent necessary to make it enforceable. If the provision
375
+ cannot be reformed, it shall be severed from this Public License
376
+ without affecting the enforceability of the remaining terms and
377
+ conditions.
378
+
379
+ c. No term or condition of this Public License will be waived and no
380
+ failure to comply consented to unless expressly agreed to by the
381
+ Licensor.
382
+
383
+ d. Nothing in this Public License constitutes or may be interpreted
384
+ as a limitation upon, or waiver of, any privileges and immunities
385
+ that apply to the Licensor or You, including from the legal
386
+ processes of any jurisdiction or authority.
387
+
388
+ =======================================================================
389
+
390
+ Creative Commons is not a party to its public
391
+ licenses. Notwithstanding, Creative Commons may elect to apply one of
392
+ its public licenses to material it publishes and in those instances
393
+ will be considered the “Licensor.” The text of the Creative Commons
394
+ public licenses is dedicated to the public domain under the CC0 Public
395
+ Domain Dedication. Except for the limited purpose of indicating that
396
+ material is shared under a Creative Commons public license or as
397
+ otherwise permitted by the Creative Commons policies published at
398
+ creativecommons.org/policies, Creative Commons does not authorize the
399
+ use of the trademark "Creative Commons" or any other trademark or logo
400
+ of Creative Commons without its prior written consent including,
401
+ without limitation, in connection with any unauthorized modifications
402
+ to any of its public licenses or any other arrangements,
403
+ understandings, or agreements concerning use of licensed material. For
404
+ the avoidance of doubt, this paragraph does not form part of the
405
+ public licenses.
406
+
407
+ Creative Commons may be contacted at creativecommons.org.
408
+
LICENSE-APACHE-2.0 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.
MANIFEST.json ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "LICENSE": {
3
+ "bytes": 19347,
4
+ "sha256": "41003d4a74749c0220e33dd415042164b5a1093ed401f36277234f772d22d3d0"
5
+ },
6
+ "LICENSE-APACHE-2.0": {
7
+ "bytes": 11544,
8
+ "sha256": "bbedc3fda3305820b977265f01b8619d87570a6739de3a5582c3464840f1e57a"
9
+ },
10
+ "NOTICE": {
11
+ "bytes": 812,
12
+ "sha256": "be14cddf8300ca5548f42160327c1e2d716ec2d085dda6b08944daa8556d2ab1"
13
+ },
14
+ "README.md": {
15
+ "bytes": 8695,
16
+ "sha256": "0481aa444631b4ac9678c27404b367523282bee596f3842178ed1221a3bd1b20"
17
+ },
18
+ "assets/hero_stats.png": {
19
+ "bytes": 71903,
20
+ "sha256": "44436381d98cb9b45b1f3d8f2f4c21e25047eff57941e15d98c7d3a53e4a425b"
21
+ },
22
+ "assets/jevbench_families.png": {
23
+ "bytes": 308200,
24
+ "sha256": "7b78efd3625df1052d65987577e96be626d446e3f9b8e4c11b1f8fb7cca670d3"
25
+ },
26
+ "assets/latency.png": {
27
+ "bytes": 110758,
28
+ "sha256": "a221aeb0271917d517f51ea099aec94c7be6c8692e33fabbd3ed39b0a5ef6401"
29
+ },
30
+ "chat_template.jinja": {
31
+ "bytes": 7756,
32
+ "sha256": "a4aee8afcf2e0711942cf848899be66016f8d14a889ff9ede07bca099c28f715"
33
+ },
34
+ "config.json": {
35
+ "bytes": 2920,
36
+ "sha256": "fde46eed93822bbe8e0300bd69ded4e1d880bf401f35761d9dc3e936586849d5"
37
+ },
38
+ "generation_config.json": {
39
+ "bytes": 116,
40
+ "sha256": "62153eb6c69f2e1f426beaa8002b7186437e949c7588167085df14e10e9c0a73"
41
+ },
42
+ "helper/shim.py": {
43
+ "bytes": 26080,
44
+ "sha256": "81a22f1b1b8912a465059207ef9f60b7c6c16b4de6372305d867efbe38a1987a"
45
+ },
46
+ "helper/shim_mlx.py": {
47
+ "bytes": 6028,
48
+ "sha256": "7c12264a092dd92fd866022712dd58b387a579f91e84cecf0deedc9ca43c08f0"
49
+ },
50
+ "model-00001-of-00004.safetensors": {
51
+ "bytes": 4942706120,
52
+ "sha256": "8e15ecbed01fedeac9c723b786b4c1f83adabf913f80cdca6d489a7e6ca1e039"
53
+ },
54
+ "model-00002-of-00004.safetensors": {
55
+ "bytes": 4987757928,
56
+ "sha256": "75fe5aa1598fb612cf6936f7d5c7e281fb27524123f1b0898d6ab8bb93a37379"
57
+ },
58
+ "model-00003-of-00004.safetensors": {
59
+ "bytes": 4954810240,
60
+ "sha256": "cb33f1a30334bbc0d56b7c26c8d273ce298cf4cb0efa074ed594e1f70a7cf2df"
61
+ },
62
+ "model-00004-of-00004.safetensors": {
63
+ "bytes": 3934446832,
64
+ "sha256": "d8f5bc5a6b1700076e0180d318e1a3c1a0a8cfd5b207d77fd8b787912afe4e8c"
65
+ },
66
+ "model.safetensors.index.json": {
67
+ "bytes": 69253,
68
+ "sha256": "941305ff9f77551e145a6cea976ef456cd5cb208cbece99f168376c752fcf96c"
69
+ },
70
+ "processor_config.json": {
71
+ "bytes": 1220,
72
+ "sha256": "bfbc24af59a3e73a9cd0653b8d4ae758dfaec4e3e6c15dfb1c6c8ee8d5683c85"
73
+ },
74
+ "serve/SERVE.md": {
75
+ "bytes": 4740,
76
+ "sha256": "c3edb1478d36113951dfe18375e3d2841d885128ec55be22f8b1e9cf05018fdf"
77
+ },
78
+ "tokenizer.json": {
79
+ "bytes": 19989325,
80
+ "sha256": "06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523"
81
+ },
82
+ "tokenizer_config.json": {
83
+ "bytes": 1165,
84
+ "sha256": "792fa3f0cb88b111e54ef3134c873531008c4df471d108da17903426e308aa7b"
85
+ },
86
+ "_release": {
87
+ "name": "OpenJev Flash 9B v1",
88
+ "base_model": "Qwen/Qwen3.5-9B",
89
+ "base_revision": "c202236235762e1c871ad0ccb60c8ee5ba337b9a",
90
+ "source_adapter_sha256": "a4a77d576dedc65c7ebfeff1ba927290d3336ae63ad93cef38c773650501a00a",
91
+ "helper_sha256": "81a22f1b1b8912a465059207ef9f60b7c6c16b4de6372305d867efbe38a1987a",
92
+ "calibration": {
93
+ "READOUT_T": 1.07,
94
+ "READOUT_NOUL_T": 1.074766,
95
+ "READOUT_NOUL_BIAS": 0,
96
+ "READOUT_TARGETED": 1,
97
+ "READOUT_INSTR_STYLE": "pyrepr"
98
+ }
99
+ }
100
+ }
NOTICE ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ OpenJev Flash 9B — release v1
2
+
3
+ OpenJev Flash 9B weights: Copyright the OpenJev project, released under CC BY-NC 4.0 (see LICENSE).
4
+
5
+ These weights are a derivative of Qwen/Qwen3.5-9B, revision c202236235762e1c871ad0ccb60c8ee5ba337b9a, licensed under the Apache License, Version 2.0, and were produced by fine-tuning that base and merging the result into its weights. The MLX build at openjev/OpenJev-Flash-9B-MLX is an 8-bit conversion of these weights.
6
+
7
+ Base model licence: https://huggingface.co/Qwen/Qwen3.5-9B/blob/c202236235762e1c871ad0ccb60c8ee5ba337b9a/LICENSE
8
+ The base licence text is included as LICENSE-APACHE-2.0.
9
+
10
+ The files in helper/ and serve/ are released under the Apache License, Version 2.0. The frozen helper is unchanged from OpenJev v1.
11
+
12
+ For a commercial licence, email support@loopai.com.
README.md ADDED
@@ -0,0 +1,151 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nc-4.0
3
+ base_model: Qwen/Qwen3.5-9B
4
+ language:
5
+ - en
6
+ tags:
7
+ - decision-model
8
+ - zero-shot-classification
9
+ - classification
10
+ - calibrated-probabilities
11
+ - vllm
12
+ ---
13
+
14
+ # OpenJev Flash 9B
15
+
16
+ **Typed decisions about text with up to 52 options, answered in one forward pass per question. About 40 ms per decision on one H100, 1.6x faster than OpenJev 27B on the same setup.**
17
+
18
+ **On par with Cloudflare's Clef-Flash and ahead of Kev-9B and Nimble 9B on JevBench.**
19
+
20
+ No free-form text to parse. No chain of thought. No training per task.
21
+
22
+ ![OpenJev Flash 9B in five numbers](assets/hero_stats.png)
23
+
24
+ OpenJev Flash 9B is the small, fast member of the [OpenJev](https://huggingface.co/openjev/openjev) family: an open-weights **decision model** built on [Qwen/Qwen3.5-9B](https://huggingface.co/Qwen/Qwen3.5-9B). You describe the decision in plain words at request time, with your own labels. It answers with a choice, a yes / no probability or a score. It uses the same API and the same helper as OpenJev 27B, so a client written for one works with the other.
25
+
26
+ ```bash
27
+ curl -s http://localhost:3000/v1/systemone -H 'Content-Type: application/json' -d '{
28
+ "model": "openjev-flash-9b",
29
+ "state": "Customer message: I was charged twice for my order last week and nobody has replied.",
30
+ "questions": {
31
+ "route": {"type": "choice", "instructions": "Which team should handle this?",
32
+ "criteria": {"billing": null, "shipping": null, "technical": null}},
33
+ "angry": {"type": "noul", "instructions": "Is the customer angry?"},
34
+ "urgency": {"type": "score", "instructions": "How urgent is this?",
35
+ "criteria": ["can wait", "this week", "today", "right now"]}
36
+ }
37
+ }'
38
+ ```
39
+
40
+ This request asks three questions and gets back three typed answers: a choice and a score with a probability for every option, and a yes / no probability. Each question takes one forward pass (up to 52 options).
41
+
42
+ ## Why use it
43
+
44
+ - **Labels live in the request.** You need no labelled data, no training run and no fixed label set. For a new task, new labels or a new domain, change the JSON, not the model.
45
+ - **Not a chatbot you have to parse.** The answer is read from the scores at the first output position, one score per option. Fixed calibration settings turn those scores into probabilities.
46
+ - **Small and cheap to run.** About 19 GB of 16-bit weights, served in FP8 on one GPU. It takes 40.4 ms per decision on one H100 when requests run one at a time, about 4.6 US cents per 1,000 decisions at $4.09 per GPU-hour. An 8-bit MLX build for Apple silicon is about 9.5 GB.
47
+ - **Same API as OpenJev 27B.** Start with the 9B and move to the 27B where you need the extra accuracy, without changing client code.
48
+
49
+ ## Use cases
50
+
51
+ | job | example decision |
52
+ |---|---|
53
+ | Routing and triage | intent, topic, team, priority |
54
+ | Moderation and safety | toxicity, spam, hate, policy violation |
55
+ | Judging other models | does the response satisfy the request, is it grounded, does it follow the rubric |
56
+ | Documents and ops | apply a written policy to a case, invoice approve / hold / reject, alert severity |
57
+ | Scoring | ordered levels with an expected value and a confidence |
58
+
59
+ ## Results
60
+
61
+ ### JevBench: on par with Clef-Flash, ahead of Kev-9B and Nimble 9B
62
+
63
+ [JevBench](https://github.com/fstandhartinger/jevbench) is the public benchmark for Jev-style decision models. On its 231 public items:
64
+
65
+ | model | correct | accuracy |
66
+ |---|---|---|
67
+ | Clef-Flash (Cloudflare) | 190 of 231 | 82.3% |
68
+ | **OpenJev Flash 9B** | **188 of 231** | **81.4%** |
69
+ | Kev-9B | 183 of 231 | 79.2% |
70
+ | Nimble 9B (Bespoke Labs) | 183 of 231 | 79.2% |
71
+
72
+ OpenJev Flash 9B is on par with Cloudflare's Clef-Flash and ahead of Kev-9B and Nimble 9B. No JevBench item was used to train or tune it.
73
+
74
+ ![JevBench public items by family: OpenJev Flash 9B leads on ambiguous cases (6 of 7) and on judging responses (11 of 17)](assets/jevbench_families.png)
75
+
76
+ Where it stands out: **ambiguous cases** (6 of 7, the others 3 to 4) and **judging whether a response does what was asked** (11 of 17, the others 9 to 10). It gets every easy item, every trap and every routing item right.
77
+
78
+ ### 10,000 text questions
79
+
80
+ The same 10,000 questions from 34 public sources:
81
+
82
+ | model | accuracy |
83
+ |---|---|
84
+ | Jev (hosted API) | 85.4% |
85
+ | OpenJev 27B | 84.1% |
86
+ | **OpenJev Flash 9B** | **79.4%** |
87
+
88
+ ### Speed and cost
89
+
90
+ ![Time and cost per decision on one H100: OpenJev Flash 9B 40.4 ms and 4.6 US cents per 1,000 decisions, OpenJev 27B 65.7 ms and 7.5 cents](assets/latency.png)
91
+
92
+ - **40 ms per decision** on one H100 (FP8), 1.6x faster than OpenJev 27B.
93
+ - **About 4.6 US cents per 1,000 decisions** at $4.09 per GPU-hour.
94
+ - **About a quarter of a second per decision on a Mac** with the MLX build.
95
+
96
+ ## Quick start
97
+
98
+ ```bash
99
+ pip install "vllm==0.29.0" "openai==3.26.0" "httpx==0.28.1"
100
+ hf download openjev/OpenJev-Flash-9B helper/shim.py --local-dir openjev-flash-9b
101
+ ```
102
+
103
+ Terminal 1, the model (downloads the weights on first start):
104
+
105
+ ```bash
106
+ vllm serve openjev/OpenJev-Flash-9B --host 127.0.0.1 --served-model-name qwen --port 8000 \
107
+ --enable-prefix-caching --max-model-len 16384 --gpu-memory-utilization 0.90 \
108
+ --limit-mm-per-prompt '{"image":1}' --trust-remote-code --max-num-seqs 16 \
109
+ --max-logprobs 64 --gdn-prefill-backend triton --quantization fp8
110
+ ```
111
+
112
+ Terminal 2, the decision API in front of it:
113
+
114
+ ```bash
115
+ VLLM=http://127.0.0.1:8000/v1 TOKENIZER=openjev/OpenJev-Flash-9B \
116
+ READOUT_T=1.07 READOUT_NOUL_T=1.074766 READOUT_NOUL_BIAS=0 \
117
+ READOUT_TARGETED=1 READOUT_INSTR_STYLE=pyrepr SHIM_STAGGER=1 \
118
+ python openjev-flash-9b/helper/shim.py --host 127.0.0.1 --port 3000
119
+ ```
120
+
121
+ Then `POST /v1/systemone` as in the example at the top. `curl -s http://127.0.0.1:3000/v1/version` should show `T: 1.07`, `noul_t: 1.074766`, `noul_bias: 0`, targeted readout, `instr_style: "pyrepr"`, and a helper SHA256 beginning `81a22f1b`. The helper's built-in defaults belong to OpenJev 27B, so always pass the five `READOUT_*` settings above. Keep `--served-model-name qwen` and `--max-logprobs 64`, because the helper requests the option scores from that model name. For the full serving guide, the Apple silicon path and the security notes for exposing the port, see [`serve/SERVE.md`](serve/SERVE.md).
122
+
123
+ The request and response shapes follow the hosted Jev API, so you can point a client written for it at your own server.
124
+
125
+ ## Formats
126
+
127
+ | format | repository | for |
128
+ |---|---|---|
129
+ | 16-bit (bfloat16), about 19 GB | `openjev/OpenJev-Flash-9B` | This repository. vLLM on one GPU, served in FP8. |
130
+ | FP8, 11.9 GB | [`openjev/OpenJev-Flash-9B-FP8`](https://huggingface.co/openjev/OpenJev-Flash-9B-FP8) | vLLM with nothing quantized at load time; matches the 16-bit model. |
131
+ | MLX 8-bit, about 9.5 GB | [`openjev/OpenJev-Flash-9B-MLX`](https://huggingface.co/openjev/OpenJev-Flash-9B-MLX) | Apple silicon. The build behind the JevBench numbers above. |
132
+ | MLX 4-bit, about 5.0 GB | [`openjev/OpenJev-Flash-9B-MLX-4bit`](https://huggingface.co/openjev/OpenJev-Flash-9B-MLX-4bit) | Apple silicon with less memory. |
133
+ | GGUF Q4_K_M to Q8_0, 5.6 to 9.5 GB | [`openjev/OpenJev-Flash-9B-GGUF`](https://huggingface.co/openjev/OpenJev-Flash-9B-GGUF) | llama.cpp on laptops, consumer GPUs and CPUs. |
134
+
135
+ ## Request limits
136
+
137
+ - Up to 52 options per question in a single pass; larger option sets use several passes.
138
+ - Prompts up to 16,384 tokens in the documented vLLM setup.
139
+ - Text, JSON and DOM input.
140
+
141
+ ## How it works, in one paragraph
142
+
143
+ A language model computes a score for every possible next token before it writes anything. OpenJev Flash 9B gives each of your options a letter, asks the question, and reads the scores of exactly those letters at the first output position. The server is asked for a single token, never a free-form answer. For questions with up to 52 options, one forward pass produces one number per option, and a fixed calibration step turns those numbers into probabilities you can threshold. The base model was fine-tuned for typed decisions with supervised and teacher-guided fine-tuning. The training recipe and data are not released.
144
+
145
+ ## Licence
146
+
147
+ OpenJev Flash 9B weights are released under **CC BY-NC 4.0**: free for research and other non-commercial use, with attribution. For a commercial licence, email [support@loopai.com](mailto:support@loopai.com).
148
+
149
+ The files in `helper/` and `serve/` are Apache 2.0. OpenJev Flash 9B is built on [Qwen/Qwen3.5-9B](https://huggingface.co/Qwen/Qwen3.5-9B) (revision `c202236235762e1c871ad0ccb60c8ee5ba337b9a`), which is Apache 2.0. The required attribution is in [`NOTICE`](NOTICE) and the Apache text is in `LICENSE-APACHE-2.0`.
150
+
151
+ OpenJev is an independent project, not affiliated with TypeSafe; Jev is their product.
SHA256SUMS ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 41003d4a74749c0220e33dd415042164b5a1093ed401f36277234f772d22d3d0 LICENSE
2
+ bbedc3fda3305820b977265f01b8619d87570a6739de3a5582c3464840f1e57a LICENSE-APACHE-2.0
3
+ e260785e815624f1797a56e76e04af3b3d35710c2685213861f146305f8811d1 MANIFEST.json
4
+ be14cddf8300ca5548f42160327c1e2d716ec2d085dda6b08944daa8556d2ab1 NOTICE
5
+ 0481aa444631b4ac9678c27404b367523282bee596f3842178ed1221a3bd1b20 README.md
6
+ 44436381d98cb9b45b1f3d8f2f4c21e25047eff57941e15d98c7d3a53e4a425b assets/hero_stats.png
7
+ 7b78efd3625df1052d65987577e96be626d446e3f9b8e4c11b1f8fb7cca670d3 assets/jevbench_families.png
8
+ a221aeb0271917d517f51ea099aec94c7be6c8692e33fabbd3ed39b0a5ef6401 assets/latency.png
9
+ a4aee8afcf2e0711942cf848899be66016f8d14a889ff9ede07bca099c28f715 chat_template.jinja
10
+ fde46eed93822bbe8e0300bd69ded4e1d880bf401f35761d9dc3e936586849d5 config.json
11
+ 62153eb6c69f2e1f426beaa8002b7186437e949c7588167085df14e10e9c0a73 generation_config.json
12
+ 81a22f1b1b8912a465059207ef9f60b7c6c16b4de6372305d867efbe38a1987a helper/shim.py
13
+ 7c12264a092dd92fd866022712dd58b387a579f91e84cecf0deedc9ca43c08f0 helper/shim_mlx.py
14
+ 8e15ecbed01fedeac9c723b786b4c1f83adabf913f80cdca6d489a7e6ca1e039 model-00001-of-00004.safetensors
15
+ 75fe5aa1598fb612cf6936f7d5c7e281fb27524123f1b0898d6ab8bb93a37379 model-00002-of-00004.safetensors
16
+ cb33f1a30334bbc0d56b7c26c8d273ce298cf4cb0efa074ed594e1f70a7cf2df model-00003-of-00004.safetensors
17
+ d8f5bc5a6b1700076e0180d318e1a3c1a0a8cfd5b207d77fd8b787912afe4e8c model-00004-of-00004.safetensors
18
+ 941305ff9f77551e145a6cea976ef456cd5cb208cbece99f168376c752fcf96c model.safetensors.index.json
19
+ bfbc24af59a3e73a9cd0653b8d4ae758dfaec4e3e6c15dfb1c6c8ee8d5683c85 processor_config.json
20
+ c3edb1478d36113951dfe18375e3d2841d885128ec55be22f8b1e9cf05018fdf serve/SERVE.md
21
+ 06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523 tokenizer.json
22
+ 792fa3f0cb88b111e54ef3134c873531008c4df471d108da17903426e308aa7b tokenizer_config.json
assets/hero_stats.png ADDED
assets/jevbench_families.png ADDED

Git LFS Details

  • SHA256: 7b78efd3625df1052d65987577e96be626d446e3f9b8e4c11b1f8fb7cca670d3
  • Pointer size: 131 Bytes
  • Size of remote file: 308 kB
assets/latency.png ADDED

Git LFS Details

  • SHA256: a221aeb0271917d517f51ea099aec94c7be6c8692e33fabbd3ed39b0a5ef6401
  • Pointer size: 131 Bytes
  • Size of remote file: 111 kB
chat_template.jinja ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {%- set image_count = namespace(value=0) %}
2
+ {%- set video_count = namespace(value=0) %}
3
+ {%- macro render_content(content, do_vision_count, is_system_content=false) %}
4
+ {%- if content is string %}
5
+ {{- content }}
6
+ {%- elif content is iterable and content is not mapping %}
7
+ {%- for item in content %}
8
+ {%- if 'image' in item or 'image_url' in item or item.type == 'image' %}
9
+ {%- if is_system_content %}
10
+ {{- raise_exception('System message cannot contain images.') }}
11
+ {%- endif %}
12
+ {%- if do_vision_count %}
13
+ {%- set image_count.value = image_count.value + 1 %}
14
+ {%- endif %}
15
+ {%- if add_vision_id %}
16
+ {{- 'Picture ' ~ image_count.value ~ ': ' }}
17
+ {%- endif %}
18
+ {{- '<|vision_start|><|image_pad|><|vision_end|>' }}
19
+ {%- elif 'video' in item or item.type == 'video' %}
20
+ {%- if is_system_content %}
21
+ {{- raise_exception('System message cannot contain videos.') }}
22
+ {%- endif %}
23
+ {%- if do_vision_count %}
24
+ {%- set video_count.value = video_count.value + 1 %}
25
+ {%- endif %}
26
+ {%- if add_vision_id %}
27
+ {{- 'Video ' ~ video_count.value ~ ': ' }}
28
+ {%- endif %}
29
+ {{- '<|vision_start|><|video_pad|><|vision_end|>' }}
30
+ {%- elif 'text' in item %}
31
+ {{- item.text }}
32
+ {%- else %}
33
+ {{- raise_exception('Unexpected item type in content.') }}
34
+ {%- endif %}
35
+ {%- endfor %}
36
+ {%- elif content is none or content is undefined %}
37
+ {{- '' }}
38
+ {%- else %}
39
+ {{- raise_exception('Unexpected content type.') }}
40
+ {%- endif %}
41
+ {%- endmacro %}
42
+ {%- if not messages %}
43
+ {{- raise_exception('No messages provided.') }}
44
+ {%- endif %}
45
+ {%- if tools and tools is iterable and tools is not mapping %}
46
+ {{- '<|im_start|>system\n' }}
47
+ {{- "# Tools\n\nYou have access to the following functions:\n\n<tools>" }}
48
+ {%- for tool in tools %}
49
+ {{- "\n" }}
50
+ {{- tool | tojson }}
51
+ {%- endfor %}
52
+ {{- "\n</tools>" }}
53
+ {{- '\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>' }}
54
+ {%- if messages[0].role == 'system' %}
55
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
56
+ {%- if content %}
57
+ {{- '\n\n' + content }}
58
+ {%- endif %}
59
+ {%- endif %}
60
+ {{- '<|im_end|>\n' }}
61
+ {%- else %}
62
+ {%- if messages[0].role == 'system' %}
63
+ {%- set content = render_content(messages[0].content, false, true)|trim %}
64
+ {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }}
65
+ {%- endif %}
66
+ {%- endif %}
67
+ {%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}
68
+ {%- for message in messages[::-1] %}
69
+ {%- set index = (messages|length - 1) - loop.index0 %}
70
+ {%- if ns.multi_step_tool and message.role == "user" %}
71
+ {%- set content = render_content(message.content, false)|trim %}
72
+ {%- if not(content.startswith('<tool_response>') and content.endswith('</tool_response>')) %}
73
+ {%- set ns.multi_step_tool = false %}
74
+ {%- set ns.last_query_index = index %}
75
+ {%- endif %}
76
+ {%- endif %}
77
+ {%- endfor %}
78
+ {%- if ns.multi_step_tool %}
79
+ {{- raise_exception('No user query found in messages.') }}
80
+ {%- endif %}
81
+ {%- for message in messages %}
82
+ {%- set content = render_content(message.content, true)|trim %}
83
+ {%- if message.role == "system" %}
84
+ {%- if not loop.first %}
85
+ {{- raise_exception('System message must be at the beginning.') }}
86
+ {%- endif %}
87
+ {%- elif message.role == "user" %}
88
+ {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
89
+ {%- elif message.role == "assistant" %}
90
+ {%- set reasoning_content = '' %}
91
+ {%- if message.reasoning_content is string %}
92
+ {%- set reasoning_content = message.reasoning_content %}
93
+ {%- else %}
94
+ {%- if '</think>' in content %}
95
+ {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
96
+ {%- set content = content.split('</think>')[-1].lstrip('\n') %}
97
+ {%- endif %}
98
+ {%- endif %}
99
+ {%- set reasoning_content = reasoning_content|trim %}
100
+ {%- if loop.index0 > ns.last_query_index %}
101
+ {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content + '\n</think>\n\n' + content }}
102
+ {%- else %}
103
+ {{- '<|im_start|>' + message.role + '\n' + content }}
104
+ {%- endif %}
105
+ {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %}
106
+ {%- for tool_call in message.tool_calls %}
107
+ {%- if tool_call.function is defined %}
108
+ {%- set tool_call = tool_call.function %}
109
+ {%- endif %}
110
+ {%- if loop.first %}
111
+ {%- if content|trim %}
112
+ {{- '\n\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
113
+ {%- else %}
114
+ {{- '<tool_call>\n<function=' + tool_call.name + '>\n' }}
115
+ {%- endif %}
116
+ {%- else %}
117
+ {{- '\n<tool_call>\n<function=' + tool_call.name + '>\n' }}
118
+ {%- endif %}
119
+ {%- if tool_call.arguments is defined %}
120
+ {%- for args_name, args_value in tool_call.arguments|items %}
121
+ {{- '<parameter=' + args_name + '>\n' }}
122
+ {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}
123
+ {{- args_value }}
124
+ {{- '\n</parameter>\n' }}
125
+ {%- endfor %}
126
+ {%- endif %}
127
+ {{- '</function>\n</tool_call>' }}
128
+ {%- endfor %}
129
+ {%- endif %}
130
+ {{- '<|im_end|>\n' }}
131
+ {%- elif message.role == "tool" %}
132
+ {%- if loop.previtem and loop.previtem.role != "tool" %}
133
+ {{- '<|im_start|>user' }}
134
+ {%- endif %}
135
+ {{- '\n<tool_response>\n' }}
136
+ {{- content }}
137
+ {{- '\n</tool_response>' }}
138
+ {%- if not loop.last and loop.nextitem.role != "tool" %}
139
+ {{- '<|im_end|>\n' }}
140
+ {%- elif loop.last %}
141
+ {{- '<|im_end|>\n' }}
142
+ {%- endif %}
143
+ {%- else %}
144
+ {{- raise_exception('Unexpected message role.') }}
145
+ {%- endif %}
146
+ {%- endfor %}
147
+ {%- if add_generation_prompt %}
148
+ {{- '<|im_start|>assistant\n' }}
149
+ {%- if enable_thinking is defined and enable_thinking is false %}
150
+ {{- '<think>\n\n</think>\n\n' }}
151
+ {%- else %}
152
+ {{- '<think>\n' }}
153
+ {%- endif %}
154
+ {%- endif %}
config.json ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3_5ForConditionalGeneration"
4
+ ],
5
+ "dtype": "bfloat16",
6
+ "image_token_id": 248056,
7
+ "model_type": "qwen3_5",
8
+ "text_config": {
9
+ "attention_bias": false,
10
+ "attention_dropout": 0.0,
11
+ "attn_output_gate": true,
12
+ "bos_token_id": null,
13
+ "dtype": "bfloat16",
14
+ "eos_token_id": 248044,
15
+ "full_attention_interval": 4,
16
+ "head_dim": 256,
17
+ "hidden_act": "silu",
18
+ "hidden_size": 4096,
19
+ "initializer_range": 0.02,
20
+ "intermediate_size": 12288,
21
+ "layer_types": [
22
+ "linear_attention",
23
+ "linear_attention",
24
+ "linear_attention",
25
+ "full_attention",
26
+ "linear_attention",
27
+ "linear_attention",
28
+ "linear_attention",
29
+ "full_attention",
30
+ "linear_attention",
31
+ "linear_attention",
32
+ "linear_attention",
33
+ "full_attention",
34
+ "linear_attention",
35
+ "linear_attention",
36
+ "linear_attention",
37
+ "full_attention",
38
+ "linear_attention",
39
+ "linear_attention",
40
+ "linear_attention",
41
+ "full_attention",
42
+ "linear_attention",
43
+ "linear_attention",
44
+ "linear_attention",
45
+ "full_attention",
46
+ "linear_attention",
47
+ "linear_attention",
48
+ "linear_attention",
49
+ "full_attention",
50
+ "linear_attention",
51
+ "linear_attention",
52
+ "linear_attention",
53
+ "full_attention"
54
+ ],
55
+ "linear_conv_kernel_dim": 4,
56
+ "linear_key_head_dim": 128,
57
+ "linear_num_key_heads": 16,
58
+ "linear_num_value_heads": 32,
59
+ "linear_value_head_dim": 128,
60
+ "mamba_ssm_dtype": "float32",
61
+ "max_position_embeddings": 262144,
62
+ "mlp_only_layers": [],
63
+ "model_type": "qwen3_5_text",
64
+ "mtp_num_hidden_layers": 1,
65
+ "mtp_use_dedicated_embeddings": false,
66
+ "num_attention_heads": 16,
67
+ "num_hidden_layers": 32,
68
+ "num_key_value_heads": 4,
69
+ "pad_token_id": null,
70
+ "partial_rotary_factor": 0.25,
71
+ "rms_norm_eps": 1e-06,
72
+ "rope_parameters": {
73
+ "mrope_interleaved": true,
74
+ "mrope_section": [
75
+ 11,
76
+ 11,
77
+ 10
78
+ ],
79
+ "partial_rotary_factor": 0.25,
80
+ "rope_theta": 10000000,
81
+ "rope_type": "default"
82
+ },
83
+ "tie_word_embeddings": false,
84
+ "use_cache": true,
85
+ "vocab_size": 248320
86
+ },
87
+ "tie_word_embeddings": false,
88
+ "transformers_version": "5.17.0",
89
+ "video_token_id": 248057,
90
+ "vision_config": {
91
+ "deepstack_visual_indexes": [],
92
+ "depth": 27,
93
+ "dtype": "bfloat16",
94
+ "hidden_act": "gelu_pytorch_tanh",
95
+ "hidden_size": 1152,
96
+ "in_channels": 3,
97
+ "initializer_range": 0.02,
98
+ "intermediate_size": 4304,
99
+ "model_type": "qwen3_5_vision",
100
+ "num_heads": 16,
101
+ "num_position_embeddings": 2304,
102
+ "out_hidden_size": 4096,
103
+ "patch_size": 16,
104
+ "rope_parameters": {
105
+ "rope_theta": 10000.0,
106
+ "rope_type": "axial"
107
+ },
108
+ "spatial_merge_size": 2,
109
+ "temporal_patch_size": 2
110
+ },
111
+ "vision_end_token_id": 248054,
112
+ "vision_start_token_id": 248053
113
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "eos_token_id": 248044,
4
+ "transformers_version": "5.17.0",
5
+ "use_cache": true
6
+ }
helper/shim.py ADDED
@@ -0,0 +1,354 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """TypeSafe-shaped /v1/systemone shim over a vLLM letter readout.
2
+
3
+ Accepts jev-ultrafast's request (state + Choice questions), answers each question with ONE
4
+ prefill against the model and a softmax over the option letters. Options beyond 52 are handled
5
+ in two stages (per-chunk readout, then a readout over the chunk winners) composed into one full distribution (_distribution).
6
+ GET /v1/version reports the served model dir, calibration constants, flags and this file's sha256 (also the `model` of every answer).
7
+
8
+ Run: VLLM=http://localhost:8000/v1 python shim.py --port 8765
9
+ Point jev-ultrafast at http://localhost:8765/v1/systemone.
10
+ """
11
+ import argparse, ast, json, math, os, threading, time
12
+ from concurrent.futures import ThreadPoolExecutor
13
+ from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer
14
+ from openai import OpenAI
15
+
16
+ LETTERS = [chr(65 + i) for i in range(26)] + [chr(97 + i) for i in range(26)]
17
+ client = OpenAI(base_url=os.environ.get("VLLM", "http://localhost:8000/v1"), api_key="x")
18
+ TEMP = float(os.environ.get("READOUT_T", "1.1")) # fitted on held-out cross-website steps for the merged model
19
+ PERMS = int(os.environ.get("READOUT_PERMS", "1")) # >1 = average over that many letterings (4 ≈ +16 pts acc, 4× cost)
20
+ SHIM_TOKEN = os.environ.get("SHIM_TOKEN", "") # if set, /v1/systemone requires Authorization: Bearer <token> (what the TypeSafe SDK sends as TYPESAFE_API_KEY)
21
+ TARGETED = os.environ.get("READOUT_TARGETED") == "1" # OFF unless set: corrected score extraction (logprob_token_ids); changes probabilities, not the prompt, so READOUT_T and the yes/no slope must be fitted ON it
22
+ class ReadoutIncomplete(RuntimeError): pass
23
+ NOUL_T = float(os.environ.get("READOUT_NOUL_T", "3.0")); NOUL_BIAS = float(os.environ.get("READOUT_NOUL_BIAS", "-0.4")) # yes/no calibration fit on 19 boolean sets, checked on 18 (results/noul_calibration.json)
24
+ _ids = {}
25
+ def letter_ids():
26
+ if not _ids:
27
+ from transformers import AutoTokenizer
28
+ t = AutoTokenizer.from_pretrained(os.environ.get("TOKENIZER", "Qwen/Qwen3.8-27B"))
29
+ _ids.update({L: t.encode(L, add_special_tokens=False)[0] for L in LETTERS})
30
+ return _ids
31
+
32
+ class State(str):
33
+ """The state as text, plus an optional screenshot (data URL) that rides along to the model as an image."""
34
+ image = None; fields = None
35
+
36
+ COMPACT = os.environ.get("SHIM_COMPACT") == "1" # lossless: drop geometry/id fields, dedupe identical elements, drop non-interactive textless elements
37
+ COMPACT_CAP = int(os.environ.get("SHIM_COMPACT_CAP", "0")) # >0 additionally truncates strings to this many chars: a lossy cap, off unless a held-out check on real states proves it neutral
38
+ DROP_KEYS = {"box", "rect", "bbox", "bounds", "xpath", "selector", "nonce", "n", "fingerprint", "marker", "page_key",
39
+ "elapsed_ms", "started_at", "latency_ms", "executed_ms", "usage"} # geometry/ids and per-send telemetry: no evidence, and the telemetry changes every send, which defeats prefix reuse across steps
40
+ INTERACTIVE = {"a", "button", "input", "select", "textarea", "option", "label", "summary"}
41
+
42
+ ID_KEYS = ("index", "id", "idx", "n", "marker") # an element's identity: two same-label controls with different ids are two choices
43
+
44
+ def compact(state):
45
+ """Drop geometry/id fields; dedupe only elements that repeat the same (tag, text, id) — an element without any id field is
46
+ never deduped, so distinct same-label controls survive; keep interactive or texted/labelled elements; optional string cap."""
47
+ def clean(v):
48
+ if isinstance(v, dict): return {k: clean(x) for k, x in v.items() if k not in DROP_KEYS}
49
+ if isinstance(v, list): return [clean(x) for x in v]
50
+ return v[:COMPACT_CAP] if COMPACT_CAP and isinstance(v, str) and len(v) > COMPACT_CAP else v
51
+ st = clean(state); els = state.get("elements") # identity is read from the raw elements: clean() drops some id fields
52
+ if isinstance(els, list):
53
+ seen, out = set(), []
54
+ for e in els:
55
+ if not isinstance(e, dict): out.append(e); continue
56
+ ident = next((str(e[k]) for k in ID_KEYS if e.get(k) is not None), None)
57
+ key = (e.get("tag"), (e.get("text") or "").strip(), ident)
58
+ if ident is not None and key in seen: continue
59
+ if e.get("tag") not in INTERACTIVE and not (e.get("text") or e.get("label") or e.get("aria") or e.get("role")): continue
60
+ seen.add(key); out.append(clean(e))
61
+ st["elements"] = out
62
+ return st
63
+
64
+ LAYOUT = os.environ.get("SHIM_LAYOUT", "") # page_first: stable page/elements/goal first, mutable history and telemetry last, so consecutive steps of a task share the longest prefix (a change of the trained layout: web-300 check before go-live)
65
+ STABLE_FIRST = ("page", "elements", "goal", "task", "plan")
66
+ def page_first(state):
67
+ return {**{k: state[k] for k in STABLE_FIRST if k in state}, **{k: v for k, v in state.items() if k not in STABLE_FIRST}}
68
+
69
+ def with_image(state):
70
+ """state.screenshot / state.image (data URL or raw base64 PNG/JPEG) becomes the image; the rest is the text state."""
71
+ if COMPACT and isinstance(state, dict): state = compact(state)
72
+ if LAYOUT == "page_first" and isinstance(state, dict): state = page_first(state)
73
+ if isinstance(state, dict):
74
+ for key in ("screenshot", "image"):
75
+ v = state.get(key)
76
+ if isinstance(v, str) and (v.startswith("data:image") or len(v) > 2000):
77
+ rest = {k: x for k, x in state.items() if k != key}; st = State(json.dumps(rest, ensure_ascii=False) if rest else "(see screenshot)")
78
+ st.image = v if v.startswith("data:image") else "data:image/png;base64," + v; st.fields = rest; return st
79
+ return State(json.dumps(state, ensure_ascii=False))
80
+ return State(state)
81
+
82
+ PAD = int(os.environ.get("SHIM_PAD", "0")) # 784 = the cache block of this model: pad the shared page prefix to a block boundary so every question reuses all page blocks
83
+ _hdr = {}
84
+ def _header():
85
+ """Chat-template text before the user content, so prefix token counts match what vLLM sees."""
86
+ if not _hdr:
87
+ from transformers import AutoTokenizer
88
+ t = AutoTokenizer.from_pretrained(os.environ.get("TOKENIZER", "Qwen/Qwen3.8-27B")); _hdr["t"] = t
89
+ r = t.apply_chat_template([{"role": "user", "content": "X"}], tokenize=False, add_generation_prompt=True, enable_thinking=False); _hdr["h"] = r.split("X")[0]
90
+ return _hdr["t"], _hdr["h"]
91
+
92
+ def pad_prefix(prefix):
93
+ """Append filler so the chat header + prefix is 2 tokens past a multiple of PAD tokens (the boundary stays inside the shared text)."""
94
+ if not PAD: return prefix
95
+ t, h = _header(); n = len(t.encode(h + prefix, add_special_tokens=False)); k = (2 - n) % PAD
96
+ if k < 2: k += PAD
97
+ out = prefix + "\n" + " pad" * k
98
+ for _ in range(3): # BPE can merge fillers; correct the count
99
+ m = len(t.encode(h + out, add_special_tokens=False)); d = (m - 2) % PAD
100
+ if d == 0: break
101
+ out = out + " pad" * (PAD - d) if d > PAD // 2 else out[:len(out) - 4 * d]
102
+ return out
103
+
104
+ def prefix_text(state_text):
105
+ """The shared part of a text-mode prompt (everything before the question)."""
106
+ return pad_prefix(f"State:\n{state_text}")
107
+
108
+ def prewarm(state_text):
109
+ """One-token prefill of the shared prefix so a following decision call only pays for the question tails."""
110
+ r = client.chat.completions.create(model="qwen", max_tokens=1, temperature=0, messages=[{"role": "user", "content": prefix_text(state_text)}],
111
+ extra_body={"chat_template_kwargs": {"enable_thinking": False}})
112
+ return r.usage.prompt_tokens
113
+
114
+ HIST_KEYS = ("previous_actions", "history", "recent_actions")
115
+ def _task(fields, instructions):
116
+ """Task line of the trained screenshot layout: state.task (Mind2Web/ops shape) or instructions.goal (harness shape)."""
117
+ if fields.get("task"): return str(fields["task"])
118
+ if instructions.startswith("{"): # the goal is read from the STRUCTURE whatever the presentation style: JSON text, or the Python-literal text of READOUT_INSTR_STYLE=pyrepr (literal_eval: literals only, never code)
119
+ for parse in (json.loads, ast.literal_eval):
120
+ try: v = parse(instructions)
121
+ except (ValueError, SyntaxError): continue
122
+ return v.get("goal") if isinstance(v, dict) else None
123
+ return None
124
+
125
+ def _readout_once(state_text, instructions, options):
126
+ """One lettering, one prefill. Returns temperature-scaled probs aligned with options.
127
+ Layouts: (1) image + state.task [+ previous_actions|history] → the trained screenshot layout (image lane: task, previous
128
+ actions, red-letter-marked candidates, question). (2) image + harness shape (page/elements/recent_actions, goal inside the
129
+ question's instructions) → the same layout with page/elements as Context and unmarked candidates; the image lane never
130
+ trained on this shape (the text lane trained on it as JSON, without an image), so it needs the matched check before it is
131
+ relied on. (3) image + any other shape, or no image → the text-lane layout (State JSON, Question, Options)."""
132
+ lines = "\n".join(f"[{LETTERS[i]}] {k}: {d}" for i, (k, d) in enumerate(options))
133
+ image = getattr(state_text, "image", None); fields = getattr(state_text, "fields", None) or {}
134
+ task = _task(fields, instructions) if image else None
135
+ if task:
136
+ hist = next((fields[k] for k in HIST_KEYS if fields.get(k)), [])
137
+ hist = "\n".join(f"- {h if isinstance(h, str) else json.dumps(h, ensure_ascii=False)}" for h in (hist if isinstance(hist, list) else [hist])) or "- (none)"
138
+ extra = {k: v for k, v in fields.items() if k not in ("task",) + HIST_KEYS}
139
+ marks = "\n".join(f"[{LETTERS[i]}] {d if d else k}" for i, (k, d) in enumerate(options))
140
+ shown = "The screenshot shows the current page with candidate elements marked by red letters." if "task" in fields else "The screenshot shows the current page; candidate elements:"
141
+ page = f"{shown}\n{marks}\n"
142
+ task = f"Task: {task}\nPrevious actions:\n{hist}\n" + (f"Context: {json.dumps(extra, ensure_ascii=False)}\n" if extra else "")
143
+ prompt = (page + "\n" + task if LAYOUT == "page_first" else task + "\n" + page) + f"\n{instructions} Answer with the letter only."
144
+ else:
145
+ prompt = ((f"The screenshot shows the current screen.\nState:\n{state_text}" if image else prefix_text(state_text))
146
+ + f"\n\nQuestion: {instructions}\nOptions:\n{lines}\n\nAnswer with the letter of the best option only.")
147
+ content = [{"type": "image_url", "image_url": {"url": image}}, {"type": "text", "text": prompt}] if image else prompt
148
+ ids = letter_ids(); allowed = [ids[LETTERS[i]] for i in range(len(options))]
149
+ if TARGETED: # exact scores of exactly the candidate token ids, matched BY ID: top_logprobs is the raw top-K over the whole vocabulary, taken before the allowed-token mask, and drops labels on many-option heads
150
+ assert len(set(allowed)) == len(allowed), "candidate token ids are not unique"
151
+ r = client.chat.completions.create(model="qwen", max_tokens=1, temperature=0, logprobs=True, messages=[{"role": "user", "content": content}],
152
+ extra_body={"allowed_token_ids": allowed, "logprob_token_ids": allowed, "return_tokens_as_token_ids": True, "chat_template_kwargs": {"enable_thinking": False}})
153
+ got = {t.token: t.logprob for t in r.choices[0].logprobs.content[0].top_logprobs}; raw = [got.get(f"token_id:{i}") for i in allowed]
154
+ if any(v is None or not math.isfinite(v) for v in raw): raise ReadoutIncomplete(f"{sum(v is None or not math.isfinite(v) for v in raw)} of {len(allowed)} candidate scores missing or not finite") # never floored, never a whitespace look-alike
155
+ z = [v / TEMP for v in raw]
156
+ else:
157
+ r = client.chat.completions.create(model="qwen", max_tokens=1, temperature=0, logprobs=True, top_logprobs=max(20, len(options)),
158
+ messages=[{"role": "user", "content": content}],
159
+ extra_body={"allowed_token_ids": allowed, "chat_template_kwargs": {"enable_thinking": False}})
160
+ lp = {}
161
+ for t in r.choices[0].logprobs.content[0].top_logprobs: # exact letter token wins; ' U' must not overwrite 'U'
162
+ k = t.token if t.token in LETTERS else t.token.strip()
163
+ if k not in lp or t.token in LETTERS: lp[k] = t.logprob
164
+ z = [lp.get(LETTERS[i], -30.0) / TEMP for i in range(len(options))] # OLD PROTOCOL: a label outside the raw top-K gets the -30 floor
165
+ m = max(z); e = [math.exp(v - m) for v in z]; s = sum(e)
166
+ return [v / s for v in e], r.usage.prompt_tokens
167
+
168
+ def readout(state_text, instructions, options):
169
+ """options: list of (key, description). Averages over PERMS letterings (per option), so the
170
+ returned probs are aligned with the caller's option order regardless of which letter each got."""
171
+ if PERMS <= 1: return _readout_once(state_text, instructions, options)
172
+ import random
173
+ acc = [0.0] * len(options); tokens = 0
174
+ for j in range(PERMS):
175
+ order = list(range(len(options))); random.Random(j).shuffle(order)
176
+ p, t = _readout_once(state_text, instructions, [options[i] for i in order]); tokens += t
177
+ for pos, i in enumerate(order): acc[i] += p[pos] / PERMS
178
+ return acc, tokens
179
+
180
+ class BadQuestion(ValueError): pass
181
+
182
+ def _instr(q):
183
+ i = q.get("instructions")
184
+ if i is None: raise BadQuestion("instructions is required")
185
+ if isinstance(i, str): return i
186
+ return str(i) if os.environ.get("READOUT_INSTR_STYLE") == "pyrepr" else json.dumps(i, ensure_ascii=False) # pyrepr = what distill_train.build's f-string wrote for dict instructions in the v8 text run (DOM rows); set ONLY on a box serving a model trained that way
187
+
188
+ def _desc(v):
189
+ return "" if v is None else (v if isinstance(v, str) else json.dumps(v, ensure_ascii=False))
190
+
191
+ # official formulas (typesafe-ai/system-one-adapter-python confidence_metrics.py)
192
+ def choice_confidence(p):
193
+ if len(p) == 1: return 1.0
194
+ u = 1.0 / len(p); return max(0.0, (max(p) - u) / (1.0 - u))
195
+
196
+ def score_confidence(p):
197
+ if len(p) == 1: return 1.0
198
+ mode = max(range(len(p)), key=p.__getitem__)
199
+ dist = sum(pi * abs(i - mode) for i, pi in enumerate(p))
200
+ c = (len(p) - 1) / 2; umad = sum(abs(i - c) for i in range(len(p))) / len(p)
201
+ return max(0.0, 1.0 - dist / umad)
202
+
203
+ def _distribution(state_text, instr, opts):
204
+ """opts: list of (key, description) → (probs aligned with opts, tokens).
205
+ Above 52 options (one letter each) the readout runs per near-equal chunk of ≤52, then once over the chunk winners, and
206
+ the two are composed: p(i) ∝ p_final(chunk of i) · p_chunk(i) / p_chunk(winner of that chunk), normalised over all options.
207
+ Approximation: an option's letter logit is taken to be the same in its chunk prompt and in the winners prompt, so each
208
+ winner anchors its chunk's mass on the winners' scale; when that holds exactly, p equals the softmax over all options.
209
+ Every option gets a non-zero probability, the distribution sums to 1, it does not depend on option order beyond float
210
+ noise, and confidence is computed on it (not on the winners alone)."""
211
+ if len(opts) <= 52: return readout(state_text, instr, opts)
212
+ k = -(-len(opts) // 52); size = -(-len(opts) // k); chunks = [opts[i:i + size] for i in range(0, len(opts), size)]
213
+ parts, tokens = [], 0
214
+ for chunk in chunks:
215
+ p, t = readout(state_text, instr, chunk); tokens += t; parts.append((p, max(range(len(p)), key=p.__getitem__)))
216
+ pf, t = readout(state_text, instr, [chunk[w] for chunk, (_, w) in zip(chunks, parts)]); tokens += t
217
+ raw = [pf[c] * pi / p[w] for c, (p, w) in enumerate(parts) for pi in p]; s = sum(raw)
218
+ return [v / s for v in raw], tokens
219
+
220
+ def answer_choice(state_text, q):
221
+ crit = q.get("criteria")
222
+ if not isinstance(crit, dict) or not crit: raise BadQuestion("choice.criteria must be a non-empty map of option -> description|null")
223
+ opts = [(k, _desc(v)) for k, v in crit.items()]
224
+ p, tokens = _distribution(state_text, _instr(q), opts)
225
+ choice = opts[max(range(len(p)), key=lambda i: p[i])][0]; probs = {k: round(v, 4) for (k, _), v in zip(opts, p)} # winner picked before rounding
226
+ return {"type": "choice", "choice": choice, "probabilities": probs, "confidence": round(choice_confidence(p), 4)}, tokens
227
+
228
+ def answer_score(state_text, q):
229
+ levels = q.get("criteria")
230
+ if not isinstance(levels, list) or len(levels) < 2: raise BadQuestion("score.criteria must be an ordered array of at least two levels")
231
+ opts = [(str(i), _desc(l)) for i, l in enumerate(levels)]
232
+ p, tokens = _distribution(state_text, _instr(q) + " Rate along the ordered levels below (lowest first).", opts)
233
+ return {"type": "score", "score": round(sum(i * pi for i, pi in enumerate(p)), 4),
234
+ "legend": {str(i): l for i, l in enumerate(levels)}, "probabilities": {str(i): round(pi, 4) for i, pi in enumerate(p)},
235
+ "confidence": round(score_confidence(p), 4)}, tokens
236
+
237
+ def answer_noul(state_text, q):
238
+ crit = q.get("criteria") or {}
239
+ yes = _desc(crit.get("true")) or "The statement is true."; no = _desc(crit.get("false")) or "The statement is false."
240
+ p, tokens = _distribution(state_text, _instr(q), [("yes", yes), ("no", no)])
241
+ py = min(max(p[0], 1e-4), 1 - 1e-4); z = math.log(py / (1 - py)) / NOUL_T + NOUL_BIAS # the raw readout over-says yes on skewed sets
242
+ return {"type": "noul", "noul": round(1 / (1 + math.exp(-z)), 4)}, tokens
243
+
244
+ ANSWER = {"choice": answer_choice, "score": answer_score, "noul": answer_noul}
245
+
246
+ LOOP_BREAK = os.environ.get("SHIM_LOOP_BREAK") == "1" # OFF unless set: the owner classed it a benchmark-specific patch, not model behaviour. On: an action repeated ≥3× without the page changing is masked out of the candidates (exact key or exact description match only; never below two candidates)
247
+ def loop_break(state, qs):
248
+ ra = state.get("recent_actions") or []
249
+ if len(ra) < 3: return qs
250
+ key = lambda h: (str(h.get("action") or ""), str(h.get("kind") or ""))
251
+ last = ra[-3:]
252
+ if len({key(h) for h in last}) != 1 or any(h.get("page_changed") for h in last): return qs
253
+ act, kind = key(last[-1]); n_rep = 0
254
+ for h in reversed(ra):
255
+ if key(h) == (act, kind) and not h.get("page_changed"): n_rep += 1
256
+ else: break
257
+ if not act: return qs
258
+ out = {}
259
+ for qid, q in qs.items():
260
+ if q.get("type") == "choice" and isinstance(q.get("criteria"), dict):
261
+ crit = q["criteria"]; keys = list(crit)
262
+ drop = {k for k in keys if k == act or _desc(crit[k]) == act}
263
+ if n_rep >= 4 and kind in keys: drop.add(kind) # the operation itself, after 4 fruitless repeats
264
+ if drop and len(keys) - len(drop) >= 2:
265
+ q = {**q, "criteria": {k: v for k, v in crit.items() if k not in drop}}
266
+ print(json.dumps({"loop_break": qid, "dropped": sorted(drop)[:4], "repeats": n_rep}), flush=True)
267
+ out[qid] = q
268
+ return out
269
+
270
+
271
+ def passthrough_chat(body):
272
+ """Forward a chat completion to vLLM with thinking forced off; drop fields vLLM does not know."""
273
+ import urllib.request
274
+ for k in ("reasoning", "thinking"): body.pop(k, None)
275
+ body["chat_template_kwargs"] = {"enable_thinking": False}
276
+ req = urllib.request.Request(str(client.base_url).rstrip("/") + "/chat/completions", data=json.dumps(body).encode(),
277
+ headers={"Content-Type": "application/json", "Authorization": "Bearer x"}, method="POST")
278
+ with urllib.request.urlopen(req, timeout=120) as r: return r.read()
279
+
280
+ class H(BaseHTTPRequestHandler):
281
+ protocol_version = "HTTP/1.1" # keep-alive: far-away clients otherwise pay a full round trip per call
282
+ disable_nagle_algorithm = True # headers and body go out immediately instead of waiting for the ACK (one round trip less)
283
+ pool = ThreadPoolExecutor(max_workers=int(os.environ.get("SHIM_POOL", "16")))
284
+ STAGGER = os.environ.get("SHIM_STAGGER") == "1"
285
+ STAGGER_MIN_CHARS = int(os.environ.get("SHIM_STAGGER_MIN_CHARS", "16000")) # ~4k tokens: below that all questions fit one scheduler step and share blocks in flight anyway
286
+ def log_message(self, *a): pass
287
+ def do_POST(self):
288
+ if SHIM_TOKEN and self.headers.get("Authorization", "") != "Bearer " + SHIM_TOKEN:
289
+ return self.send_json(401, {"error": {"code": 401, "message": "missing or invalid bearer token"}})
290
+ body = json.loads(self.rfile.read(int(self.headers.get("Content-Length", 0))) or b"{}")
291
+ t0 = time.perf_counter()
292
+ if self.path.rstrip("/").endswith("/version"): return self.send_json(200, VERSION)
293
+ if self.path.endswith("/chat/completions"):
294
+ try: data = passthrough_chat(body); code = 200
295
+ except Exception as e: data = json.dumps({"error": str(e)[:300]}).encode(); code = 502
296
+ self.send_response(code); self.send_header("Content-Type", "application/json"); self.send_header("Content-Length", str(len(data))); self.end_headers(); self.wfile.write(data)
297
+ print(json.dumps({"chat_ms": round((time.perf_counter() - t0) * 1000), "code": code}), flush=True); return
298
+ if self.path.endswith("/prewarm"):
299
+ state = body.get("state")
300
+ if state is None: return self.send_json(422, {"error": {"code": 422, "message": "state is required"}})
301
+ try: n = prewarm(with_image(state))
302
+ except Exception as e: return self.send_json(502, {"error": {"code": 502, "message": str(e)[:200]}})
303
+ print(json.dumps({"prewarm_tokens": n, "ms": round((time.perf_counter() - t0) * 1000)}), flush=True); return self.send_json(200, {"ok": True, "prompt_tokens": n})
304
+ state = body.get("state"); qs = body.get("questions")
305
+ if state is None or not isinstance(qs, dict) or not qs:
306
+ return self.send_json(422, {"error": {"code": 422, "message": "state and a non-empty questions map are required"}})
307
+ if LOOP_BREAK and isinstance(state, dict):
308
+ try: qs = loop_break(state, qs)
309
+ except Exception as e: print(json.dumps({"loop_break_error": str(e)[:120]}), flush=True)
310
+ if isinstance(state, dict) and isinstance(state.get("recent_actions"), list) and state["recent_actions"]:
311
+ try: print(json.dumps({"trace": [[h.get("kind"), h.get("action"), bool(h.get("page_changed")), h.get("choice")] for h in state["recent_actions"][-5:] if isinstance(h, dict)]}), flush=True)
312
+ except Exception: pass
313
+ state_text = with_image(state) # str subclass; carries state.screenshot as an image when present
314
+ for qid, q in qs.items():
315
+ if not isinstance(q, dict) or q.get("type") not in ANSWER:
316
+ return self.send_json(422, {"error": {"code": 422, "message": f"questions.{qid}.type must be one of choice, score, noul"}})
317
+ try:
318
+ items = list(qs.items()); f = lambda it: (it[0], ANSWER[it[1]["type"]](state_text, it[1]))
319
+ stagger = self.STAGGER and len(state_text) >= self.STAGGER_MIN_CHARS # first question alone so its state blocks are cached before the rest run
320
+ results = ([f(items[0])] + list(self.pool.map(f, items[1:]))) if stagger else list(self.pool.map(f, items))
321
+ except BadQuestion as e:
322
+ return self.send_json(422, {"error": {"code": 422, "message": str(e)}})
323
+ answers = {qid: a for qid, (a, _) in results}; toks = int(sum(t for _, (_, t) in results))
324
+ out = {"id": f"shim-{int(time.time() * 1000)}", "model": MODEL_STRING, "answers": answers,
325
+ "usage": {"input_tokens": toks, "output_tokens": 0}}
326
+ self.send_json(200, out)
327
+ print(json.dumps({"questions": len(qs), "tokens": toks, "ms": round((time.perf_counter() - t0) * 1000), "ops": {q: a.get("choice") for q, a in answers.items() if "choice" in a}}), flush=True)
328
+
329
+ def do_GET(self):
330
+ if SHIM_TOKEN and self.headers.get("Authorization", "") != "Bearer " + SHIM_TOKEN:
331
+ return self.send_json(401, {"error": {"code": 401, "message": "missing or invalid bearer token"}})
332
+ if self.path.rstrip("/").endswith("/version"): return self.send_json(200, VERSION)
333
+ self.send_json(404, {"error": {"code": 404, "message": "GET /v1/version"}})
334
+
335
+ def send_json(self, code, obj):
336
+ data = json.dumps(obj).encode()
337
+ self.send_response(code); self.send_header("Content-Type", "application/json"); self.send_header("Content-Length", str(len(data))); self.end_headers(); self.wfile.write(data)
338
+
339
+ def _version():
340
+ """What is served, so a tester can pin what they measured: model dir, calibration constants, shim flags, this file's sha256. Never the token."""
341
+ import hashlib
342
+ flags = {"perms": PERMS, "stagger": H.STAGGER, "loop_break": LOOP_BREAK, "compact": COMPACT, "compact_cap": COMPACT_CAP, "layout": LAYOUT, "pad": PAD, "targeted": TARGETED, "instr_style": os.environ.get("READOUT_INSTR_STYLE") or "json"}
343
+ model = os.path.basename((os.environ.get("SHIM_MODEL") or os.environ.get("TOKENIZER", "")).rstrip("/")) or "unknown"
344
+ return {"model_dir": model, "T": TEMP, "noul_t": NOUL_T, "noul_bias": NOUL_BIAS, "flags": flags,
345
+ "shim_file": os.path.basename(__file__), "shim_sha256": hashlib.sha256(open(__file__, "rb").read()).hexdigest()}
346
+ VERSION = _version()
347
+ MODEL_STRING = (f"{VERSION['model_dir']} T={TEMP} noul={NOUL_T},{NOUL_BIAS} flags=" + json.dumps(VERSION["flags"], separators=(",", ":"))
348
+ + f" shim={VERSION['shim_file']}@{VERSION['shim_sha256'][:12]}") # the `model` of every answer
349
+
350
+ if __name__ == "__main__":
351
+ ap = argparse.ArgumentParser(); ap.add_argument("--port", type=int, default=8765); ap.add_argument("--host", default="127.0.0.1", help="0.0.0.0 to expose (use SHIM_TOKEN)"); a = ap.parse_args()
352
+ letter_ids(); print(f"shim on :{a.port} -> {client.base_url}", flush=True)
353
+ ThreadingHTTPServer.request_queue_size = 256; ThreadingHTTPServer.daemon_threads = True
354
+ ThreadingHTTPServer((a.host, a.port), H).serve_forever()
helper/shim_mlx.py ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Serve the frozen helper over MLX. Prompt rendering and calibrated readout are unchanged.
3
+ See ../serve/SERVE.md for the OpenJev Flash 9B calibration and launch command.
4
+ Use --selfcheck for choice and yes/no smoke checks. Keep --prefix-cache off to
5
+ reproduce the measured one-forward-pass path; MLX supports text input only.
6
+ """
7
+ import argparse, copy, hashlib, importlib.util, math, os, sys, threading, types
8
+
9
+ ap = argparse.ArgumentParser(); ap.add_argument("--helper", required=True); ap.add_argument("--model", required=True); ap.add_argument("--port", type=int, default=3000)
10
+ ap.add_argument("--host", default="127.0.0.1"); ap.add_argument("--selfcheck", action="store_true")
11
+ ap.add_argument("--prefix-cache", action="store_true", help="interactive speed-up: compute the shared 'State:' prefix once and reuse it for the other questions of the step (chunked prefill). Off for benchmark runs.")
12
+ a = ap.parse_args()
13
+ assert os.environ.get("READOUT_TARGETED") == "1", "the MLX stand-in implements only the TARGETED readout (READOUT_TARGETED=1)"
14
+ os.environ.setdefault("TOKENIZER", a.model); os.environ.setdefault("SHIM_MODEL", a.model)
15
+ HELPER_SHA = hashlib.sha256(open(a.helper, "rb").read()).hexdigest(); assert HELPER_SHA.startswith("81a22f1b"), f"helper is {HELPER_SHA[:16]}, not the frozen 81a22f1b"
16
+
17
+ import mlx.core as mx
18
+ from mlx_lm import load
19
+ from mlx_lm.models.cache import make_prompt_cache
20
+ from transformers import AutoTokenizer
21
+ MLX_MODEL, _ = load(a.model); tok = AutoTokenizer.from_pretrained(a.model) # module-level name distinct from create()'s `model` argument (the helper passes model="qwen")
22
+ LOCK = threading.Lock(); STATS = {"calls": 0, "prompt_tokens": 0}
23
+
24
+ class _Obj(types.SimpleNamespace): pass
25
+
26
+ PREFIX = {"ids": [], "cache": None} # --prefix-cache: token ids of the last shared prefix and the model cache right after it
27
+
28
+ def _feed(ids, cache, step=2048):
29
+ """Run ids through the model on top of `cache`; returns the logits of the last position."""
30
+ while len(ids) > step:
31
+ MLX_MODEL(mx.array(ids[:step])[None], cache=cache); mx.eval([c.state for c in cache]); ids = ids[step:]
32
+ return MLX_MODEL(mx.array(ids)[None], cache=cache)[0, -1]
33
+
34
+ def _last_logits(ids, content):
35
+ """Default: one plain forward of the whole prompt (the benchmark path). With --prefix-cache: the helper's prompts are
36
+ 'State:\n<state>' + '\n\nQuestion: ...', so every question of one step shares the state tokens; they are computed once and copied."""
37
+ cut = content.rfind("\n\nQuestion: ") if a.prefix_cache and isinstance(content, str) else -1
38
+ if cut < 0: return MLX_MODEL(mx.array(ids)[None])[0, -1]
39
+ shared = PREFIX["ids"]
40
+ if not (shared and ids[:len(shared)] == shared and len(ids) > len(shared)):
41
+ head = tok.apply_chat_template([{"role": "user", "content": content[:cut]}], tokenize=True, add_generation_prompt=True, enable_thinking=False)
42
+ if hasattr(head, "input_ids"): head = head["input_ids"]
43
+ n = next((i for i, (x, y) in enumerate(zip(ids, head)) if x != y), min(len(ids), len(head)))
44
+ n = min(n, len(ids) - 1)
45
+ if n < 64: return MLX_MODEL(mx.array(ids)[None])[0, -1]
46
+ cache = make_prompt_cache(MLX_MODEL); _feed(ids[:n], cache); mx.eval([c.state for c in cache])
47
+ PREFIX["ids"], PREFIX["cache"] = ids[:n], cache; shared = PREFIX["ids"]
48
+ return _feed(ids[len(shared):], copy.deepcopy(PREFIX["cache"]))
49
+
50
+ def create(model=None, max_tokens=1, temperature=0, logprobs=False, messages=None, extra_body=None, **kw):
51
+ """The helper's TARGETED call: messages = [{"role": "user", "content": <str>}], extra_body.logprob_token_ids = the candidate letter ids.
52
+ Returns logprobs for exactly those ids (log-softmax over the full vocabulary at the first output position) as `token_id:<id>` entries."""
53
+ eb = extra_body or {}; want = eb.get("logprob_token_ids") or eb.get("allowed_token_ids")
54
+ assert want and messages and isinstance(messages[0]["content"], str), "MLX stand-in: text-only prompts with logprob_token_ids"
55
+ assert (eb.get("chat_template_kwargs") or {}).get("enable_thinking") is False
56
+ ids = tok.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, enable_thinking=False)
57
+ if hasattr(ids, "input_ids"): ids = ids["input_ids"]
58
+ with LOCK:
59
+ logits = _last_logits(ids, messages[0]["content"]).astype(mx.float32); lp = logits - mx.logsumexp(logits, axis=-1); vals = [float(lp[i]) for i in want]; mx.eval(logits) # log-softmax over the full vocabulary
60
+ STATS["calls"] += 1; STATS["prompt_tokens"] += len(ids)
61
+ top = [_Obj(token=f"token_id:{i}", logprob=v) for i, v in zip(want, vals)]
62
+ return _Obj(choices=[_Obj(logprobs=_Obj(content=[_Obj(top_logprobs=top)]))], usage=_Obj(prompt_tokens=len(ids)))
63
+
64
+ spec = importlib.util.spec_from_file_location("shim", a.helper); shim = importlib.util.module_from_spec(spec); spec.loader.exec_module(shim)
65
+ shim.client = _Obj(chat=_Obj(completions=_Obj(create=create)), base_url=f"mlx://{os.path.basename(a.model.rstrip('/'))}")
66
+ assert shim.TARGETED and shim.PERMS == 1, "helper must run TARGETED with PERMS=1 here"
67
+
68
+ if a.selfcheck:
69
+ st = shim.with_image({"text": "I was charged twice for my order and nobody replied."})
70
+ ans, n = shim.answer_choice(st, {"type": "choice", "instructions": "Which team should handle this?", "criteria": {"billing": None, "shipping": None, "technical": None}})
71
+ print("selfcheck:", ans, "prompt_tokens", n); ans2, n2 = shim.answer_noul(st, {"type": "noul", "instructions": "Is the customer angry?"}); print("selfcheck noul:", ans2, n2)
72
+ print("helper", HELPER_SHA[:16], "version", shim.VERSION["model_dir"], shim.VERSION["T"], shim.VERSION["noul_t"], shim.VERSION["flags"]); sys.exit(0)
73
+
74
+ print(f"MLX helper on :{a.port}; model {a.model}; helper {HELPER_SHA[:16]}; version {shim.MODEL_STRING}", flush=True)
75
+ shim.ThreadingHTTPServer.request_queue_size = 256; shim.ThreadingHTTPServer.daemon_threads = True
76
+ shim.ThreadingHTTPServer((a.host, a.port), shim.H).serve_forever()
model-00001-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e15ecbed01fedeac9c723b786b4c1f83adabf913f80cdca6d489a7e6ca1e039
3
+ size 4942706120
model-00002-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:75fe5aa1598fb612cf6936f7d5c7e281fb27524123f1b0898d6ab8bb93a37379
3
+ size 4987757928
model-00003-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb33f1a30334bbc0d56b7c26c8d273ce298cf4cb0efa074ed594e1f70a7cf2df
3
+ size 4954810240
model-00004-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d8f5bc5a6b1700076e0180d318e1a3c1a0a8cfd5b207d77fd8b787912afe4e8c
3
+ size 3934446832
model.safetensors.index.json ADDED
@@ -0,0 +1,768 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_parameters": 9409813744,
4
+ "total_size": 18819627488
5
+ },
6
+ "weight_map": {
7
+ "lm_head.weight": "model-00001-of-00004.safetensors",
8
+ "model.language_model.embed_tokens.weight": "model-00001-of-00004.safetensors",
9
+ "model.language_model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors",
10
+ "model.language_model.layers.0.linear_attn.A_log": "model-00001-of-00004.safetensors",
11
+ "model.language_model.layers.0.linear_attn.conv1d.weight": "model-00001-of-00004.safetensors",
12
+ "model.language_model.layers.0.linear_attn.dt_bias": "model-00001-of-00004.safetensors",
13
+ "model.language_model.layers.0.linear_attn.in_proj_a.weight": "model-00001-of-00004.safetensors",
14
+ "model.language_model.layers.0.linear_attn.in_proj_b.weight": "model-00001-of-00004.safetensors",
15
+ "model.language_model.layers.0.linear_attn.in_proj_qkv.weight": "model-00001-of-00004.safetensors",
16
+ "model.language_model.layers.0.linear_attn.in_proj_z.weight": "model-00001-of-00004.safetensors",
17
+ "model.language_model.layers.0.linear_attn.norm.weight": "model-00001-of-00004.safetensors",
18
+ "model.language_model.layers.0.linear_attn.out_proj.weight": "model-00001-of-00004.safetensors",
19
+ "model.language_model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
20
+ "model.language_model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
21
+ "model.language_model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
22
+ "model.language_model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
23
+ "model.language_model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
24
+ "model.language_model.layers.1.linear_attn.A_log": "model-00001-of-00004.safetensors",
25
+ "model.language_model.layers.1.linear_attn.conv1d.weight": "model-00001-of-00004.safetensors",
26
+ "model.language_model.layers.1.linear_attn.dt_bias": "model-00001-of-00004.safetensors",
27
+ "model.language_model.layers.1.linear_attn.in_proj_a.weight": "model-00001-of-00004.safetensors",
28
+ "model.language_model.layers.1.linear_attn.in_proj_b.weight": "model-00001-of-00004.safetensors",
29
+ "model.language_model.layers.1.linear_attn.in_proj_qkv.weight": "model-00001-of-00004.safetensors",
30
+ "model.language_model.layers.1.linear_attn.in_proj_z.weight": "model-00001-of-00004.safetensors",
31
+ "model.language_model.layers.1.linear_attn.norm.weight": "model-00001-of-00004.safetensors",
32
+ "model.language_model.layers.1.linear_attn.out_proj.weight": "model-00001-of-00004.safetensors",
33
+ "model.language_model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
34
+ "model.language_model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
35
+ "model.language_model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
36
+ "model.language_model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
37
+ "model.language_model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors",
38
+ "model.language_model.layers.10.linear_attn.A_log": "model-00002-of-00004.safetensors",
39
+ "model.language_model.layers.10.linear_attn.conv1d.weight": "model-00002-of-00004.safetensors",
40
+ "model.language_model.layers.10.linear_attn.dt_bias": "model-00002-of-00004.safetensors",
41
+ "model.language_model.layers.10.linear_attn.in_proj_a.weight": "model-00002-of-00004.safetensors",
42
+ "model.language_model.layers.10.linear_attn.in_proj_b.weight": "model-00002-of-00004.safetensors",
43
+ "model.language_model.layers.10.linear_attn.in_proj_qkv.weight": "model-00002-of-00004.safetensors",
44
+ "model.language_model.layers.10.linear_attn.in_proj_z.weight": "model-00002-of-00004.safetensors",
45
+ "model.language_model.layers.10.linear_attn.norm.weight": "model-00002-of-00004.safetensors",
46
+ "model.language_model.layers.10.linear_attn.out_proj.weight": "model-00002-of-00004.safetensors",
47
+ "model.language_model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
48
+ "model.language_model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
49
+ "model.language_model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
50
+ "model.language_model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
51
+ "model.language_model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors",
52
+ "model.language_model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
53
+ "model.language_model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
54
+ "model.language_model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
55
+ "model.language_model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
56
+ "model.language_model.layers.11.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
57
+ "model.language_model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
58
+ "model.language_model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
59
+ "model.language_model.layers.11.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
60
+ "model.language_model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
61
+ "model.language_model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
62
+ "model.language_model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors",
63
+ "model.language_model.layers.12.linear_attn.A_log": "model-00002-of-00004.safetensors",
64
+ "model.language_model.layers.12.linear_attn.conv1d.weight": "model-00002-of-00004.safetensors",
65
+ "model.language_model.layers.12.linear_attn.dt_bias": "model-00002-of-00004.safetensors",
66
+ "model.language_model.layers.12.linear_attn.in_proj_a.weight": "model-00002-of-00004.safetensors",
67
+ "model.language_model.layers.12.linear_attn.in_proj_b.weight": "model-00002-of-00004.safetensors",
68
+ "model.language_model.layers.12.linear_attn.in_proj_qkv.weight": "model-00002-of-00004.safetensors",
69
+ "model.language_model.layers.12.linear_attn.in_proj_z.weight": "model-00002-of-00004.safetensors",
70
+ "model.language_model.layers.12.linear_attn.norm.weight": "model-00002-of-00004.safetensors",
71
+ "model.language_model.layers.12.linear_attn.out_proj.weight": "model-00002-of-00004.safetensors",
72
+ "model.language_model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
73
+ "model.language_model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
74
+ "model.language_model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
75
+ "model.language_model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
76
+ "model.language_model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors",
77
+ "model.language_model.layers.13.linear_attn.A_log": "model-00002-of-00004.safetensors",
78
+ "model.language_model.layers.13.linear_attn.conv1d.weight": "model-00002-of-00004.safetensors",
79
+ "model.language_model.layers.13.linear_attn.dt_bias": "model-00002-of-00004.safetensors",
80
+ "model.language_model.layers.13.linear_attn.in_proj_a.weight": "model-00002-of-00004.safetensors",
81
+ "model.language_model.layers.13.linear_attn.in_proj_b.weight": "model-00002-of-00004.safetensors",
82
+ "model.language_model.layers.13.linear_attn.in_proj_qkv.weight": "model-00002-of-00004.safetensors",
83
+ "model.language_model.layers.13.linear_attn.in_proj_z.weight": "model-00002-of-00004.safetensors",
84
+ "model.language_model.layers.13.linear_attn.norm.weight": "model-00002-of-00004.safetensors",
85
+ "model.language_model.layers.13.linear_attn.out_proj.weight": "model-00002-of-00004.safetensors",
86
+ "model.language_model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
87
+ "model.language_model.layers.13.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
88
+ "model.language_model.layers.13.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
89
+ "model.language_model.layers.13.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
90
+ "model.language_model.layers.14.input_layernorm.weight": "model-00003-of-00004.safetensors",
91
+ "model.language_model.layers.14.linear_attn.A_log": "model-00003-of-00004.safetensors",
92
+ "model.language_model.layers.14.linear_attn.conv1d.weight": "model-00003-of-00004.safetensors",
93
+ "model.language_model.layers.14.linear_attn.dt_bias": "model-00003-of-00004.safetensors",
94
+ "model.language_model.layers.14.linear_attn.in_proj_a.weight": "model-00003-of-00004.safetensors",
95
+ "model.language_model.layers.14.linear_attn.in_proj_b.weight": "model-00003-of-00004.safetensors",
96
+ "model.language_model.layers.14.linear_attn.in_proj_qkv.weight": "model-00003-of-00004.safetensors",
97
+ "model.language_model.layers.14.linear_attn.in_proj_z.weight": "model-00003-of-00004.safetensors",
98
+ "model.language_model.layers.14.linear_attn.norm.weight": "model-00003-of-00004.safetensors",
99
+ "model.language_model.layers.14.linear_attn.out_proj.weight": "model-00003-of-00004.safetensors",
100
+ "model.language_model.layers.14.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
101
+ "model.language_model.layers.14.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
102
+ "model.language_model.layers.14.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
103
+ "model.language_model.layers.14.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
104
+ "model.language_model.layers.15.input_layernorm.weight": "model-00003-of-00004.safetensors",
105
+ "model.language_model.layers.15.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
106
+ "model.language_model.layers.15.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
107
+ "model.language_model.layers.15.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
108
+ "model.language_model.layers.15.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
109
+ "model.language_model.layers.15.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
110
+ "model.language_model.layers.15.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
111
+ "model.language_model.layers.15.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
112
+ "model.language_model.layers.15.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
113
+ "model.language_model.layers.15.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
114
+ "model.language_model.layers.15.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
115
+ "model.language_model.layers.16.input_layernorm.weight": "model-00003-of-00004.safetensors",
116
+ "model.language_model.layers.16.linear_attn.A_log": "model-00003-of-00004.safetensors",
117
+ "model.language_model.layers.16.linear_attn.conv1d.weight": "model-00003-of-00004.safetensors",
118
+ "model.language_model.layers.16.linear_attn.dt_bias": "model-00003-of-00004.safetensors",
119
+ "model.language_model.layers.16.linear_attn.in_proj_a.weight": "model-00003-of-00004.safetensors",
120
+ "model.language_model.layers.16.linear_attn.in_proj_b.weight": "model-00003-of-00004.safetensors",
121
+ "model.language_model.layers.16.linear_attn.in_proj_qkv.weight": "model-00003-of-00004.safetensors",
122
+ "model.language_model.layers.16.linear_attn.in_proj_z.weight": "model-00003-of-00004.safetensors",
123
+ "model.language_model.layers.16.linear_attn.norm.weight": "model-00003-of-00004.safetensors",
124
+ "model.language_model.layers.16.linear_attn.out_proj.weight": "model-00003-of-00004.safetensors",
125
+ "model.language_model.layers.16.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
126
+ "model.language_model.layers.16.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
127
+ "model.language_model.layers.16.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
128
+ "model.language_model.layers.16.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
129
+ "model.language_model.layers.17.input_layernorm.weight": "model-00003-of-00004.safetensors",
130
+ "model.language_model.layers.17.linear_attn.A_log": "model-00003-of-00004.safetensors",
131
+ "model.language_model.layers.17.linear_attn.conv1d.weight": "model-00003-of-00004.safetensors",
132
+ "model.language_model.layers.17.linear_attn.dt_bias": "model-00003-of-00004.safetensors",
133
+ "model.language_model.layers.17.linear_attn.in_proj_a.weight": "model-00003-of-00004.safetensors",
134
+ "model.language_model.layers.17.linear_attn.in_proj_b.weight": "model-00003-of-00004.safetensors",
135
+ "model.language_model.layers.17.linear_attn.in_proj_qkv.weight": "model-00003-of-00004.safetensors",
136
+ "model.language_model.layers.17.linear_attn.in_proj_z.weight": "model-00003-of-00004.safetensors",
137
+ "model.language_model.layers.17.linear_attn.norm.weight": "model-00003-of-00004.safetensors",
138
+ "model.language_model.layers.17.linear_attn.out_proj.weight": "model-00003-of-00004.safetensors",
139
+ "model.language_model.layers.17.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
140
+ "model.language_model.layers.17.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
141
+ "model.language_model.layers.17.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
142
+ "model.language_model.layers.17.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
143
+ "model.language_model.layers.18.input_layernorm.weight": "model-00003-of-00004.safetensors",
144
+ "model.language_model.layers.18.linear_attn.A_log": "model-00003-of-00004.safetensors",
145
+ "model.language_model.layers.18.linear_attn.conv1d.weight": "model-00003-of-00004.safetensors",
146
+ "model.language_model.layers.18.linear_attn.dt_bias": "model-00003-of-00004.safetensors",
147
+ "model.language_model.layers.18.linear_attn.in_proj_a.weight": "model-00003-of-00004.safetensors",
148
+ "model.language_model.layers.18.linear_attn.in_proj_b.weight": "model-00003-of-00004.safetensors",
149
+ "model.language_model.layers.18.linear_attn.in_proj_qkv.weight": "model-00003-of-00004.safetensors",
150
+ "model.language_model.layers.18.linear_attn.in_proj_z.weight": "model-00003-of-00004.safetensors",
151
+ "model.language_model.layers.18.linear_attn.norm.weight": "model-00003-of-00004.safetensors",
152
+ "model.language_model.layers.18.linear_attn.out_proj.weight": "model-00003-of-00004.safetensors",
153
+ "model.language_model.layers.18.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
154
+ "model.language_model.layers.18.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
155
+ "model.language_model.layers.18.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
156
+ "model.language_model.layers.18.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
157
+ "model.language_model.layers.19.input_layernorm.weight": "model-00003-of-00004.safetensors",
158
+ "model.language_model.layers.19.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
159
+ "model.language_model.layers.19.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
160
+ "model.language_model.layers.19.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
161
+ "model.language_model.layers.19.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
162
+ "model.language_model.layers.19.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
163
+ "model.language_model.layers.19.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
164
+ "model.language_model.layers.19.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
165
+ "model.language_model.layers.19.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
166
+ "model.language_model.layers.19.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
167
+ "model.language_model.layers.19.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
168
+ "model.language_model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
169
+ "model.language_model.layers.2.linear_attn.A_log": "model-00001-of-00004.safetensors",
170
+ "model.language_model.layers.2.linear_attn.conv1d.weight": "model-00001-of-00004.safetensors",
171
+ "model.language_model.layers.2.linear_attn.dt_bias": "model-00001-of-00004.safetensors",
172
+ "model.language_model.layers.2.linear_attn.in_proj_a.weight": "model-00001-of-00004.safetensors",
173
+ "model.language_model.layers.2.linear_attn.in_proj_b.weight": "model-00001-of-00004.safetensors",
174
+ "model.language_model.layers.2.linear_attn.in_proj_qkv.weight": "model-00002-of-00004.safetensors",
175
+ "model.language_model.layers.2.linear_attn.in_proj_z.weight": "model-00002-of-00004.safetensors",
176
+ "model.language_model.layers.2.linear_attn.norm.weight": "model-00002-of-00004.safetensors",
177
+ "model.language_model.layers.2.linear_attn.out_proj.weight": "model-00002-of-00004.safetensors",
178
+ "model.language_model.layers.2.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
179
+ "model.language_model.layers.2.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
180
+ "model.language_model.layers.2.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
181
+ "model.language_model.layers.2.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
182
+ "model.language_model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors",
183
+ "model.language_model.layers.20.linear_attn.A_log": "model-00003-of-00004.safetensors",
184
+ "model.language_model.layers.20.linear_attn.conv1d.weight": "model-00003-of-00004.safetensors",
185
+ "model.language_model.layers.20.linear_attn.dt_bias": "model-00003-of-00004.safetensors",
186
+ "model.language_model.layers.20.linear_attn.in_proj_a.weight": "model-00003-of-00004.safetensors",
187
+ "model.language_model.layers.20.linear_attn.in_proj_b.weight": "model-00003-of-00004.safetensors",
188
+ "model.language_model.layers.20.linear_attn.in_proj_qkv.weight": "model-00003-of-00004.safetensors",
189
+ "model.language_model.layers.20.linear_attn.in_proj_z.weight": "model-00003-of-00004.safetensors",
190
+ "model.language_model.layers.20.linear_attn.norm.weight": "model-00003-of-00004.safetensors",
191
+ "model.language_model.layers.20.linear_attn.out_proj.weight": "model-00003-of-00004.safetensors",
192
+ "model.language_model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
193
+ "model.language_model.layers.20.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
194
+ "model.language_model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
195
+ "model.language_model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
196
+ "model.language_model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors",
197
+ "model.language_model.layers.21.linear_attn.A_log": "model-00003-of-00004.safetensors",
198
+ "model.language_model.layers.21.linear_attn.conv1d.weight": "model-00003-of-00004.safetensors",
199
+ "model.language_model.layers.21.linear_attn.dt_bias": "model-00003-of-00004.safetensors",
200
+ "model.language_model.layers.21.linear_attn.in_proj_a.weight": "model-00003-of-00004.safetensors",
201
+ "model.language_model.layers.21.linear_attn.in_proj_b.weight": "model-00003-of-00004.safetensors",
202
+ "model.language_model.layers.21.linear_attn.in_proj_qkv.weight": "model-00003-of-00004.safetensors",
203
+ "model.language_model.layers.21.linear_attn.in_proj_z.weight": "model-00003-of-00004.safetensors",
204
+ "model.language_model.layers.21.linear_attn.norm.weight": "model-00003-of-00004.safetensors",
205
+ "model.language_model.layers.21.linear_attn.out_proj.weight": "model-00003-of-00004.safetensors",
206
+ "model.language_model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
207
+ "model.language_model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
208
+ "model.language_model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
209
+ "model.language_model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
210
+ "model.language_model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors",
211
+ "model.language_model.layers.22.linear_attn.A_log": "model-00003-of-00004.safetensors",
212
+ "model.language_model.layers.22.linear_attn.conv1d.weight": "model-00003-of-00004.safetensors",
213
+ "model.language_model.layers.22.linear_attn.dt_bias": "model-00003-of-00004.safetensors",
214
+ "model.language_model.layers.22.linear_attn.in_proj_a.weight": "model-00003-of-00004.safetensors",
215
+ "model.language_model.layers.22.linear_attn.in_proj_b.weight": "model-00003-of-00004.safetensors",
216
+ "model.language_model.layers.22.linear_attn.in_proj_qkv.weight": "model-00003-of-00004.safetensors",
217
+ "model.language_model.layers.22.linear_attn.in_proj_z.weight": "model-00003-of-00004.safetensors",
218
+ "model.language_model.layers.22.linear_attn.norm.weight": "model-00003-of-00004.safetensors",
219
+ "model.language_model.layers.22.linear_attn.out_proj.weight": "model-00003-of-00004.safetensors",
220
+ "model.language_model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
221
+ "model.language_model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
222
+ "model.language_model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
223
+ "model.language_model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
224
+ "model.language_model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors",
225
+ "model.language_model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
226
+ "model.language_model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
227
+ "model.language_model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
228
+ "model.language_model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
229
+ "model.language_model.layers.23.self_attn.k_norm.weight": "model-00003-of-00004.safetensors",
230
+ "model.language_model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
231
+ "model.language_model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
232
+ "model.language_model.layers.23.self_attn.q_norm.weight": "model-00003-of-00004.safetensors",
233
+ "model.language_model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
234
+ "model.language_model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
235
+ "model.language_model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors",
236
+ "model.language_model.layers.24.linear_attn.A_log": "model-00003-of-00004.safetensors",
237
+ "model.language_model.layers.24.linear_attn.conv1d.weight": "model-00003-of-00004.safetensors",
238
+ "model.language_model.layers.24.linear_attn.dt_bias": "model-00003-of-00004.safetensors",
239
+ "model.language_model.layers.24.linear_attn.in_proj_a.weight": "model-00003-of-00004.safetensors",
240
+ "model.language_model.layers.24.linear_attn.in_proj_b.weight": "model-00003-of-00004.safetensors",
241
+ "model.language_model.layers.24.linear_attn.in_proj_qkv.weight": "model-00003-of-00004.safetensors",
242
+ "model.language_model.layers.24.linear_attn.in_proj_z.weight": "model-00003-of-00004.safetensors",
243
+ "model.language_model.layers.24.linear_attn.norm.weight": "model-00003-of-00004.safetensors",
244
+ "model.language_model.layers.24.linear_attn.out_proj.weight": "model-00003-of-00004.safetensors",
245
+ "model.language_model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
246
+ "model.language_model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
247
+ "model.language_model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
248
+ "model.language_model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
249
+ "model.language_model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
250
+ "model.language_model.layers.25.linear_attn.A_log": "model-00003-of-00004.safetensors",
251
+ "model.language_model.layers.25.linear_attn.conv1d.weight": "model-00003-of-00004.safetensors",
252
+ "model.language_model.layers.25.linear_attn.dt_bias": "model-00003-of-00004.safetensors",
253
+ "model.language_model.layers.25.linear_attn.in_proj_a.weight": "model-00003-of-00004.safetensors",
254
+ "model.language_model.layers.25.linear_attn.in_proj_b.weight": "model-00003-of-00004.safetensors",
255
+ "model.language_model.layers.25.linear_attn.in_proj_qkv.weight": "model-00004-of-00004.safetensors",
256
+ "model.language_model.layers.25.linear_attn.in_proj_z.weight": "model-00004-of-00004.safetensors",
257
+ "model.language_model.layers.25.linear_attn.norm.weight": "model-00004-of-00004.safetensors",
258
+ "model.language_model.layers.25.linear_attn.out_proj.weight": "model-00004-of-00004.safetensors",
259
+ "model.language_model.layers.25.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
260
+ "model.language_model.layers.25.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
261
+ "model.language_model.layers.25.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
262
+ "model.language_model.layers.25.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
263
+ "model.language_model.layers.26.input_layernorm.weight": "model-00004-of-00004.safetensors",
264
+ "model.language_model.layers.26.linear_attn.A_log": "model-00004-of-00004.safetensors",
265
+ "model.language_model.layers.26.linear_attn.conv1d.weight": "model-00004-of-00004.safetensors",
266
+ "model.language_model.layers.26.linear_attn.dt_bias": "model-00004-of-00004.safetensors",
267
+ "model.language_model.layers.26.linear_attn.in_proj_a.weight": "model-00004-of-00004.safetensors",
268
+ "model.language_model.layers.26.linear_attn.in_proj_b.weight": "model-00004-of-00004.safetensors",
269
+ "model.language_model.layers.26.linear_attn.in_proj_qkv.weight": "model-00004-of-00004.safetensors",
270
+ "model.language_model.layers.26.linear_attn.in_proj_z.weight": "model-00004-of-00004.safetensors",
271
+ "model.language_model.layers.26.linear_attn.norm.weight": "model-00004-of-00004.safetensors",
272
+ "model.language_model.layers.26.linear_attn.out_proj.weight": "model-00004-of-00004.safetensors",
273
+ "model.language_model.layers.26.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
274
+ "model.language_model.layers.26.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
275
+ "model.language_model.layers.26.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
276
+ "model.language_model.layers.26.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
277
+ "model.language_model.layers.27.input_layernorm.weight": "model-00004-of-00004.safetensors",
278
+ "model.language_model.layers.27.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
279
+ "model.language_model.layers.27.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
280
+ "model.language_model.layers.27.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
281
+ "model.language_model.layers.27.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
282
+ "model.language_model.layers.27.self_attn.k_norm.weight": "model-00004-of-00004.safetensors",
283
+ "model.language_model.layers.27.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
284
+ "model.language_model.layers.27.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
285
+ "model.language_model.layers.27.self_attn.q_norm.weight": "model-00004-of-00004.safetensors",
286
+ "model.language_model.layers.27.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
287
+ "model.language_model.layers.27.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
288
+ "model.language_model.layers.28.input_layernorm.weight": "model-00004-of-00004.safetensors",
289
+ "model.language_model.layers.28.linear_attn.A_log": "model-00004-of-00004.safetensors",
290
+ "model.language_model.layers.28.linear_attn.conv1d.weight": "model-00004-of-00004.safetensors",
291
+ "model.language_model.layers.28.linear_attn.dt_bias": "model-00004-of-00004.safetensors",
292
+ "model.language_model.layers.28.linear_attn.in_proj_a.weight": "model-00004-of-00004.safetensors",
293
+ "model.language_model.layers.28.linear_attn.in_proj_b.weight": "model-00004-of-00004.safetensors",
294
+ "model.language_model.layers.28.linear_attn.in_proj_qkv.weight": "model-00004-of-00004.safetensors",
295
+ "model.language_model.layers.28.linear_attn.in_proj_z.weight": "model-00004-of-00004.safetensors",
296
+ "model.language_model.layers.28.linear_attn.norm.weight": "model-00004-of-00004.safetensors",
297
+ "model.language_model.layers.28.linear_attn.out_proj.weight": "model-00004-of-00004.safetensors",
298
+ "model.language_model.layers.28.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
299
+ "model.language_model.layers.28.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
300
+ "model.language_model.layers.28.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
301
+ "model.language_model.layers.28.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
302
+ "model.language_model.layers.29.input_layernorm.weight": "model-00004-of-00004.safetensors",
303
+ "model.language_model.layers.29.linear_attn.A_log": "model-00004-of-00004.safetensors",
304
+ "model.language_model.layers.29.linear_attn.conv1d.weight": "model-00004-of-00004.safetensors",
305
+ "model.language_model.layers.29.linear_attn.dt_bias": "model-00004-of-00004.safetensors",
306
+ "model.language_model.layers.29.linear_attn.in_proj_a.weight": "model-00004-of-00004.safetensors",
307
+ "model.language_model.layers.29.linear_attn.in_proj_b.weight": "model-00004-of-00004.safetensors",
308
+ "model.language_model.layers.29.linear_attn.in_proj_qkv.weight": "model-00004-of-00004.safetensors",
309
+ "model.language_model.layers.29.linear_attn.in_proj_z.weight": "model-00004-of-00004.safetensors",
310
+ "model.language_model.layers.29.linear_attn.norm.weight": "model-00004-of-00004.safetensors",
311
+ "model.language_model.layers.29.linear_attn.out_proj.weight": "model-00004-of-00004.safetensors",
312
+ "model.language_model.layers.29.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
313
+ "model.language_model.layers.29.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
314
+ "model.language_model.layers.29.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
315
+ "model.language_model.layers.29.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
316
+ "model.language_model.layers.3.input_layernorm.weight": "model-00002-of-00004.safetensors",
317
+ "model.language_model.layers.3.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
318
+ "model.language_model.layers.3.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
319
+ "model.language_model.layers.3.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
320
+ "model.language_model.layers.3.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
321
+ "model.language_model.layers.3.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
322
+ "model.language_model.layers.3.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
323
+ "model.language_model.layers.3.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
324
+ "model.language_model.layers.3.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
325
+ "model.language_model.layers.3.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
326
+ "model.language_model.layers.3.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
327
+ "model.language_model.layers.30.input_layernorm.weight": "model-00004-of-00004.safetensors",
328
+ "model.language_model.layers.30.linear_attn.A_log": "model-00004-of-00004.safetensors",
329
+ "model.language_model.layers.30.linear_attn.conv1d.weight": "model-00004-of-00004.safetensors",
330
+ "model.language_model.layers.30.linear_attn.dt_bias": "model-00004-of-00004.safetensors",
331
+ "model.language_model.layers.30.linear_attn.in_proj_a.weight": "model-00004-of-00004.safetensors",
332
+ "model.language_model.layers.30.linear_attn.in_proj_b.weight": "model-00004-of-00004.safetensors",
333
+ "model.language_model.layers.30.linear_attn.in_proj_qkv.weight": "model-00004-of-00004.safetensors",
334
+ "model.language_model.layers.30.linear_attn.in_proj_z.weight": "model-00004-of-00004.safetensors",
335
+ "model.language_model.layers.30.linear_attn.norm.weight": "model-00004-of-00004.safetensors",
336
+ "model.language_model.layers.30.linear_attn.out_proj.weight": "model-00004-of-00004.safetensors",
337
+ "model.language_model.layers.30.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
338
+ "model.language_model.layers.30.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
339
+ "model.language_model.layers.30.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
340
+ "model.language_model.layers.30.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
341
+ "model.language_model.layers.31.input_layernorm.weight": "model-00004-of-00004.safetensors",
342
+ "model.language_model.layers.31.mlp.down_proj.weight": "model-00004-of-00004.safetensors",
343
+ "model.language_model.layers.31.mlp.gate_proj.weight": "model-00004-of-00004.safetensors",
344
+ "model.language_model.layers.31.mlp.up_proj.weight": "model-00004-of-00004.safetensors",
345
+ "model.language_model.layers.31.post_attention_layernorm.weight": "model-00004-of-00004.safetensors",
346
+ "model.language_model.layers.31.self_attn.k_norm.weight": "model-00004-of-00004.safetensors",
347
+ "model.language_model.layers.31.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
348
+ "model.language_model.layers.31.self_attn.o_proj.weight": "model-00004-of-00004.safetensors",
349
+ "model.language_model.layers.31.self_attn.q_norm.weight": "model-00004-of-00004.safetensors",
350
+ "model.language_model.layers.31.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
351
+ "model.language_model.layers.31.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
352
+ "model.language_model.layers.4.input_layernorm.weight": "model-00002-of-00004.safetensors",
353
+ "model.language_model.layers.4.linear_attn.A_log": "model-00002-of-00004.safetensors",
354
+ "model.language_model.layers.4.linear_attn.conv1d.weight": "model-00002-of-00004.safetensors",
355
+ "model.language_model.layers.4.linear_attn.dt_bias": "model-00002-of-00004.safetensors",
356
+ "model.language_model.layers.4.linear_attn.in_proj_a.weight": "model-00002-of-00004.safetensors",
357
+ "model.language_model.layers.4.linear_attn.in_proj_b.weight": "model-00002-of-00004.safetensors",
358
+ "model.language_model.layers.4.linear_attn.in_proj_qkv.weight": "model-00002-of-00004.safetensors",
359
+ "model.language_model.layers.4.linear_attn.in_proj_z.weight": "model-00002-of-00004.safetensors",
360
+ "model.language_model.layers.4.linear_attn.norm.weight": "model-00002-of-00004.safetensors",
361
+ "model.language_model.layers.4.linear_attn.out_proj.weight": "model-00002-of-00004.safetensors",
362
+ "model.language_model.layers.4.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
363
+ "model.language_model.layers.4.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
364
+ "model.language_model.layers.4.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
365
+ "model.language_model.layers.4.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
366
+ "model.language_model.layers.5.input_layernorm.weight": "model-00002-of-00004.safetensors",
367
+ "model.language_model.layers.5.linear_attn.A_log": "model-00002-of-00004.safetensors",
368
+ "model.language_model.layers.5.linear_attn.conv1d.weight": "model-00002-of-00004.safetensors",
369
+ "model.language_model.layers.5.linear_attn.dt_bias": "model-00002-of-00004.safetensors",
370
+ "model.language_model.layers.5.linear_attn.in_proj_a.weight": "model-00002-of-00004.safetensors",
371
+ "model.language_model.layers.5.linear_attn.in_proj_b.weight": "model-00002-of-00004.safetensors",
372
+ "model.language_model.layers.5.linear_attn.in_proj_qkv.weight": "model-00002-of-00004.safetensors",
373
+ "model.language_model.layers.5.linear_attn.in_proj_z.weight": "model-00002-of-00004.safetensors",
374
+ "model.language_model.layers.5.linear_attn.norm.weight": "model-00002-of-00004.safetensors",
375
+ "model.language_model.layers.5.linear_attn.out_proj.weight": "model-00002-of-00004.safetensors",
376
+ "model.language_model.layers.5.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
377
+ "model.language_model.layers.5.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
378
+ "model.language_model.layers.5.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
379
+ "model.language_model.layers.5.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
380
+ "model.language_model.layers.6.input_layernorm.weight": "model-00002-of-00004.safetensors",
381
+ "model.language_model.layers.6.linear_attn.A_log": "model-00002-of-00004.safetensors",
382
+ "model.language_model.layers.6.linear_attn.conv1d.weight": "model-00002-of-00004.safetensors",
383
+ "model.language_model.layers.6.linear_attn.dt_bias": "model-00002-of-00004.safetensors",
384
+ "model.language_model.layers.6.linear_attn.in_proj_a.weight": "model-00002-of-00004.safetensors",
385
+ "model.language_model.layers.6.linear_attn.in_proj_b.weight": "model-00002-of-00004.safetensors",
386
+ "model.language_model.layers.6.linear_attn.in_proj_qkv.weight": "model-00002-of-00004.safetensors",
387
+ "model.language_model.layers.6.linear_attn.in_proj_z.weight": "model-00002-of-00004.safetensors",
388
+ "model.language_model.layers.6.linear_attn.norm.weight": "model-00002-of-00004.safetensors",
389
+ "model.language_model.layers.6.linear_attn.out_proj.weight": "model-00002-of-00004.safetensors",
390
+ "model.language_model.layers.6.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
391
+ "model.language_model.layers.6.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
392
+ "model.language_model.layers.6.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
393
+ "model.language_model.layers.6.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
394
+ "model.language_model.layers.7.input_layernorm.weight": "model-00002-of-00004.safetensors",
395
+ "model.language_model.layers.7.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
396
+ "model.language_model.layers.7.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
397
+ "model.language_model.layers.7.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
398
+ "model.language_model.layers.7.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
399
+ "model.language_model.layers.7.self_attn.k_norm.weight": "model-00002-of-00004.safetensors",
400
+ "model.language_model.layers.7.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
401
+ "model.language_model.layers.7.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
402
+ "model.language_model.layers.7.self_attn.q_norm.weight": "model-00002-of-00004.safetensors",
403
+ "model.language_model.layers.7.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
404
+ "model.language_model.layers.7.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
405
+ "model.language_model.layers.8.input_layernorm.weight": "model-00002-of-00004.safetensors",
406
+ "model.language_model.layers.8.linear_attn.A_log": "model-00002-of-00004.safetensors",
407
+ "model.language_model.layers.8.linear_attn.conv1d.weight": "model-00002-of-00004.safetensors",
408
+ "model.language_model.layers.8.linear_attn.dt_bias": "model-00002-of-00004.safetensors",
409
+ "model.language_model.layers.8.linear_attn.in_proj_a.weight": "model-00002-of-00004.safetensors",
410
+ "model.language_model.layers.8.linear_attn.in_proj_b.weight": "model-00002-of-00004.safetensors",
411
+ "model.language_model.layers.8.linear_attn.in_proj_qkv.weight": "model-00002-of-00004.safetensors",
412
+ "model.language_model.layers.8.linear_attn.in_proj_z.weight": "model-00002-of-00004.safetensors",
413
+ "model.language_model.layers.8.linear_attn.norm.weight": "model-00002-of-00004.safetensors",
414
+ "model.language_model.layers.8.linear_attn.out_proj.weight": "model-00002-of-00004.safetensors",
415
+ "model.language_model.layers.8.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
416
+ "model.language_model.layers.8.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
417
+ "model.language_model.layers.8.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
418
+ "model.language_model.layers.8.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
419
+ "model.language_model.layers.9.input_layernorm.weight": "model-00002-of-00004.safetensors",
420
+ "model.language_model.layers.9.linear_attn.A_log": "model-00002-of-00004.safetensors",
421
+ "model.language_model.layers.9.linear_attn.conv1d.weight": "model-00002-of-00004.safetensors",
422
+ "model.language_model.layers.9.linear_attn.dt_bias": "model-00002-of-00004.safetensors",
423
+ "model.language_model.layers.9.linear_attn.in_proj_a.weight": "model-00002-of-00004.safetensors",
424
+ "model.language_model.layers.9.linear_attn.in_proj_b.weight": "model-00002-of-00004.safetensors",
425
+ "model.language_model.layers.9.linear_attn.in_proj_qkv.weight": "model-00002-of-00004.safetensors",
426
+ "model.language_model.layers.9.linear_attn.in_proj_z.weight": "model-00002-of-00004.safetensors",
427
+ "model.language_model.layers.9.linear_attn.norm.weight": "model-00002-of-00004.safetensors",
428
+ "model.language_model.layers.9.linear_attn.out_proj.weight": "model-00002-of-00004.safetensors",
429
+ "model.language_model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
430
+ "model.language_model.layers.9.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
431
+ "model.language_model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
432
+ "model.language_model.layers.9.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
433
+ "model.language_model.norm.weight": "model-00004-of-00004.safetensors",
434
+ "model.visual.blocks.0.attn.proj.bias": "model-00004-of-00004.safetensors",
435
+ "model.visual.blocks.0.attn.proj.weight": "model-00004-of-00004.safetensors",
436
+ "model.visual.blocks.0.attn.qkv.bias": "model-00004-of-00004.safetensors",
437
+ "model.visual.blocks.0.attn.qkv.weight": "model-00004-of-00004.safetensors",
438
+ "model.visual.blocks.0.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
439
+ "model.visual.blocks.0.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
440
+ "model.visual.blocks.0.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
441
+ "model.visual.blocks.0.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
442
+ "model.visual.blocks.0.norm1.bias": "model-00004-of-00004.safetensors",
443
+ "model.visual.blocks.0.norm1.weight": "model-00004-of-00004.safetensors",
444
+ "model.visual.blocks.0.norm2.bias": "model-00004-of-00004.safetensors",
445
+ "model.visual.blocks.0.norm2.weight": "model-00004-of-00004.safetensors",
446
+ "model.visual.blocks.1.attn.proj.bias": "model-00004-of-00004.safetensors",
447
+ "model.visual.blocks.1.attn.proj.weight": "model-00004-of-00004.safetensors",
448
+ "model.visual.blocks.1.attn.qkv.bias": "model-00004-of-00004.safetensors",
449
+ "model.visual.blocks.1.attn.qkv.weight": "model-00004-of-00004.safetensors",
450
+ "model.visual.blocks.1.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
451
+ "model.visual.blocks.1.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
452
+ "model.visual.blocks.1.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
453
+ "model.visual.blocks.1.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
454
+ "model.visual.blocks.1.norm1.bias": "model-00004-of-00004.safetensors",
455
+ "model.visual.blocks.1.norm1.weight": "model-00004-of-00004.safetensors",
456
+ "model.visual.blocks.1.norm2.bias": "model-00004-of-00004.safetensors",
457
+ "model.visual.blocks.1.norm2.weight": "model-00004-of-00004.safetensors",
458
+ "model.visual.blocks.10.attn.proj.bias": "model-00004-of-00004.safetensors",
459
+ "model.visual.blocks.10.attn.proj.weight": "model-00004-of-00004.safetensors",
460
+ "model.visual.blocks.10.attn.qkv.bias": "model-00004-of-00004.safetensors",
461
+ "model.visual.blocks.10.attn.qkv.weight": "model-00004-of-00004.safetensors",
462
+ "model.visual.blocks.10.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
463
+ "model.visual.blocks.10.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
464
+ "model.visual.blocks.10.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
465
+ "model.visual.blocks.10.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
466
+ "model.visual.blocks.10.norm1.bias": "model-00004-of-00004.safetensors",
467
+ "model.visual.blocks.10.norm1.weight": "model-00004-of-00004.safetensors",
468
+ "model.visual.blocks.10.norm2.bias": "model-00004-of-00004.safetensors",
469
+ "model.visual.blocks.10.norm2.weight": "model-00004-of-00004.safetensors",
470
+ "model.visual.blocks.11.attn.proj.bias": "model-00004-of-00004.safetensors",
471
+ "model.visual.blocks.11.attn.proj.weight": "model-00004-of-00004.safetensors",
472
+ "model.visual.blocks.11.attn.qkv.bias": "model-00004-of-00004.safetensors",
473
+ "model.visual.blocks.11.attn.qkv.weight": "model-00004-of-00004.safetensors",
474
+ "model.visual.blocks.11.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
475
+ "model.visual.blocks.11.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
476
+ "model.visual.blocks.11.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
477
+ "model.visual.blocks.11.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
478
+ "model.visual.blocks.11.norm1.bias": "model-00004-of-00004.safetensors",
479
+ "model.visual.blocks.11.norm1.weight": "model-00004-of-00004.safetensors",
480
+ "model.visual.blocks.11.norm2.bias": "model-00004-of-00004.safetensors",
481
+ "model.visual.blocks.11.norm2.weight": "model-00004-of-00004.safetensors",
482
+ "model.visual.blocks.12.attn.proj.bias": "model-00004-of-00004.safetensors",
483
+ "model.visual.blocks.12.attn.proj.weight": "model-00004-of-00004.safetensors",
484
+ "model.visual.blocks.12.attn.qkv.bias": "model-00004-of-00004.safetensors",
485
+ "model.visual.blocks.12.attn.qkv.weight": "model-00004-of-00004.safetensors",
486
+ "model.visual.blocks.12.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
487
+ "model.visual.blocks.12.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
488
+ "model.visual.blocks.12.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
489
+ "model.visual.blocks.12.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
490
+ "model.visual.blocks.12.norm1.bias": "model-00004-of-00004.safetensors",
491
+ "model.visual.blocks.12.norm1.weight": "model-00004-of-00004.safetensors",
492
+ "model.visual.blocks.12.norm2.bias": "model-00004-of-00004.safetensors",
493
+ "model.visual.blocks.12.norm2.weight": "model-00004-of-00004.safetensors",
494
+ "model.visual.blocks.13.attn.proj.bias": "model-00004-of-00004.safetensors",
495
+ "model.visual.blocks.13.attn.proj.weight": "model-00004-of-00004.safetensors",
496
+ "model.visual.blocks.13.attn.qkv.bias": "model-00004-of-00004.safetensors",
497
+ "model.visual.blocks.13.attn.qkv.weight": "model-00004-of-00004.safetensors",
498
+ "model.visual.blocks.13.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
499
+ "model.visual.blocks.13.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
500
+ "model.visual.blocks.13.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
501
+ "model.visual.blocks.13.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
502
+ "model.visual.blocks.13.norm1.bias": "model-00004-of-00004.safetensors",
503
+ "model.visual.blocks.13.norm1.weight": "model-00004-of-00004.safetensors",
504
+ "model.visual.blocks.13.norm2.bias": "model-00004-of-00004.safetensors",
505
+ "model.visual.blocks.13.norm2.weight": "model-00004-of-00004.safetensors",
506
+ "model.visual.blocks.14.attn.proj.bias": "model-00004-of-00004.safetensors",
507
+ "model.visual.blocks.14.attn.proj.weight": "model-00004-of-00004.safetensors",
508
+ "model.visual.blocks.14.attn.qkv.bias": "model-00004-of-00004.safetensors",
509
+ "model.visual.blocks.14.attn.qkv.weight": "model-00004-of-00004.safetensors",
510
+ "model.visual.blocks.14.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
511
+ "model.visual.blocks.14.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
512
+ "model.visual.blocks.14.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
513
+ "model.visual.blocks.14.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
514
+ "model.visual.blocks.14.norm1.bias": "model-00004-of-00004.safetensors",
515
+ "model.visual.blocks.14.norm1.weight": "model-00004-of-00004.safetensors",
516
+ "model.visual.blocks.14.norm2.bias": "model-00004-of-00004.safetensors",
517
+ "model.visual.blocks.14.norm2.weight": "model-00004-of-00004.safetensors",
518
+ "model.visual.blocks.15.attn.proj.bias": "model-00004-of-00004.safetensors",
519
+ "model.visual.blocks.15.attn.proj.weight": "model-00004-of-00004.safetensors",
520
+ "model.visual.blocks.15.attn.qkv.bias": "model-00004-of-00004.safetensors",
521
+ "model.visual.blocks.15.attn.qkv.weight": "model-00004-of-00004.safetensors",
522
+ "model.visual.blocks.15.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
523
+ "model.visual.blocks.15.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
524
+ "model.visual.blocks.15.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
525
+ "model.visual.blocks.15.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
526
+ "model.visual.blocks.15.norm1.bias": "model-00004-of-00004.safetensors",
527
+ "model.visual.blocks.15.norm1.weight": "model-00004-of-00004.safetensors",
528
+ "model.visual.blocks.15.norm2.bias": "model-00004-of-00004.safetensors",
529
+ "model.visual.blocks.15.norm2.weight": "model-00004-of-00004.safetensors",
530
+ "model.visual.blocks.16.attn.proj.bias": "model-00004-of-00004.safetensors",
531
+ "model.visual.blocks.16.attn.proj.weight": "model-00004-of-00004.safetensors",
532
+ "model.visual.blocks.16.attn.qkv.bias": "model-00004-of-00004.safetensors",
533
+ "model.visual.blocks.16.attn.qkv.weight": "model-00004-of-00004.safetensors",
534
+ "model.visual.blocks.16.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
535
+ "model.visual.blocks.16.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
536
+ "model.visual.blocks.16.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
537
+ "model.visual.blocks.16.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
538
+ "model.visual.blocks.16.norm1.bias": "model-00004-of-00004.safetensors",
539
+ "model.visual.blocks.16.norm1.weight": "model-00004-of-00004.safetensors",
540
+ "model.visual.blocks.16.norm2.bias": "model-00004-of-00004.safetensors",
541
+ "model.visual.blocks.16.norm2.weight": "model-00004-of-00004.safetensors",
542
+ "model.visual.blocks.17.attn.proj.bias": "model-00004-of-00004.safetensors",
543
+ "model.visual.blocks.17.attn.proj.weight": "model-00004-of-00004.safetensors",
544
+ "model.visual.blocks.17.attn.qkv.bias": "model-00004-of-00004.safetensors",
545
+ "model.visual.blocks.17.attn.qkv.weight": "model-00004-of-00004.safetensors",
546
+ "model.visual.blocks.17.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
547
+ "model.visual.blocks.17.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
548
+ "model.visual.blocks.17.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
549
+ "model.visual.blocks.17.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
550
+ "model.visual.blocks.17.norm1.bias": "model-00004-of-00004.safetensors",
551
+ "model.visual.blocks.17.norm1.weight": "model-00004-of-00004.safetensors",
552
+ "model.visual.blocks.17.norm2.bias": "model-00004-of-00004.safetensors",
553
+ "model.visual.blocks.17.norm2.weight": "model-00004-of-00004.safetensors",
554
+ "model.visual.blocks.18.attn.proj.bias": "model-00004-of-00004.safetensors",
555
+ "model.visual.blocks.18.attn.proj.weight": "model-00004-of-00004.safetensors",
556
+ "model.visual.blocks.18.attn.qkv.bias": "model-00004-of-00004.safetensors",
557
+ "model.visual.blocks.18.attn.qkv.weight": "model-00004-of-00004.safetensors",
558
+ "model.visual.blocks.18.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
559
+ "model.visual.blocks.18.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
560
+ "model.visual.blocks.18.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
561
+ "model.visual.blocks.18.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
562
+ "model.visual.blocks.18.norm1.bias": "model-00004-of-00004.safetensors",
563
+ "model.visual.blocks.18.norm1.weight": "model-00004-of-00004.safetensors",
564
+ "model.visual.blocks.18.norm2.bias": "model-00004-of-00004.safetensors",
565
+ "model.visual.blocks.18.norm2.weight": "model-00004-of-00004.safetensors",
566
+ "model.visual.blocks.19.attn.proj.bias": "model-00004-of-00004.safetensors",
567
+ "model.visual.blocks.19.attn.proj.weight": "model-00004-of-00004.safetensors",
568
+ "model.visual.blocks.19.attn.qkv.bias": "model-00004-of-00004.safetensors",
569
+ "model.visual.blocks.19.attn.qkv.weight": "model-00004-of-00004.safetensors",
570
+ "model.visual.blocks.19.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
571
+ "model.visual.blocks.19.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
572
+ "model.visual.blocks.19.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
573
+ "model.visual.blocks.19.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
574
+ "model.visual.blocks.19.norm1.bias": "model-00004-of-00004.safetensors",
575
+ "model.visual.blocks.19.norm1.weight": "model-00004-of-00004.safetensors",
576
+ "model.visual.blocks.19.norm2.bias": "model-00004-of-00004.safetensors",
577
+ "model.visual.blocks.19.norm2.weight": "model-00004-of-00004.safetensors",
578
+ "model.visual.blocks.2.attn.proj.bias": "model-00004-of-00004.safetensors",
579
+ "model.visual.blocks.2.attn.proj.weight": "model-00004-of-00004.safetensors",
580
+ "model.visual.blocks.2.attn.qkv.bias": "model-00004-of-00004.safetensors",
581
+ "model.visual.blocks.2.attn.qkv.weight": "model-00004-of-00004.safetensors",
582
+ "model.visual.blocks.2.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
583
+ "model.visual.blocks.2.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
584
+ "model.visual.blocks.2.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
585
+ "model.visual.blocks.2.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
586
+ "model.visual.blocks.2.norm1.bias": "model-00004-of-00004.safetensors",
587
+ "model.visual.blocks.2.norm1.weight": "model-00004-of-00004.safetensors",
588
+ "model.visual.blocks.2.norm2.bias": "model-00004-of-00004.safetensors",
589
+ "model.visual.blocks.2.norm2.weight": "model-00004-of-00004.safetensors",
590
+ "model.visual.blocks.20.attn.proj.bias": "model-00004-of-00004.safetensors",
591
+ "model.visual.blocks.20.attn.proj.weight": "model-00004-of-00004.safetensors",
592
+ "model.visual.blocks.20.attn.qkv.bias": "model-00004-of-00004.safetensors",
593
+ "model.visual.blocks.20.attn.qkv.weight": "model-00004-of-00004.safetensors",
594
+ "model.visual.blocks.20.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
595
+ "model.visual.blocks.20.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
596
+ "model.visual.blocks.20.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
597
+ "model.visual.blocks.20.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
598
+ "model.visual.blocks.20.norm1.bias": "model-00004-of-00004.safetensors",
599
+ "model.visual.blocks.20.norm1.weight": "model-00004-of-00004.safetensors",
600
+ "model.visual.blocks.20.norm2.bias": "model-00004-of-00004.safetensors",
601
+ "model.visual.blocks.20.norm2.weight": "model-00004-of-00004.safetensors",
602
+ "model.visual.blocks.21.attn.proj.bias": "model-00004-of-00004.safetensors",
603
+ "model.visual.blocks.21.attn.proj.weight": "model-00004-of-00004.safetensors",
604
+ "model.visual.blocks.21.attn.qkv.bias": "model-00004-of-00004.safetensors",
605
+ "model.visual.blocks.21.attn.qkv.weight": "model-00004-of-00004.safetensors",
606
+ "model.visual.blocks.21.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
607
+ "model.visual.blocks.21.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
608
+ "model.visual.blocks.21.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
609
+ "model.visual.blocks.21.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
610
+ "model.visual.blocks.21.norm1.bias": "model-00004-of-00004.safetensors",
611
+ "model.visual.blocks.21.norm1.weight": "model-00004-of-00004.safetensors",
612
+ "model.visual.blocks.21.norm2.bias": "model-00004-of-00004.safetensors",
613
+ "model.visual.blocks.21.norm2.weight": "model-00004-of-00004.safetensors",
614
+ "model.visual.blocks.22.attn.proj.bias": "model-00004-of-00004.safetensors",
615
+ "model.visual.blocks.22.attn.proj.weight": "model-00004-of-00004.safetensors",
616
+ "model.visual.blocks.22.attn.qkv.bias": "model-00004-of-00004.safetensors",
617
+ "model.visual.blocks.22.attn.qkv.weight": "model-00004-of-00004.safetensors",
618
+ "model.visual.blocks.22.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
619
+ "model.visual.blocks.22.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
620
+ "model.visual.blocks.22.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
621
+ "model.visual.blocks.22.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
622
+ "model.visual.blocks.22.norm1.bias": "model-00004-of-00004.safetensors",
623
+ "model.visual.blocks.22.norm1.weight": "model-00004-of-00004.safetensors",
624
+ "model.visual.blocks.22.norm2.bias": "model-00004-of-00004.safetensors",
625
+ "model.visual.blocks.22.norm2.weight": "model-00004-of-00004.safetensors",
626
+ "model.visual.blocks.23.attn.proj.bias": "model-00004-of-00004.safetensors",
627
+ "model.visual.blocks.23.attn.proj.weight": "model-00004-of-00004.safetensors",
628
+ "model.visual.blocks.23.attn.qkv.bias": "model-00004-of-00004.safetensors",
629
+ "model.visual.blocks.23.attn.qkv.weight": "model-00004-of-00004.safetensors",
630
+ "model.visual.blocks.23.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
631
+ "model.visual.blocks.23.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
632
+ "model.visual.blocks.23.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
633
+ "model.visual.blocks.23.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
634
+ "model.visual.blocks.23.norm1.bias": "model-00004-of-00004.safetensors",
635
+ "model.visual.blocks.23.norm1.weight": "model-00004-of-00004.safetensors",
636
+ "model.visual.blocks.23.norm2.bias": "model-00004-of-00004.safetensors",
637
+ "model.visual.blocks.23.norm2.weight": "model-00004-of-00004.safetensors",
638
+ "model.visual.blocks.24.attn.proj.bias": "model-00004-of-00004.safetensors",
639
+ "model.visual.blocks.24.attn.proj.weight": "model-00004-of-00004.safetensors",
640
+ "model.visual.blocks.24.attn.qkv.bias": "model-00004-of-00004.safetensors",
641
+ "model.visual.blocks.24.attn.qkv.weight": "model-00004-of-00004.safetensors",
642
+ "model.visual.blocks.24.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
643
+ "model.visual.blocks.24.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
644
+ "model.visual.blocks.24.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
645
+ "model.visual.blocks.24.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
646
+ "model.visual.blocks.24.norm1.bias": "model-00004-of-00004.safetensors",
647
+ "model.visual.blocks.24.norm1.weight": "model-00004-of-00004.safetensors",
648
+ "model.visual.blocks.24.norm2.bias": "model-00004-of-00004.safetensors",
649
+ "model.visual.blocks.24.norm2.weight": "model-00004-of-00004.safetensors",
650
+ "model.visual.blocks.25.attn.proj.bias": "model-00004-of-00004.safetensors",
651
+ "model.visual.blocks.25.attn.proj.weight": "model-00004-of-00004.safetensors",
652
+ "model.visual.blocks.25.attn.qkv.bias": "model-00004-of-00004.safetensors",
653
+ "model.visual.blocks.25.attn.qkv.weight": "model-00004-of-00004.safetensors",
654
+ "model.visual.blocks.25.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
655
+ "model.visual.blocks.25.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
656
+ "model.visual.blocks.25.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
657
+ "model.visual.blocks.25.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
658
+ "model.visual.blocks.25.norm1.bias": "model-00004-of-00004.safetensors",
659
+ "model.visual.blocks.25.norm1.weight": "model-00004-of-00004.safetensors",
660
+ "model.visual.blocks.25.norm2.bias": "model-00004-of-00004.safetensors",
661
+ "model.visual.blocks.25.norm2.weight": "model-00004-of-00004.safetensors",
662
+ "model.visual.blocks.26.attn.proj.bias": "model-00004-of-00004.safetensors",
663
+ "model.visual.blocks.26.attn.proj.weight": "model-00004-of-00004.safetensors",
664
+ "model.visual.blocks.26.attn.qkv.bias": "model-00004-of-00004.safetensors",
665
+ "model.visual.blocks.26.attn.qkv.weight": "model-00004-of-00004.safetensors",
666
+ "model.visual.blocks.26.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
667
+ "model.visual.blocks.26.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
668
+ "model.visual.blocks.26.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
669
+ "model.visual.blocks.26.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
670
+ "model.visual.blocks.26.norm1.bias": "model-00004-of-00004.safetensors",
671
+ "model.visual.blocks.26.norm1.weight": "model-00004-of-00004.safetensors",
672
+ "model.visual.blocks.26.norm2.bias": "model-00004-of-00004.safetensors",
673
+ "model.visual.blocks.26.norm2.weight": "model-00004-of-00004.safetensors",
674
+ "model.visual.blocks.3.attn.proj.bias": "model-00004-of-00004.safetensors",
675
+ "model.visual.blocks.3.attn.proj.weight": "model-00004-of-00004.safetensors",
676
+ "model.visual.blocks.3.attn.qkv.bias": "model-00004-of-00004.safetensors",
677
+ "model.visual.blocks.3.attn.qkv.weight": "model-00004-of-00004.safetensors",
678
+ "model.visual.blocks.3.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
679
+ "model.visual.blocks.3.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
680
+ "model.visual.blocks.3.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
681
+ "model.visual.blocks.3.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
682
+ "model.visual.blocks.3.norm1.bias": "model-00004-of-00004.safetensors",
683
+ "model.visual.blocks.3.norm1.weight": "model-00004-of-00004.safetensors",
684
+ "model.visual.blocks.3.norm2.bias": "model-00004-of-00004.safetensors",
685
+ "model.visual.blocks.3.norm2.weight": "model-00004-of-00004.safetensors",
686
+ "model.visual.blocks.4.attn.proj.bias": "model-00004-of-00004.safetensors",
687
+ "model.visual.blocks.4.attn.proj.weight": "model-00004-of-00004.safetensors",
688
+ "model.visual.blocks.4.attn.qkv.bias": "model-00004-of-00004.safetensors",
689
+ "model.visual.blocks.4.attn.qkv.weight": "model-00004-of-00004.safetensors",
690
+ "model.visual.blocks.4.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
691
+ "model.visual.blocks.4.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
692
+ "model.visual.blocks.4.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
693
+ "model.visual.blocks.4.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
694
+ "model.visual.blocks.4.norm1.bias": "model-00004-of-00004.safetensors",
695
+ "model.visual.blocks.4.norm1.weight": "model-00004-of-00004.safetensors",
696
+ "model.visual.blocks.4.norm2.bias": "model-00004-of-00004.safetensors",
697
+ "model.visual.blocks.4.norm2.weight": "model-00004-of-00004.safetensors",
698
+ "model.visual.blocks.5.attn.proj.bias": "model-00004-of-00004.safetensors",
699
+ "model.visual.blocks.5.attn.proj.weight": "model-00004-of-00004.safetensors",
700
+ "model.visual.blocks.5.attn.qkv.bias": "model-00004-of-00004.safetensors",
701
+ "model.visual.blocks.5.attn.qkv.weight": "model-00004-of-00004.safetensors",
702
+ "model.visual.blocks.5.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
703
+ "model.visual.blocks.5.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
704
+ "model.visual.blocks.5.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
705
+ "model.visual.blocks.5.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
706
+ "model.visual.blocks.5.norm1.bias": "model-00004-of-00004.safetensors",
707
+ "model.visual.blocks.5.norm1.weight": "model-00004-of-00004.safetensors",
708
+ "model.visual.blocks.5.norm2.bias": "model-00004-of-00004.safetensors",
709
+ "model.visual.blocks.5.norm2.weight": "model-00004-of-00004.safetensors",
710
+ "model.visual.blocks.6.attn.proj.bias": "model-00004-of-00004.safetensors",
711
+ "model.visual.blocks.6.attn.proj.weight": "model-00004-of-00004.safetensors",
712
+ "model.visual.blocks.6.attn.qkv.bias": "model-00004-of-00004.safetensors",
713
+ "model.visual.blocks.6.attn.qkv.weight": "model-00004-of-00004.safetensors",
714
+ "model.visual.blocks.6.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
715
+ "model.visual.blocks.6.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
716
+ "model.visual.blocks.6.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
717
+ "model.visual.blocks.6.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
718
+ "model.visual.blocks.6.norm1.bias": "model-00004-of-00004.safetensors",
719
+ "model.visual.blocks.6.norm1.weight": "model-00004-of-00004.safetensors",
720
+ "model.visual.blocks.6.norm2.bias": "model-00004-of-00004.safetensors",
721
+ "model.visual.blocks.6.norm2.weight": "model-00004-of-00004.safetensors",
722
+ "model.visual.blocks.7.attn.proj.bias": "model-00004-of-00004.safetensors",
723
+ "model.visual.blocks.7.attn.proj.weight": "model-00004-of-00004.safetensors",
724
+ "model.visual.blocks.7.attn.qkv.bias": "model-00004-of-00004.safetensors",
725
+ "model.visual.blocks.7.attn.qkv.weight": "model-00004-of-00004.safetensors",
726
+ "model.visual.blocks.7.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
727
+ "model.visual.blocks.7.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
728
+ "model.visual.blocks.7.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
729
+ "model.visual.blocks.7.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
730
+ "model.visual.blocks.7.norm1.bias": "model-00004-of-00004.safetensors",
731
+ "model.visual.blocks.7.norm1.weight": "model-00004-of-00004.safetensors",
732
+ "model.visual.blocks.7.norm2.bias": "model-00004-of-00004.safetensors",
733
+ "model.visual.blocks.7.norm2.weight": "model-00004-of-00004.safetensors",
734
+ "model.visual.blocks.8.attn.proj.bias": "model-00004-of-00004.safetensors",
735
+ "model.visual.blocks.8.attn.proj.weight": "model-00004-of-00004.safetensors",
736
+ "model.visual.blocks.8.attn.qkv.bias": "model-00004-of-00004.safetensors",
737
+ "model.visual.blocks.8.attn.qkv.weight": "model-00004-of-00004.safetensors",
738
+ "model.visual.blocks.8.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
739
+ "model.visual.blocks.8.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
740
+ "model.visual.blocks.8.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
741
+ "model.visual.blocks.8.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
742
+ "model.visual.blocks.8.norm1.bias": "model-00004-of-00004.safetensors",
743
+ "model.visual.blocks.8.norm1.weight": "model-00004-of-00004.safetensors",
744
+ "model.visual.blocks.8.norm2.bias": "model-00004-of-00004.safetensors",
745
+ "model.visual.blocks.8.norm2.weight": "model-00004-of-00004.safetensors",
746
+ "model.visual.blocks.9.attn.proj.bias": "model-00004-of-00004.safetensors",
747
+ "model.visual.blocks.9.attn.proj.weight": "model-00004-of-00004.safetensors",
748
+ "model.visual.blocks.9.attn.qkv.bias": "model-00004-of-00004.safetensors",
749
+ "model.visual.blocks.9.attn.qkv.weight": "model-00004-of-00004.safetensors",
750
+ "model.visual.blocks.9.mlp.linear_fc1.bias": "model-00004-of-00004.safetensors",
751
+ "model.visual.blocks.9.mlp.linear_fc1.weight": "model-00004-of-00004.safetensors",
752
+ "model.visual.blocks.9.mlp.linear_fc2.bias": "model-00004-of-00004.safetensors",
753
+ "model.visual.blocks.9.mlp.linear_fc2.weight": "model-00004-of-00004.safetensors",
754
+ "model.visual.blocks.9.norm1.bias": "model-00004-of-00004.safetensors",
755
+ "model.visual.blocks.9.norm1.weight": "model-00004-of-00004.safetensors",
756
+ "model.visual.blocks.9.norm2.bias": "model-00004-of-00004.safetensors",
757
+ "model.visual.blocks.9.norm2.weight": "model-00004-of-00004.safetensors",
758
+ "model.visual.merger.linear_fc1.bias": "model-00004-of-00004.safetensors",
759
+ "model.visual.merger.linear_fc1.weight": "model-00004-of-00004.safetensors",
760
+ "model.visual.merger.linear_fc2.bias": "model-00004-of-00004.safetensors",
761
+ "model.visual.merger.linear_fc2.weight": "model-00004-of-00004.safetensors",
762
+ "model.visual.merger.norm.bias": "model-00004-of-00004.safetensors",
763
+ "model.visual.merger.norm.weight": "model-00004-of-00004.safetensors",
764
+ "model.visual.patch_embed.proj.bias": "model-00004-of-00004.safetensors",
765
+ "model.visual.patch_embed.proj.weight": "model-00004-of-00004.safetensors",
766
+ "model.visual.pos_embed.weight": "model-00004-of-00004.safetensors"
767
+ }
768
+ }
processor_config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "max_video_tokens": 768,
48
+ "merge_size": 2,
49
+ "min_frames": 4,
50
+ "patch_size": 16,
51
+ "resample": 3,
52
+ "rescale_factor": 0.00392156862745098,
53
+ "return_metadata": false,
54
+ "size": {
55
+ "longest_edge": 25165824,
56
+ "shortest_edge": 4096
57
+ },
58
+ "temporal_patch_size": 2,
59
+ "video_processor_type": "Qwen3VLVideoProcessor"
60
+ }
61
+ }
serve/SERVE.md ADDED
@@ -0,0 +1,71 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Serve OpenJev Flash 9B
2
+
3
+ This repository holds the merged 16-bit weights at its root, so there is no merge step. Python 3.12 was used for the serving environments. The unchanged helper must hash to `81a22f1b1b8912a465059207ef9f60b7c6c16b4de6372305d867efbe38a1987a` (`shasum -a 256 -c SHA256SUMS` checks every file).
4
+
5
+ ## NVIDIA: vLLM
6
+
7
+ The frozen-10k run used vLLM 0.29.0 on an H100 SXM with online FP8 quantization.
8
+
9
+ ```bash
10
+ python3.12 -m venv .venv-nvidia
11
+ source .venv-nvidia/bin/activate
12
+ python -m pip install 'vllm==0.29.0' 'openai==3.26.0' 'httpx==0.28.1'
13
+ hf download openjev/OpenJev-Flash-9B --local-dir OpenJev-Flash-9B
14
+
15
+ vllm serve ./OpenJev-Flash-9B --host 127.0.0.1 --served-model-name qwen --port 8000 \
16
+ --enable-prefix-caching --max-model-len 16384 --gpu-memory-utilization 0.90 \
17
+ --limit-mm-per-prompt '{"image":1}' --trust-remote-code --max-num-seqs 16 \
18
+ --max-logprobs 64 --gdn-prefill-backend triton --quantization fp8
19
+ ```
20
+
21
+ In a second terminal, activate the same environment and start the decision API:
22
+
23
+ ```bash
24
+ source .venv-nvidia/bin/activate
25
+ VLLM=http://127.0.0.1:8000/v1 TOKENIZER=./OpenJev-Flash-9B SHIM_MODEL=./OpenJev-Flash-9B \
26
+ READOUT_T=1.07 READOUT_NOUL_T=1.074766 READOUT_NOUL_BIAS=0 \
27
+ READOUT_TARGETED=1 READOUT_INSTR_STYLE=pyrepr READOUT_PERMS=1 \
28
+ SHIM_STAGGER=1 SHIM_COMPACT=0 SHIM_COMPACT_CAP=0 SHIM_LAYOUT= SHIM_PAD=0 SHIM_LOOP_BREAK=0 \
29
+ python OpenJev-Flash-9B/helper/shim.py --host 127.0.0.1 --port 3000
30
+ ```
31
+
32
+ Keep `--served-model-name qwen` and `--max-logprobs 64`: the frozen helper requests the exact candidate token scores from that model name. The helper is unchanged, so the environment assignments above select the 9B calibration instead of its built-in defaults. Optional prompt transforms and loop-breaking are disabled for the recorded protocol.
33
+
34
+ ## Apple silicon: MLX 8-bit
35
+
36
+ Use [openjev/OpenJev-Flash-9B-MLX](https://huggingface.co/openjev/OpenJev-Flash-9B-MLX), the 8-bit build (group size 64) behind the JevBench numbers. The MLX environment used MLX 0.32.2, mlx-lm 0.31.3, Transformers 5.17.0, OpenAI 3.16.2 and HTTPX 0.28.1.
37
+
38
+ ```bash
39
+ python3.12 -m venv .venv-mlx
40
+ source .venv-mlx/bin/activate
41
+ python -m pip install 'mlx==0.32.2' 'mlx-lm==0.31.3' \
42
+ 'transformers==5.17.0' 'openai==3.16.2' 'httpx==0.28.1' 'huggingface-hub==1.32.0'
43
+ hf download openjev/OpenJev-Flash-9B-MLX --local-dir mlx8
44
+ hf download openjev/OpenJev-Flash-9B helper/shim.py helper/shim_mlx.py --local-dir api
45
+
46
+ TOKENIZER=./mlx8 SHIM_MODEL=./mlx8 \
47
+ READOUT_T=1.07 READOUT_NOUL_T=1.074766 READOUT_NOUL_BIAS=0 \
48
+ READOUT_TARGETED=1 READOUT_INSTR_STYLE=pyrepr READOUT_PERMS=1 \
49
+ SHIM_STAGGER=1 SHIM_COMPACT=0 SHIM_COMPACT_CAP=0 SHIM_LAYOUT= SHIM_PAD=0 SHIM_LOOP_BREAK=0 \
50
+ python api/helper/shim_mlx.py --helper api/helper/shim.py --model ./mlx8 \
51
+ --host 127.0.0.1 --port 3000
52
+ ```
53
+
54
+ This is the text-only MLX path used for the reported JevBench score. It uses the checkpoint's chat template with thinking disabled and computes full-vocabulary log-softmax at the first output position; the frozen helper selects and calibrates the option probabilities. Keep `--prefix-cache` off to reproduce that path. The shim serializes model calls with a lock; no concurrent-throughput claim is made.
55
+
56
+ For a local choice and yes/no smoke check, use the same command with `--selfcheck` appended. It prints the helper hash and calibration alongside the answers and exits. It is a smoke check, not an evaluation score.
57
+
58
+ ## Check the API
59
+
60
+ ```bash
61
+ curl -s http://127.0.0.1:3000/v1/version
62
+ curl -s http://127.0.0.1:3000/v1/systemone \
63
+ -H 'Content-Type: application/json' \
64
+ -d '{"model":"openjev-flash-9b","state":"The customer was charged twice.","questions":{"route":{"type":"choice","instructions":"Which team should handle this?","criteria":{"billing":null,"shipping":null,"technical":null}}}}'
65
+ ```
66
+
67
+ The version response must show `T: 1.07`, `noul_t: 1.074766`, `noul_bias: 0`, targeted readout enabled, `instr_style: "pyrepr"`, and helper SHA256 beginning `81a22f1b`. The decision response contains `answers.route.choice`, option probabilities and confidence.
68
+
69
+ Choice uses a non-empty option map; yes/no uses `type: "noul"`; score uses `type: "score"` and an ordered array in `criteria`. Each question with up to 52 options is one forward pass. Larger option sets use approximate multi-pass readout. MLX does not support image input or the helper's vLLM chat/prewarm passthrough endpoints.
70
+
71
+ These commands bind both servers to loopback. If exposing the helper, set `SHIM_TOKEN` to a secret supplied by your deployment and send it as `Authorization: Bearer ...`; terminate TLS and enforce request-size limits at your gateway. Keep the model backend private. The frozen helper is a compatibility server, not a complete public API gateway.
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": false,
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
+ }