Maximilian228 commited on
Commit
3db65e3
·
verified ·
1 Parent(s): 85ae109

Qwen3.5-4B Agentic Coder: Q4 pack (GPTQ q4i, MTP, vision), Fewer refusals add-on, card, licence

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ Q4/refusal/refusal.gguf filter=lfs diff=lfs merge=lfs -text
LICENSE ADDED
@@ -0,0 +1,202 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 Alibaba Cloud
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
Q4/dense.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:43ef6d124ddb52b55d04465b308e8d3b10c4bee870e29b5db7b2c565c05edcfa
3
+ size 2442575872
Q4/draft_vocab.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25d7fd1670a2e0ec885868d1718d410a3baab03bceeacf0a156cf93ffe4e1ef4
3
+ size 235852
Q4/embed.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:15ab92d321d2807bdf3220bdac1465b89ef414fdebb6cb14181c4c29e6bc02d1
3
+ size 675430400
Q4/geode.v2.json ADDED
The diff for this file is too large to render. See raw diff
 
Q4/refusal/refusal.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb5d150a11f9e315f89869cac53238c9384c9b6d466f25fa90220594146363e8
3
+ size 113312
Q4/refusal/refusal.json ADDED
@@ -0,0 +1,358 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "vector_file": "refusal.gguf",
3
+ "model": "Qwen3.5-4B Agentic Coder",
4
+ "format": "controlvector (llama.cpp), model_hint qwen35; direction.<l> acts after 0-based layer l",
5
+ "n_embd": 2560,
6
+ "n_layer": 32,
7
+ "mode": "project",
8
+ "dir": "per-layer",
9
+ "scale": 1.0,
10
+ "layer_range": [
11
+ 13,
12
+ 23
13
+ ],
14
+ "layer_range_note": "0-based decoder layers; the projection runs after each of them (h -= s (h . v) v)",
15
+ "per_layer_strength": {
16
+ "13": 1.5,
17
+ "14": 1.5,
18
+ "15": 1.5,
19
+ "16": 1.5,
20
+ "17": 1.5,
21
+ "18": 1.5,
22
+ "19": 1.5,
23
+ "20": 1.5,
24
+ "21": 1.5,
25
+ "22": 1.5,
26
+ "23": 1.5
27
+ },
28
+ "direction": "per-layer mean(harmful) - mean(harmless) of the residual after the layer, averaged over the 7 assistant-header template positions (thinking on) as unit directions, unit-normalized; harmful = mlabonne/harmful_behaviors train 0-319, harmless = mlabonne/harmless_alpaca train 0-319; computed in torch on the source BF16 weights",
29
+ "scores": {
30
+ "note": "refusals: greedy, substring classifier (tools/refusal/rv.py REFUSE), think off = 48 tokens of answer, think on = up to 768 thinking tokens then the answer; c0 = stock, c1 = this vector; KL(stock || this) teacher-forced on the stock model's own written tokens (thinking on and off); think_shift = mean change of log p(think end) over its own thinking (> 0 ends thinking sooner)",
31
+ "refusals_heldout": {
32
+ "harm_test_off_c0": "103/104",
33
+ "harm_test_on_c0": "101/104",
34
+ "harm_test_uk_off_c0": "26/30",
35
+ "harm_test_uk_on_c0": "28/30",
36
+ "harmless_test_off_c0": "0/64",
37
+ "harm_test_off_c1": "2/104",
38
+ "harm_test_on_c1": "5/104",
39
+ "harm_test_uk_off_c1": "1/30",
40
+ "harm_test_uk_on_c1": "3/30",
41
+ "harmless_test_off_c1": "1/64"
42
+ },
43
+ "kl": {
44
+ "kl": 0.0266,
45
+ "kl_p99": 0.3005,
46
+ "same_top1": 0.9436,
47
+ "rows": 95,
48
+ "tokens": 17071,
49
+ "think_shift": 0.0041,
50
+ "think_tokens": 10107
51
+ },
52
+ "sweep": {
53
+ "stock": {
54
+ "val_off": "96/96"
55
+ },
56
+ "5-23@1.0": {
57
+ "val_off": "1/96",
58
+ "kl": {
59
+ "kl": 0.03297,
60
+ "kl_p99": 0.3622,
61
+ "same_top1": 0.9376,
62
+ "rows": 95,
63
+ "tokens": 17071,
64
+ "think_shift": 0.1905,
65
+ "think_tokens": 10107
66
+ }
67
+ },
68
+ "5-25@1.0": {
69
+ "val_off": "1/96",
70
+ "kl": {
71
+ "kl": 0.03371,
72
+ "kl_p99": 0.3682,
73
+ "same_top1": 0.9372,
74
+ "rows": 95,
75
+ "tokens": 17071,
76
+ "think_shift": 0.2131,
77
+ "think_tokens": 10107
78
+ }
79
+ },
80
+ "5-28@1.0": {
81
+ "val_off": "1/96",
82
+ "kl": {
83
+ "kl": 0.0357,
84
+ "kl_p99": 0.3874,
85
+ "same_top1": 0.9363,
86
+ "rows": 95,
87
+ "tokens": 17071,
88
+ "think_shift": 0.345,
89
+ "think_tokens": 10107
90
+ }
91
+ },
92
+ "5-31@1.0": {
93
+ "val_off": "1/96",
94
+ "kl": {
95
+ "kl": 0.03664,
96
+ "kl_p99": 0.3849,
97
+ "same_top1": 0.9347,
98
+ "rows": 95,
99
+ "tokens": 17071,
100
+ "think_shift": 0.328,
101
+ "think_tokens": 10107
102
+ }
103
+ },
104
+ "8-23@1.0": {
105
+ "val_off": "0/96",
106
+ "kl": {
107
+ "kl": 0.02859,
108
+ "kl_p99": 0.3194,
109
+ "same_top1": 0.9403,
110
+ "rows": 95,
111
+ "tokens": 17071,
112
+ "think_shift": 0.07,
113
+ "think_tokens": 10107
114
+ }
115
+ },
116
+ "8-25@1.0": {
117
+ "val_off": "1/96",
118
+ "kl": {
119
+ "kl": 0.02936,
120
+ "kl_p99": 0.3254,
121
+ "same_top1": 0.94,
122
+ "rows": 95,
123
+ "tokens": 17071,
124
+ "think_shift": 0.093,
125
+ "think_tokens": 10107
126
+ }
127
+ },
128
+ "8-28@1.0": {
129
+ "val_off": "1/96",
130
+ "kl": {
131
+ "kl": 0.03142,
132
+ "kl_p99": 0.3534,
133
+ "same_top1": 0.9381,
134
+ "rows": 95,
135
+ "tokens": 17071,
136
+ "think_shift": 0.2251,
137
+ "think_tokens": 10107
138
+ }
139
+ },
140
+ "8-31@1.0": {
141
+ "val_off": "1/96",
142
+ "kl": {
143
+ "kl": 0.03234,
144
+ "kl_p99": 0.3508,
145
+ "same_top1": 0.9366,
146
+ "rows": 95,
147
+ "tokens": 17071,
148
+ "think_shift": 0.2104,
149
+ "think_tokens": 10107
150
+ }
151
+ },
152
+ "11-23@1.0": {
153
+ "val_off": "0/96",
154
+ "kl": {
155
+ "kl": 0.02762,
156
+ "kl_p99": 0.3182,
157
+ "same_top1": 0.9416,
158
+ "rows": 95,
159
+ "tokens": 17071,
160
+ "think_shift": 0.065,
161
+ "think_tokens": 10107
162
+ }
163
+ },
164
+ "11-25@1.0": {
165
+ "val_off": "0/96",
166
+ "kl": {
167
+ "kl": 0.02838,
168
+ "kl_p99": 0.3292,
169
+ "same_top1": 0.9404,
170
+ "rows": 95,
171
+ "tokens": 17071,
172
+ "think_shift": 0.0874,
173
+ "think_tokens": 10107
174
+ }
175
+ },
176
+ "11-28@1.0": {
177
+ "val_off": "2/96",
178
+ "kl": {
179
+ "kl": 0.03044,
180
+ "kl_p99": 0.3427,
181
+ "same_top1": 0.9386,
182
+ "rows": 95,
183
+ "tokens": 17071,
184
+ "think_shift": 0.2201,
185
+ "think_tokens": 10107
186
+ }
187
+ },
188
+ "11-31@1.0": {
189
+ "val_off": "1/96",
190
+ "kl": {
191
+ "kl": 0.03133,
192
+ "kl_p99": 0.3398,
193
+ "same_top1": 0.9371,
194
+ "rows": 95,
195
+ "tokens": 17071,
196
+ "think_shift": 0.2046,
197
+ "think_tokens": 10107
198
+ }
199
+ },
200
+ "13-23@1.0": {
201
+ "val_off": "1/96",
202
+ "kl": {
203
+ "kl": 0.02025,
204
+ "kl_p99": 0.217,
205
+ "same_top1": 0.9513,
206
+ "rows": 95,
207
+ "tokens": 17071,
208
+ "think_shift": 0.0771,
209
+ "think_tokens": 10107
210
+ },
211
+ "val_on": "4/96"
212
+ },
213
+ "13-25@1.0": {
214
+ "val_off": "2/96",
215
+ "kl": {
216
+ "kl": 0.02099,
217
+ "kl_p99": 0.2262,
218
+ "same_top1": 0.9506,
219
+ "rows": 95,
220
+ "tokens": 17071,
221
+ "think_shift": 0.0984,
222
+ "think_tokens": 10107
223
+ },
224
+ "val_on": "3/96"
225
+ },
226
+ "13-28@1.0": {
227
+ "val_off": "2/96",
228
+ "kl": {
229
+ "kl": 0.02301,
230
+ "kl_p99": 0.2429,
231
+ "same_top1": 0.948,
232
+ "rows": 95,
233
+ "tokens": 17071,
234
+ "think_shift": 0.2353,
235
+ "think_tokens": 10107
236
+ },
237
+ "val_on": "1/96"
238
+ },
239
+ "13-31@1.0": {
240
+ "val_off": "2/96",
241
+ "kl": {
242
+ "kl": 0.02405,
243
+ "kl_p99": 0.2363,
244
+ "same_top1": 0.9458,
245
+ "rows": 95,
246
+ "tokens": 17071,
247
+ "think_shift": 0.2169,
248
+ "think_tokens": 10107
249
+ }
250
+ },
251
+ "16-23@1.0": {
252
+ "val_off": "4/96"
253
+ },
254
+ "16-25@1.0": {
255
+ "val_off": "4/96"
256
+ },
257
+ "16-28@1.0": {
258
+ "val_off": "6/96"
259
+ },
260
+ "16-31@1.0": {
261
+ "val_off": "6/96"
262
+ },
263
+ "19-23@1.0": {
264
+ "val_off": "30/96"
265
+ },
266
+ "19-25@1.0": {
267
+ "val_off": "28/96"
268
+ },
269
+ "19-28@1.0": {
270
+ "val_off": "31/96"
271
+ },
272
+ "19-31@1.0": {
273
+ "val_off": "28/96"
274
+ },
275
+ "13-23@1.25": {
276
+ "val_off": "0/96",
277
+ "val_on": "2/96",
278
+ "kl": {
279
+ "kl": 0.02305,
280
+ "kl_p99": 0.2559,
281
+ "same_top1": 0.9473,
282
+ "rows": 95,
283
+ "tokens": 17071,
284
+ "think_shift": 0.0469,
285
+ "think_tokens": 10107
286
+ }
287
+ },
288
+ "13-23@1.5": {
289
+ "val_off": "0/96",
290
+ "val_on": "2/96",
291
+ "kl": {
292
+ "kl": 0.0266,
293
+ "kl_p99": 0.3005,
294
+ "same_top1": 0.9436,
295
+ "rows": 95,
296
+ "tokens": 17071,
297
+ "think_shift": 0.0041,
298
+ "think_tokens": 10107
299
+ }
300
+ },
301
+ "13-25@1.25": {
302
+ "val_off": "2/96",
303
+ "val_on": "0/96",
304
+ "kl": {
305
+ "kl": 0.02388,
306
+ "kl_p99": 0.263,
307
+ "same_top1": 0.9468,
308
+ "rows": 95,
309
+ "tokens": 17071,
310
+ "think_shift": 0.0726,
311
+ "think_tokens": 10107
312
+ }
313
+ },
314
+ "13-25@1.5": {
315
+ "val_off": "2/96",
316
+ "val_on": "2/96",
317
+ "kl": {
318
+ "kl": 0.02754,
319
+ "kl_p99": 0.3079,
320
+ "same_top1": 0.9429,
321
+ "rows": 95,
322
+ "tokens": 17071,
323
+ "think_shift": 0.0308,
324
+ "think_tokens": 10107
325
+ }
326
+ },
327
+ "13-28@1.25": {
328
+ "val_off": "2/96",
329
+ "val_on": "3/96",
330
+ "kl": {
331
+ "kl": 0.02663,
332
+ "kl_p99": 0.275,
333
+ "same_top1": 0.9427,
334
+ "rows": 95,
335
+ "tokens": 17071,
336
+ "think_shift": 0.2097,
337
+ "think_tokens": 10107
338
+ }
339
+ },
340
+ "13-28@1.5": {
341
+ "val_off": "3/96",
342
+ "val_on": "3/96",
343
+ "kl": {
344
+ "kl": 0.03196,
345
+ "kl_p99": 0.3268,
346
+ "same_top1": 0.9363,
347
+ "rows": 95,
348
+ "tokens": 17071,
349
+ "think_shift": 0.1957,
350
+ "think_tokens": 10107
351
+ }
352
+ },
353
+ "picked": "13-23@1.5"
354
+ }
355
+ },
356
+ "source_weights": "mahiatlinux/qwen3.5-4b-agentic-coder-v4 (BF16)",
357
+ "license": "Apache-2.0 (mahiatlinux/qwen3.5-4b-agentic-coder-v4, a fine-tune of Qwen/Qwen3.5-4B)"
358
+ }
Q4/tokenizer.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6fae60eb2df30e33b5fdd10490d4a7bbf955af2f620541c42cf596a0cf39ddc
3
+ size 5311198
Q4/vision.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7dd93eada8883aa20b9358fdcac6d955144a740b6ee5a57c33b20696fa26535b
3
+ size 361420800
README.md ADDED
@@ -0,0 +1,107 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ license_link: LICENSE
4
+ base_model:
5
+ - mahiatlinux/qwen3.5-4b-agentic-coder-v4
6
+ - Qwen/Qwen3.5-4B
7
+ pipeline_tag: image-text-to-text
8
+ tags:
9
+ - android
10
+ - on-device
11
+ - quantized
12
+ - geode
13
+ - code
14
+ - agent
15
+ ---
16
+
17
+ # Geode · Qwen3.5-4B Agentic Coder for phones
18
+
19
+ A model pack for **[Geode](https://geode.tifu.xyz)**, an Android app that runs language models entirely on the phone:
20
+ no cloud, no account. [qwen3.5-4b-agentic-coder-v4](https://huggingface.co/mahiatlinux/qwen3.5-4b-agentic-coder-v4)
21
+ is mahiatlinux's full fine-tune of [Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) (through
22
+ [unsloth/Qwen3.5-4B](https://huggingface.co/unsloth/Qwen3.5-4B)) for writing code and working as an agent with tool
23
+ calls. It keeps the Qwen3.5 design Geode's other Qwen models have: the hybrid Gated DeltaNet + attention layers, the
24
+ same vocabulary, the vision encoder (images understood) and the MTP layer for drafting the next token.
25
+
26
+ ## Packs
27
+
28
+ | Folder | Weights | Size | Quality (KL vs BF16 / top-1) | For |
29
+ | --- | --- | --- | --- | --- |
30
+ | [`Q4/`](./Q4) | every matrix 4-bit (GPTQ, q4i: 16 levels with a zero and a signed 8-bit scale per 16 weights), lm_head 4-bit over the whole vocabulary, embedding 8-bit, MTP layer 4-bit, vision encoder 8-bit | 3.5 GB (3.12 GB + 0.36 GB vision) | 0.016 / 96.2% | 64-bit phones with 6 GB of RAM or more |
31
+
32
+ Quality per kind of held-out answer (KL divergence from the BF16 model / how often the top token is the same):
33
+
34
+ | English | Ukrainian | German | Polish | Code | Tool calls |
35
+ | --- | --- | --- | --- | --- | --- |
36
+ | 0.015 / 96.2% | 0.016 / 95.8% | 0.014 / 97.1% | 0.024 / 95.6% | 0.011 / 97.0% | 0.028 / 96.0% |
37
+
38
+ Quantization: GPTQ layer by layer (each layer on what the quantized layers before it produce), calibrated on agent
39
+ conversations with tool calls, the model's own reasoning and text in 30 languages. Quality is measured teacher-forced
40
+ against the BF16 model on its own written answers (English, Ukrainian, German, Polish, code and tool calls, thinking
41
+ on and off), only the tokens it wrote counted.
42
+
43
+ The pack needs Geode 0.10.13 or newer (its `geode.v2.json` says so: older versions do not list it).
44
+
45
+ ## Run modes
46
+
47
+ Geode runs this model like its other dense Qwen3.5 packs, in any of its run modes (Models → the model → *How it
48
+ runs*):
49
+
50
+ | Run mode | Prompt | Answer |
51
+ | --- | --- | --- |
52
+ | NPU + GPU (the default) | NPU | GPU |
53
+ | NPU + CPU | NPU | processor |
54
+ | NPU | NPU | NPU |
55
+ | GPU | GPU | GPU |
56
+ | GPU + CPU | GPU | processor |
57
+ | CPU | processor | processor |
58
+
59
+ The NPU is Qualcomm's Hexagon (Snapdragon 8 Gen 2 and newer), the GPU an Adreno 7xx or newer; a phone without them
60
+ runs it on the processor. The MTP layer drafts the next tokens and every draft is checked: the same answer, sooner.
61
+ Measured speeds: see [geode.tifu.xyz/board](https://geode.tifu.xyz/board).
62
+
63
+ The packs are Geode's own format (`geode.v2.json` describes the files). They are not GGUF and do not load in other
64
+ runtimes.
65
+
66
+ ## Fewer refusals (optional add-on, off by default)
67
+
68
+ `Q4/refusal/` holds a small optional add-on (121 KB, not part of the base download): `refusal.gguf`, one direction of 2,560
69
+ values for each of layers 13-23 (strength 1.5; llama.cpp control-vector format), and `refusal.json`, its settings and scores.
70
+ With the model's *Fewer refusals* switch on (or `"fewer_refusals": true` in a request to Geode's local API), the engine
71
+ removes that layer's direction from the residual stream after each of those layers (h -= s (h . v) v), and the model
72
+ declines far fewer requests. It acts on the activations, so it needs no other weights. Off, nothing of it is loaded and
73
+ the model runs exactly as without it.
74
+
75
+ Made from the fine-tune's BF16 weights (the refusal direction of 320 harmful vs 320 harmless prompts, picked with
76
+ thinking on and off) and measured against the stock model: KL 0.027, the same top token 94.4% (teacher-forced on the model's own replies, thinking on and off), no measurable change in how soon it ends its thinking. Held-out harmful requests refused without it /
77
+ with it: English 103/104 -> 2/104 (thinking off), 101/104 -> 5/104 (thinking on); Ukrainian 26/30 -> 1/30 and 28/30 -> 3/30; harmless requests 0/64 -> 1/64.
78
+
79
+ Removing refusals removes a safety behaviour of the model: you are responsible for what it writes with the switch on.
80
+
81
+ ## Use
82
+
83
+ 1. Install Geode (Google Play: [geode.tifu.xyz](https://geode.tifu.xyz)).
84
+ 2. Models → pick **Qwen3.5-4B Agentic Coder** in Geode's catalog (or *Download from Hugging Face* →
85
+ `Maximilian228/Geode-Qwen3.5-4B-Agentic-Coder`).
86
+
87
+ Requirements: Android 11+, a 64-bit ARM processor with the dot-product instructions (ARMv8.2), and free storage for
88
+ the pack.
89
+
90
+ ## License and attribution
91
+
92
+ Apache-2.0, as the model it comes from (see `LICENSE`):
93
+
94
+ - fine-tuned by **mahiatlinux**:
95
+ [mahiatlinux/qwen3.5-4b-agentic-coder-v4](https://huggingface.co/mahiatlinux/qwen3.5-4b-agentic-coder-v4)
96
+ (Apache-2.0);
97
+ - base model [Qwen/Qwen3.5-4B](https://huggingface.co/Qwen/Qwen3.5-4B) by the Qwen team (Apache-2.0), through
98
+ [unsloth/Qwen3.5-4B](https://huggingface.co/unsloth/Qwen3.5-4B);
99
+ - quantized and packed by Geode.
100
+
101
+ Changes made here: the BF16 weights quantized (every matrix 4-bit by GPTQ, the embedding and the vision encoder 8-bit,
102
+ the MTP layer 4-bit by rounding) and laid out in Geode's file format; the tokenizer converted; a draft vocabulary
103
+ (`draft_vocab.bin`, the one of Geode's other Qwen3.5 packs) for the MTP layer's drafts; the optional *Fewer refusals*
104
+ vector computed from the fine-tune's weights; the weights were not trained further. The model ships its own chat
105
+ template (unsloth's Qwen3.5 template with fixes for the developer role and tool calls); for the conversations Geode
106
+ writes (a system message, user and assistant turns, tool calls and results, thinking switched on or off) it gives
107
+ exactly the tokens of Qwen3.5's template, which Geode uses. Answers come from an AI model and can be wrong.