Image-Text-to-Text
Transformers
Safetensors
llava
conversational
compressed-tensors
cpatonn commited on
Commit
9551924
·
verified ·
1 Parent(s): bac2dcc

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,925 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ pipeline_tag: image-text-to-text
4
+ library_name: transformers
5
+ base_model: ServiceNow-AI/Apriel-1.6-15b-Thinker
6
+ ---
7
+
8
+ # Apriel-1.6-15B-Thinker: Cost-efficient Frontier Multimodal Performance
9
+
10
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/63d3095c2727d7888cbb54e2/Lt1t0tOO5emz1X23Azg-E.png" width="120" alt="thumbnail"/> `/ˈɑː.pri.əl/`
11
+
12
+ ---
13
+
14
+ # Table of Contents
15
+
16
+ 1. [Summary](#summary)
17
+ 2. [Evaluation](#evaluation)
18
+ 3. [Intended Use](#intended-use)
19
+ 4. [How to Use](#how-to-use)
20
+ 5. [Training Details](#training-details)
21
+ 6. [Limitations](#limitations)
22
+ 7. [Security and Responsible Use](#security-and-responsible-use)
23
+ 8. [License](#license)
24
+ 9. [Citation](#citation)
25
+
26
+ ---
27
+
28
+ # Summary
29
+
30
+ **Apriel-1.6-15B-Thinker** is an updated multimodal reasoning model in ServiceNow’s Apriel SLM series, building on [**Apriel-1.5-15B-Thinker**](https://huggingface.co/ServiceNow-AI/Apriel-1.5-15b-Thinker).
31
+ With significantly improved text and image reasoning capabilities, Apriel-1.6 achieves competitive performance against models up to 10x its size.
32
+ Like its predecessor, it benefits from extensive continual pre-training across both text and image domains.
33
+ We additionally perform post-training that focuses on Supervised Finetuning (SFT) and Reinforcement Learning (RL).
34
+ Apriel-1.6 obtains frontier performance without sacrificing reasoning token efficiency.
35
+ The model improves or maintains task performance when compared with Apriel-1.5-15B-Thinker, while **reducing reasoning token usage by more than 30\%**.
36
+
37
+ **Highlights**
38
+
39
+ - Achieves a score of **57** on the Artificial Analysis index outperforming models like Gemini 2.5 Flash, Claude Haiku 4.5 and GPT OSS 20b. It obtains a score on par with Qwen3 235B A22B, while being significantly more efficient.
40
+ - **Reduces reasoning token usage by more than 30%**, delivering significantly better efficiency than Apriel-1.5-15B-Thinker.
41
+ - Scores **69** on Tau2 Bench Telecom and **69** on IFBench, which are key benchmarks for the enterprise domain.
42
+ - At 15B parameters, the model fits on a single GPU, making it highly memory-efficient.
43
+ - Based on community feedback on Apriel-1.5-15B-Thinker, we simplified the chat template by removing redundant tags and introduced four special tokens to the tokenizer (`<tool_calls>`, `</tool_calls>`, `[BEGIN FINAL RESPONSE]`, `<|end|>`) for easier output parsing.
44
+
45
+ Please see our [blog post](https://huggingface.co/blog/ServiceNow-AI/apriel-1p6-15b-thinker) for more details
46
+
47
+ ---
48
+
49
+ # Evaluation
50
+
51
+ - Text benchmarks included in the Artificial Analysis Index v3.0 use scores reported by [Artificial Analysis](https://artificialanalysis.ai/). All other benchmarks were evaluated internally.
52
+
53
+ <table>
54
+ <tr>
55
+ <th>Category</th>
56
+ <th>Benchmark</th>
57
+ <th>Apriel-1.6-15B-Thinker</th>
58
+ <th>Apriel-1.5-15B-Thinker</th>
59
+ <th>GPT OSS 120B</th>
60
+ <th>DeepSeek R1 0528</th>
61
+ <th>Gemini 2.5 Flash (Sep)</th>
62
+ <th>GPT 5 mini (high)</th>
63
+ <th>Claude 4.5 Sonnet (thinking)</th>
64
+ <th>o3-mini (high)</th>
65
+ </tr>
66
+ <tr>
67
+ <td></td>
68
+ <td>Average Score**</td>
69
+ <td>53.22</td>
70
+ <td>46.56</td>
71
+ <td>52.56</td>
72
+ <td>51.92</td>
73
+ <td>50.71</td>
74
+ <td>62.58</td>
75
+ <td>60.37</td>
76
+ <td>48.85</td>
77
+ </tr>
78
+ <!-- Function Calling -->
79
+ <tr>
80
+ <td rowspan="5" class="category">Function Calling</td>
81
+ <td>BFCL v3 only</td>
82
+ <td>63.50</td>
83
+ <td>51.88</td>
84
+ <td>50.62</td>
85
+ <td>39.75</td>
86
+ <td>39.75</td>
87
+ <td>17.62</td>
88
+ <td>-</td>
89
+ <td>50</td>
90
+ </tr>
91
+ <tr>
92
+ <td>Tau2 bench Telecom</td>
93
+ <td>69</td>
94
+ <td>57.8</td>
95
+ <td>66</td>
96
+ <td>37</td>
97
+ <td>32</td>
98
+ <td>68</td>
99
+ <td>50.8</td>
100
+ <td>31</td>
101
+ </tr>
102
+ <tr>
103
+ <td>Tau2 bench Retail</td>
104
+ <td>66.67</td>
105
+ <td>46.78</td>
106
+ <td>61.4</td>
107
+ <td>59.94</td>
108
+ <td>61.69</td>
109
+ <td>73.39</td>
110
+ <td>69.8</td>
111
+ <td>75.73</td>
112
+ </tr>
113
+ <tr>
114
+ <td>Tau2 bench Airline</td>
115
+ <td>58</td>
116
+ <td>52</td>
117
+ <td>45.3</td>
118
+ <td>47.33</td>
119
+ <td>56.66</td>
120
+ <td>59.33</td>
121
+ <td>58</td>
122
+ <td>61.33</td>
123
+ </tr>
124
+ <tr>
125
+ <td>ComplexFuncBench</td>
126
+ <td>33.2</td>
127
+ <td>19</td>
128
+ <td>24.6</td>
129
+ <td>24.2</td>
130
+ <td>26.3</td>
131
+ <td>37.5</td>
132
+ <td>24.6</td>
133
+ <td>18.9</td>
134
+ </tr>
135
+
136
+ <!-- Instruction Following -->
137
+ <tr>
138
+ <td rowspan="4" class="category">Instruction Following</td>
139
+ <td>Agent IF</td>
140
+ <td>57.2</td>
141
+ <td>55</td>
142
+ <td>54.20</td>
143
+ <td>52.20</td>
144
+ <td>49.70</td>
145
+ <td>57.60</td>
146
+ <td>54.50</td>
147
+ <td>54.90</td>
148
+ </tr>
149
+ <tr>
150
+ <td>Multi IF</td>
151
+ <td>83.34</td>
152
+ <td>76.91</td>
153
+ <td>82.95</td>
154
+ <td>73.76</td>
155
+ <td>82.49</td>
156
+ <td>85.37</td>
157
+ <td>84.32</td>
158
+ <td>87.28</td>
159
+ </tr>
160
+ <tr>
161
+ <td>Multi-Challenge</td>
162
+ <td>46.15</td>
163
+ <td>41.39</td>
164
+ <td>46.90</td>
165
+ <td>44.50</td>
166
+ <td>49.08</td>
167
+ <td>57.90</td>
168
+ <td>42.49</td>
169
+ <td>38.46</td>
170
+ </tr>
171
+ <tr>
172
+ <td>IF Bench</td>
173
+ <td>69</td>
174
+ <td>62</td>
175
+ <td>69</td>
176
+ <td>40</td>
177
+ <td>50</td>
178
+ <td>75</td>
179
+ <td>57</td>
180
+ <td>70.07</td>
181
+ </tr>
182
+
183
+ <!-- Math -->
184
+ <tr>
185
+ <td class="category">Math</td>
186
+ <td>AIME 25</td>
187
+ <td>88</td>
188
+ <td>88</td>
189
+ <td>93</td>
190
+ <td>76</td>
191
+ <td>73</td>
192
+ <td>91</td>
193
+ <td>88</td>
194
+ <td>86.67</td>
195
+ </tr>
196
+
197
+ <!-- Coding -->
198
+ <tr>
199
+ <td rowspan="3" class="category">Coding</td>
200
+ <td>Struct Eval</td>
201
+ <td>79</td>
202
+ <td>48.50</td>
203
+ <td>71</td>
204
+ <td>73</td>
205
+ <td>70</td>
206
+ <td>69.92</td>
207
+ <td>76</td>
208
+ <td>73</td>
209
+ </tr>
210
+ <tr>
211
+ <td>LCB</td>
212
+ <td>81</td>
213
+ <td>73</td>
214
+ <td>88</td>
215
+ <td>77</td>
216
+ <td>70</td>
217
+ <td>84</td>
218
+ <td>71</td>
219
+ <td>73</td>
220
+ </tr>
221
+ <tr>
222
+ <td>SciCode</td>
223
+ <td>37</td>
224
+ <td>35</td>
225
+ <td>39</td>
226
+ <td>40</td>
227
+ <td>41</td>
228
+ <td>39</td>
229
+ <td>45</td>
230
+ <td>40</td>
231
+ </tr>
232
+
233
+ <!-- Agentic -->
234
+ <tr>
235
+ <td rowspan="7" class="category">Agentic</td>
236
+ <td>DeepresearchBench</td>
237
+ <td>36.47</td>
238
+ <td>32.73</td>
239
+ <td>36.30</td>
240
+ <td>34.19</td>
241
+ <td>38.15</td>
242
+ <td>-</td>
243
+ <td>-</td>
244
+ <td>33.40</td>
245
+ </tr>
246
+ <tr>
247
+ <td>GAIA</td>
248
+ <td>40</td>
249
+ <td>30.91</td>
250
+ <td>21.21</td>
251
+ <td>32.12</td>
252
+ <td>47.88</td>
253
+ <td>65.45</td>
254
+ <td>69.09</td>
255
+ <td>23.03</td>
256
+ </tr>
257
+ <tr>
258
+ <td>Work-Arena L1</td>
259
+ <td>50.2</td>
260
+ <td>51.5</td>
261
+ <td>50.9</td>
262
+ <td>63.9</td>
263
+ <td>51.8</td>
264
+ <td>65.5</td>
265
+ <td>62.7</td>
266
+ <td>52.4</td>
267
+ </tr>
268
+ <tr>
269
+ <td>OS World Small</td>
270
+ <td>16.70</td>
271
+ <td>13.90</td>
272
+ <td>16.70</td>
273
+ <td>25</td>
274
+ <td>19.40</td>
275
+ <td>22.20</td>
276
+ <td>30.60</td>
277
+ <td>19.40</td>
278
+ </tr>
279
+ <tr>
280
+ <td>SWE Bench Verified</td>
281
+ <td>23</td>
282
+ <td>16</td>
283
+ <td>31</td>
284
+ <td>29.60</td>
285
+ <td>34.20</td>
286
+ <td>61</td>
287
+ <td>64.2</td>
288
+ <td>22.60</td>
289
+ </tr>
290
+ <tr>
291
+ <td>Terminal Bench</td>
292
+ <td>14</td>
293
+ <td>10</td>
294
+ <td>22</td>
295
+ <td>15</td>
296
+ <td>13</td>
297
+ <td>31</td>
298
+ <td>33</td>
299
+ <td>5.67</td>
300
+ </tr>
301
+ <tr>
302
+ <td>Aider Polyglot</td>
303
+ <td>37.68</td>
304
+ <td>26.37</td>
305
+ <td>42</td>
306
+ <td>71.40</td>
307
+ <td>40</td>
308
+ <td>71.60</td>
309
+ <td>78</td>
310
+ <td>60.40</td>
311
+ </tr>
312
+
313
+ <!-- Knowledge -->
314
+ <tr>
315
+ <td class="category">Knowledge</td>
316
+ <td>MMLU Pro</td>
317
+ <td>79</td>
318
+ <td>77</td>
319
+ <td>81</td>
320
+ <td>85</td>
321
+ <td>83</td>
322
+ <td>84</td>
323
+ <td>88</td>
324
+ <td>80</td>
325
+ </tr>
326
+
327
+ <!-- Creative Writing -->
328
+ <tr>
329
+ <td class="category">Creative Writing</td>
330
+ <td>Creative writing v3 / EQ Bench</td>
331
+ <td>59.73</td>
332
+ <td>60.24</td>
333
+ <td>53.70</td>
334
+ <td>79.40</td>
335
+ <td>74.25</td>
336
+ <td>75.25</td>
337
+ <td>80.70</td>
338
+ <td>30.40</td>
339
+ </tr>
340
+
341
+ <!-- Others -->
342
+ <tr>
343
+ <td rowspan="2" class="category">Others</td>
344
+ <td>GPQA Diamond</td>
345
+ <td>73</td>
346
+ <td>71</td>
347
+ <td>78</td>
348
+ <td>81</td>
349
+ <td>79</td>
350
+ <td>83</td>
351
+ <td>83</td>
352
+ <td>77</td>
353
+ </tr>
354
+ <tr>
355
+ <td>HLE</td>
356
+ <td>10</td>
357
+ <td>12</td>
358
+ <td>18.5</td>
359
+ <td>14.9</td>
360
+ <td>11.1</td>
361
+ <td>19.7</td>
362
+ <td>17.3</td>
363
+ <td>12.3</td>
364
+ </tr>
365
+
366
+ <!-- Long Context -->
367
+ <tr>
368
+ <td class="category">Long Context</td>
369
+ <td>AA LCR</td>
370
+ <td>50*</td>
371
+ <td>20</td>
372
+ <td>51</td>
373
+ <td>55</td>
374
+ <td>62</td>
375
+ <td>68</td>
376
+ <td>66</td>
377
+ <td>30***</td>
378
+ </tr>
379
+ </table>
380
+
381
+
382
+
383
+ \* This score is with [DCA](https://arxiv.org/pdf/2402.17463) enabled. Without this, the model scores 36.
384
+
385
+ \** The average score is calculated using all benchmarks except BFCL v3 Only and DeepResearchBench, since some models do not have scores for these two benchmarks.
386
+
387
+ \*** AA LCR score for o3-mini-high is projected score based on its AA Index score.
388
+
389
+ ---
390
+
391
+ - For image benchmarks, we report evaluations obtained by https://github.com/open-compass/VLMEvalKit
392
+
393
+ <table>
394
+ <tr>
395
+ <td><strong>Benchmark</strong>
396
+ </td>
397
+ <td><strong>Apriel-1.6-15B-Thinker</strong>
398
+ </td>
399
+ <td><strong>Apriel-1.5-15B-Thinker</strong>
400
+ </td>
401
+ <td><strong>GPT-5 (high)</strong>
402
+ </td>
403
+ <td><strong>GLM-4.5V (Thinking)</strong>
404
+ </td>
405
+ <td><strong>Gemini 2.5 Flash (high)</strong>
406
+ </td>
407
+ <td><strong>Claude Sonnet 3.7 (Thinking)</strong>
408
+ </td>
409
+ <td><strong>GPT-5 (Minimal)</strong>
410
+ </td>
411
+ <td><strong>Grok 4 Fast (Thinking)</strong>
412
+ </td>
413
+ </tr>
414
+ <tr>
415
+ <td> MMMU (validation)
416
+ </td>
417
+ <td> 72
418
+ </td>
419
+ <td> 70.22
420
+ </td>
421
+ <td> 81.33
422
+ </td>
423
+ <td> 74.33
424
+ </td>
425
+ <td> 70.66
426
+ </td>
427
+ <td> 73.66
428
+ </td>
429
+ <td> 66.66
430
+ </td>
431
+ <td> 70.11
432
+ </td>
433
+ </tr>
434
+ <tr>
435
+ <td>MMMU-PRO (10 choice)
436
+ </td>
437
+ <td> 60.28
438
+ </td>
439
+ <td> 55.38
440
+ </td>
441
+ <td> 74.73
442
+ </td>
443
+ <td> 64.16
444
+ </td>
445
+ <td> 67.86
446
+ </td>
447
+ <td> 64.50
448
+ </td>
449
+ <td> 66.06
450
+ </td>
451
+ <td> 61.61
452
+ </td>
453
+ </tr>
454
+ <tr>
455
+ <td>MMMU-PRO (Vision Only)
456
+ </td>
457
+ <td> 52.89
458
+ </td>
459
+ <td> 48.21
460
+ </td>
461
+ <td> 66.93
462
+ </td>
463
+ <td> 61.50
464
+ </td>
465
+ <td> 56.76
466
+ </td>
467
+ <td> 60.11
468
+ </td>
469
+ <td> 57.68
470
+ </td>
471
+ <td> 22.94
472
+ </td>
473
+ </tr>
474
+ <tr>
475
+ <td>LogicVista
476
+ </td>
477
+ <td> 58.61
478
+ </td>
479
+ <td> 58.39
480
+ </td>
481
+ <td> 69.35
482
+ </td>
483
+ <td> 63.53
484
+ </td>
485
+ <td> 63.75
486
+ </td>
487
+ <td> 69.12
488
+ </td>
489
+ <td> 44.51
490
+ </td>
491
+ <td> 47.42
492
+ </td>
493
+ </tr>
494
+ <tr>
495
+ <td>MathVision
496
+ </td>
497
+ <td> 60.85
498
+ </td>
499
+ <td> 50.99
500
+ </td>
501
+ <td> 67.10
502
+ </td>
503
+ <td> 59.53
504
+ </td>
505
+ <td> 59.21
506
+ </td>
507
+ <td> 50.32
508
+ </td>
509
+ <td> 35.52
510
+ </td>
511
+ <td> 48.35
512
+ </td>
513
+ </tr>
514
+ <tr>
515
+ <td>MathVista
516
+ </td>
517
+ <td> 79.90
518
+ </td>
519
+ <td> 75.50
520
+ </td>
521
+ <td> 83.30
522
+ </td>
523
+ <td> 83.60
524
+ </td>
525
+ <td> 78.50
526
+ </td>
527
+ <td> 74.60
528
+ </td>
529
+ <td> 61.20
530
+ </td>
531
+ <td> 68.20
532
+ </td>
533
+ </tr>
534
+ <tr>
535
+ <td>MathVerse (Vision Dominant)
536
+ </td>
537
+ <td> 66.75
538
+ </td>
539
+ <td> 58.38
540
+ </td>
541
+ <td> 79.82
542
+ </td>
543
+ <td> 68.65
544
+ </td>
545
+ <td> 70.68
546
+ </td>
547
+ <td> 56.09
548
+ </td>
549
+ <td> 39.84
550
+ </td>
551
+ <td> 54.69
552
+ </td>
553
+ </tr>
554
+ <tr>
555
+ <td>MathVerse (Text Dominant)
556
+ </td>
557
+ <td> 79.06
558
+ </td>
559
+ <td> 76.40
560
+ </td>
561
+ <td> 84.64
562
+ </td>
563
+ <td> 77.41
564
+ </td>
565
+ <td> 78.80
566
+ </td>
567
+ <td> 69.28
568
+ </td>
569
+ <td> 43.78
570
+ </td>
571
+ <td> 72.20
572
+ </td>
573
+ </tr>
574
+ <tr>
575
+ <td>MMStar
576
+ </td>
577
+ <td> 70.66
578
+ </td>
579
+ <td> 67.73
580
+ </td>
581
+ <td> 77.74
582
+ </td>
583
+ <td> 74.46
584
+ </td>
585
+ <td> 73.86
586
+ </td>
587
+ <td> 70
588
+ </td>
589
+ <td> 63.60
590
+ </td>
591
+ <td> 64.80
592
+ </td>
593
+ </tr>
594
+ <tr>
595
+ <td>CharXiv (descriptive)
596
+ </td>
597
+ <td> 89.85
598
+ </td>
599
+ <td> 88.20
600
+ </td>
601
+ <td> 91.25
602
+ </td>
603
+ <td> 90.80
604
+ </td>
605
+ <td> 83.60
606
+ </td>
607
+ <td> 93.27
608
+ </td>
609
+ <td> 82.45
610
+ </td>
611
+ <td> 68.15
612
+ </td>
613
+ </tr>
614
+ <tr>
615
+ <td>CharXiv (reasoning)
616
+ </td>
617
+ <td> 56.00
618
+ </td>
619
+ <td> 50.10
620
+ </td>
621
+ <td> 71.50
622
+ </td>
623
+ <td> 63.00
624
+ </td>
625
+ <td> 56.50
626
+ </td>
627
+ <td> 70.90
628
+ </td>
629
+ <td> 52.80
630
+ </td>
631
+ <td> 33.50
632
+ </td>
633
+ </tr>
634
+ <tr>
635
+ <td>AI2D Test
636
+ </td>
637
+ <td> 86.04
638
+ </td>
639
+ <td> 82.87
640
+ </td>
641
+ <td> 90.05
642
+ </td>
643
+ <td> 87.75
644
+ </td>
645
+ <td> 82.09
646
+ </td>
647
+ <td> 84.19
648
+ </td>
649
+ <td> 85.16
650
+ </td>
651
+ <td> 81.86
652
+ </td>
653
+ </tr>
654
+ <tr>
655
+ <td>BLINK
656
+ </td>
657
+ <td> 63.96
658
+ </td>
659
+ <td> 58.71
660
+ </td>
661
+ <td> 70.22
662
+ </td>
663
+ <td> 66.59
664
+ </td>
665
+ <td> 65.64
666
+ </td>
667
+ <td> 64.49
668
+ </td>
669
+ <td> 64.59
670
+ </td>
671
+ <td> 54.39
672
+ </td>
673
+ </tr>
674
+ </table>
675
+
676
+ ---
677
+
678
+ # Intended Use
679
+
680
+ The Apriel family of models are designed for a variety of general-purpose instruction tasks, including:
681
+
682
+ - Code assistance and generation
683
+ - Logical reasoning and multi-step tasks
684
+ - Question answering and information retrieval
685
+ - Function calling, complex instruction following and agent use cases
686
+
687
+ They are **not intended** for use in safety-critical applications without human oversight or in scenarios requiring guaranteed factual accuracy.
688
+
689
+ ---
690
+ # How to Use
691
+
692
+ ```bash
693
+ pip install transformers
694
+ ```
695
+
696
+ ## Running the Reasoning model
697
+
698
+
699
+ Here is a code snippet demonstrating the model's usage with the transformers library's generate function:
700
+
701
+ ```python
702
+ # Tested with transformers==4.48
703
+
704
+ import re
705
+ import requests
706
+ import torch
707
+ from PIL import Image
708
+ from transformers import AutoProcessor, AutoModelForImageTextToText
709
+
710
+ # Load model
711
+ model_id = "ServiceNow-AI/Apriel-1.6-15b-Thinker"
712
+ model = AutoModelForImageTextToText.from_pretrained(
713
+ model_id,
714
+ torch_dtype=torch.bfloat16,
715
+ device_map="auto"
716
+ )
717
+ processor = AutoProcessor.from_pretrained(model_id)
718
+
719
+ # Example 1: Text-only prompt
720
+ chat = [
721
+ {
722
+ "role": "user",
723
+ "content": [
724
+ {"type": "text", "text": "What is the capital for France?"},
725
+ ],
726
+ }
727
+ ]
728
+
729
+ inputs = processor.apply_chat_template(chat, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt")
730
+ inputs = {k: v.to(model.device) if isinstance(v, torch.Tensor) else v for k, v in inputs.items()}
731
+ inputs.pop("token_type_ids", None)
732
+
733
+ with torch.no_grad():
734
+ output_ids = model.generate(**inputs, max_new_tokens=1024, do_sample=True, temperature=0.6)
735
+
736
+ generated_ids = output_ids[:, inputs['input_ids'].shape[1]:]
737
+ output = processor.decode(generated_ids[0], skip_special_tokens=True)
738
+ response = re.findall(r"\[BEGIN FINAL RESPONSE\](.*?)(?:<\|end\|>)", output, re.DOTALL)[0].strip()
739
+
740
+ print("Text-only Response:", response)
741
+
742
+ # Example 2: Image understanding
743
+ url = "https://picsum.photos/id/237/200/300"
744
+ image = Image.open(requests.get(url, stream=True).raw).convert("RGB")
745
+
746
+ chat = [
747
+ {
748
+ "role": "user",
749
+ "content": [
750
+ {"type": "text", "text": "Which animal is this?"},
751
+ {"type": "image"},
752
+ ],
753
+ }
754
+ ]
755
+
756
+ prompt = processor.apply_chat_template(chat, add_generation_prompt=True, tokenize=False)
757
+ inputs = processor(text=prompt, images=[image], return_tensors="pt").to(model.device)
758
+
759
+ with torch.no_grad():
760
+ output_ids = model.generate(**inputs, max_new_tokens=1024, do_sample=True, temperature=0.6)
761
+
762
+ generated_ids = output_ids[:, inputs['input_ids'].shape[1]:]
763
+ output = processor.decode(generated_ids[0], skip_special_tokens=True)
764
+ response = re.findall(r"\[BEGIN FINAL RESPONSE\](.*?)(?:<\|end\|>)", output, re.DOTALL)[0].strip()
765
+
766
+ print("Image Response:", response)
767
+
768
+ ```
769
+
770
+ ## Usage Guidelines
771
+ 1. Use the model’s default chat template, which already includes a system prompt.
772
+ 2. We recommend setting temperature to `0.6`.
773
+ 3. We ensure the model starts with `Here are my reasoning steps:\n` during all our evaluations. This is implemented in the default chat template.
774
+ 4. For multi-turn conversations, intermediate turns (historical model outputs) are expected to contain only the final response, without reasoning steps.
775
+
776
+ ---
777
+
778
+ ## Chat Template
779
+
780
+
781
+ ```
782
+ <|begin_system|>
783
+ You are a thoughtful, systematic AI assistant from ServiceNow Language Models (SLAM) lab. Analyze each question carefully, present your reasoning step-by-step, then provide the final response after the marker [BEGIN FINAL RESPONSE].
784
+ <|begin_user|>
785
+ # user message here
786
+ <|begin_assistant|>
787
+ Here are my reasoning steps:
788
+ # thoughts here
789
+ [BEGIN FINAL RESPONSE]
790
+ # assistant response here
791
+ <|end|>
792
+ ```
793
+ The model will first generate its thinking process and then generate its final response, starting with `[BEGIN FINAL RESPONSE]`. Here is a code snippet demonstrating the application of the chat template:
794
+
795
+
796
+
797
+ ```python
798
+ from transformers import AutoTokenizer
799
+ model_name = "ServiceNow-AI/Apriel-1.6-15b-Thinker"
800
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
801
+
802
+ # prepare the model input
803
+ custom_system_prompt = "Answer like a pirate."
804
+ prompt = "You are an expert assistant in the implementation of customer experience management aspect of retail applications \n \nYou will be using Python as the programming language. \n \nYou will utilize a factory design pattern for the implementation and following the dependency inversion principle \n \nYou will modify the implementation based on user requirements. \n \nUpon user request, you will add, update, and remove the features & enhancements in the implementation provided by you. \n \nYou will ask whether the user wants to refactor the provided code or needs a sample implementation for reference. Upon user confirmation, I will proceed accordingly. \n \n**Guidelines:** \n 1. **User Requirements:** \n - You have to ask users about their requirements, clarify the user expectations, and suggest the best possible solution by providing examples of Python code snippets. \n - Ask users about which type of reports they need to assess the AI model's performance, accuracy, and reliability. \n - After providing the solution, you have to ask the user about the trial of the solution and modify the solution based on the user feedback. \n \n 2. **Libraries/Frameworks:** \n - You will be utilizing Python as a programming language. \n - You will be using Flask framework for REST APIS implementation \n \n 3. **Communication Gesture:** \n - Your conversation with the user should be interactive, supportive, courageous, and professional. \n - You have to break down the complex concepts into sub-concepts and try to explain them to the user. \n - You have to ask the user for the required parameters. If the user refuses to provide in 2 attempts, politely exit the conversation. \n - You have to provide your supported parameters to the user, if the user refuses to accept them then you have to put an apology note and exit the conversation. \n - You have to track the conversation about unasked questions by the user. If some/one of the questions remain then you have to remind the user about these questions and proceed to answer them based on the user's confirmation \n \n 4. **Implementation:** \n - Your code/implementations should be reliable, scaleable, modular, and reusable. \n - You will be providing unit tests for the implementation upon user request. \n - You will be following MVC architecture for the applications \n - Your implementations must be well-commented and readable \n \n \n- Today's date is 23rd August 2024. \n- The default sender email is sender-assistant@email.com.\nHi, I am conducting research on retail customer feedback systems and I need assistance with designing and implementing them. Could you kindly provide me with a list of general customer feedback system modules?"
805
+ messages = [
806
+ {"role": "user", "content": custom_system_prompt + "\n\n" + prompt}
807
+ ]
808
+ # example tools
809
+ tools = [{"type": "function", "function": {"name": "getRetailFeedbackModules", "description": "Returns the list of modules usually present in the retail industry", "parameters": {"type": "object", "properties": {"page": {"type": "integer", "description": "The current page number.", "default": 1}, "page_size": {"type": "integer", "description": "The number of items per page.", "default": 3}}}}}, {"type": "function", "function": {"name": "verifyImplementation", "description": "Returns the list of modules usually present in the retail industry", "parameters": {"type": "object", "properties": {"coding_language": {"type": "string", "description": "The supported languages for verification of implementation.", "default": "python", "enum": ["python", "java", "php"]}, "code": {"type": "string", "description": "The code which needs verification"}, "design_pattern": {"type": "string", "description": "The design pattern to verify in the implementation", "enum": ["factory", "strategy", "singleton"]}, "verify_best_practices": {"type": "boolean", "description": "The verification of the coding style based on the language selected", "default": true}}}}}]
810
+ text = tokenizer.apply_chat_template(
811
+ messages,
812
+ tokenize=False,
813
+ add_generation_prompt=True,
814
+ tools=tools
815
+ )
816
+ model_inputs = tokenizer([text], return_tensors="pt")
817
+ ```
818
+
819
+ ---
820
+
821
+ ## Running with vLLM
822
+
823
+ As the upstream PR is not yet merged, you can use this custom image as an alternate way to run the model with tool and reasoning parsers enabled.
824
+
825
+ ### Docker Image
826
+
827
+ ```
828
+ docker.io/amant555/vllm_apriel:latest
829
+ ```
830
+
831
+ ### Start Command
832
+
833
+ ```bash
834
+ python3 -m vllm.entrypoints.openai.api_server \
835
+ --model ServiceNow-AI/Apriel-1.6-15b-Thinker \
836
+ --served-model-name Apriel-1p6-15B-Thinker \
837
+ --trust_remote_code \
838
+ --max-model-len 131072 \
839
+ --enable-auto-tool-choice \
840
+ --tool-call-parser apriel \
841
+ --reasoning-parser apriel
842
+ ```
843
+
844
+ ---
845
+ ## Additional Inference Options
846
+
847
+ Apriel-1.6-15b-Thinker is available on [Together AI](https://www.together.ai/models/apriel-1-6-15b-thinker) for hosted inference and on [Ollama](https://ollama.com/ServiceNow-AI/Apriel-1.6-15b-Thinker) for local use.
848
+
849
+ ---
850
+
851
+
852
+ # Training Details
853
+
854
+ **Training stack:** [Fast-LLM](https://github.com/ServiceNow/Fast-LLM), [VERL](https://github.com/volcengine/verl)
855
+
856
+ **Continual Pre-training:** Billions of tokens covering math, code, science, logical reasoning, and multimodal image-text data
857
+
858
+ **SFT:** 2.4M samples spanning math, code, instruction-following, function calling, and conversation, followed by an incremental lightweight multimodal SFT.
859
+
860
+ **RL:** Multi-stage RL with verifiable rewards and [GSPO](https://arxiv.org/abs/2507.18071) on text and vision tasks. Our RL stage optimizes reasoning efficiency: using fewer tokens by discouraging unnecessary intermediate steps, stopping earlier when confident, and giving direct answers on simple queries.
861
+
862
+ For more details on our training methodology, see our [blog post](https://huggingface.co/blog/ServiceNow-AI/apriel-1p6-15b-thinker).
863
+
864
+ ---
865
+
866
+ # Limitations
867
+
868
+ - **Factual accuracy:** May produce incorrect, misleading, or outdated content. Outputs should be verified before use in critical contexts.
869
+ - **Bias:** May reflect societal, cultural, or systemic biases present in training data.
870
+ - **Ethics:** Do not use the model to produce harmful, unlawful, or unethical content.
871
+ - **Language:** Strongest performance is in English. Output quality may degrade in underrepresented languages.
872
+ - **Critical use:** Not suitable for medical, legal, financial, or other high-risk applications without safeguards.
873
+
874
+ ---
875
+
876
+ # Security and Responsible Use
877
+
878
+ **Security Responsibilities:**
879
+ Deployers and users are strongly encouraged to align their security practices with established frameworks and regulatory guidelines such as the EU AI Act and the NIST AI Risk Management Framework (RMF).
880
+
881
+ <details>
882
+ <summary>Guidelines for Deployers</summary>
883
+
884
+ - Regularly conduct robustness assessments to identify and mitigate adversarial inputs.
885
+ - Implement validation and filtering processes to prevent harmful or biased outputs.
886
+ - Continuously perform data privacy checks to guard against unintended data leaks.
887
+ - Document and communicate the model's limitations, intended usage, and known security risks to all end-users.
888
+ - Schedule periodic security reviews and updates to address emerging threats and vulnerabilities.
889
+
890
+ </details>
891
+
892
+ <details>
893
+ <summary>Guidelines for Users</summary>
894
+
895
+ - Follow established security policies and usage guidelines provided by deployers.
896
+ - Protect and manage sensitive information when interacting with the model.
897
+ - Report anomalies, suspicious behavior, or unsafe outputs to deployers or developers.
898
+ - Maintain human oversight and apply judgment to mitigate potential security or ethical risks during interactions.
899
+
900
+ </details>
901
+
902
+ **Disclaimer:**
903
+ Users accept responsibility for securely deploying, managing, and using this open-source LLM. The model is provided "as-is," without explicit or implied warranty regarding security or fitness for any specific application or environment.
904
+
905
+ ---
906
+
907
+ # License
908
+
909
+ MIT
910
+
911
+ ---
912
+
913
+ # Citation
914
+
915
+ ```bibtex
916
+ @misc{radhakrishna2025apriel1515bthinker,
917
+ title={Apriel-1.5-15b-Thinker},
918
+ author={Shruthan Radhakrishna and Aman Tiwari and Aanjaneya Shukla and Masoud Hashemi and Rishabh Maheshwary and Shiva Krishna Reddy Malay and Jash Mehta and Pulkit Pattnaik and Saloni Mittal and Khalil Slimi and Kelechi Ogueji and Akintunde Oladipo and Soham Parikh and Oluwanifemi Bamgbose and Toby Liang and Ahmed Masry and Khyati Mahajan and Sai Rajeswar Mudumba and Vikas Yadav and Sathwik Tejaswi Madhusudhan and Torsten Scholak and Sagar Davasam and Srinivas Sunkara and Nicholas Chapados},
919
+ year={2025},
920
+ eprint={2510.01141},
921
+ archivePrefix={arXiv},
922
+ primaryClass={cs.AI},
923
+ url={https://arxiv.org/abs/2510.01141},
924
+ }
925
+ ```
chat_template.jinja ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {# ---------------------------------------------------------------------- #}
2
+ {# ƛƬ Default setup and flags #}
3
+ {# ---------------------------------------------------------------------- #}
4
+ {%- set messages = messages or [] -%}
5
+ {%- set tools = tools or [] -%}
6
+ {%- set add_generation_prompt = add_generation_prompt or false -%}
7
+ {%- set available_tool_string, add_tool_id = '', true -%}
8
+ {%- set add_thoughts = false -%} {# whether to include <thinking> reasoning blocks #}
9
+ {%- set add_generation_prompt = true -%} {# whether to emit reasoning starter before assistant response #}
10
+ {# Optional token placeholders (safe defaults) #}
11
+ {%- set bos_token = bos_token if (bos_token is defined) else '' -%}
12
+ {%- set eos_token = eos_token if (eos_token is defined) else '' -%}
13
+ {# ---------------------------------------------------------------------- #}
14
+ {# Core reasoning prompt and assistant reasoning prefix #}
15
+ {# ---------------------------------------------------------------------- #}
16
+ {%- set reasoning_prompt =
17
+ 'You are a thoughtful, systematic AI assistant from ServiceNow Language Models (SLAM) lab. '
18
+ 'Analyze each question carefully, present your reasoning step-by-step, then provide the final '
19
+ 'response after the marker [BEGIN FINAL RESPONSE].'
20
+ -%}
21
+ {%- set reasoning_asst_turn_start = 'Here are my reasoning steps:\n' -%}
22
+ {# ---------------------------------------------------------------------- #}
23
+ {# Tool list and tool call output format #}
24
+ {# ---------------------------------------------------------------------- #}
25
+ {%- if tools is not none and tools|length > 0 -%}
26
+ {%- set available_tool_string -%}
27
+ You are provided with function signatures within <available_tools></available_tools> XML tags.
28
+ You may call one or more functions to assist with the user query.
29
+ Don't make assumptions about the arguments. You should infer the argument values from previous
30
+ user responses and the system message.
31
+ Here are the available tools:
32
+ <available_tools>
33
+ {% for tool in tools %}{{ tool|string }}{% endfor %}
34
+
35
+ </available_tools>.
36
+
37
+ Return all function calls as a list of JSON objects within <tool_calls></tool_calls> XML tags.
38
+ Each JSON object should contain a function name and arguments as follows:
39
+ <tool_calls>[
40
+ {"name": <function-name-1>, "arguments": <args-dict-1>},
41
+ {"name": <function-name-2>, "arguments": <args-dict-2>},
42
+ ...
43
+ ]</tool_calls>
44
+ {%- endset -%}
45
+ {%- endif -%}
46
+ {# ---------------------------------------------------------------------- #}
47
+ {# Start system block if first message is not system #}
48
+ {# ---------------------------------------------------------------------- #}
49
+ {%- if messages|length > 0 and messages[0]['role'] != 'system' -%}
50
+ {%- if tools is not none and tools|length > 0 -%}
51
+ {{ bos_token + '<|begin_system|>\n' + reasoning_prompt + '\n' + available_tool_string + '\n' }}
52
+ {%- else -%}
53
+ {{ bos_token + '<|begin_system|>\n' + reasoning_prompt + '\n' }}
54
+ {%- endif -%}
55
+ {%- endif -%}
56
+ {# ---------------------------------------------------------------------- #}
57
+ {# Iterate through messages #}
58
+ {# ---------------------------------------------------------------------- #}
59
+ {%- for message in messages -%}
60
+
61
+ {# ---------------- USER MESSAGE ---------------- #}
62
+ {%- if message['role'] == 'user' -%}
63
+ {{ '<|begin_user|>\n' }}
64
+ {%- if message['content'] is not string -%}
65
+ {%- for chunk in message['content'] -%}
66
+ {%- if chunk['type'] == 'text' -%}
67
+ {{ chunk['text'] }}
68
+ {%- elif chunk['type'] in ['image', 'image_url'] -%}
69
+ {{ '[IMG]' }}
70
+ {%- else -%}
71
+ {{ raise_exception('Unrecognized content type!') }}
72
+ {%- endif -%}
73
+ {%- endfor -%}
74
+ {%- else -%}
75
+ {{ message['content'] }}
76
+ {%- endif -%}
77
+
78
+ {# ---------------- SYSTEM MESSAGE ---------------- #}
79
+ {%- elif message['role'] == 'system' -%}
80
+ {%- if message['content'] is not none and message['content']|length > 0 -%}
81
+ {%- if message['content'] is string -%}
82
+ {%- set system_message = message['content'] -%}
83
+ {%- else -%}
84
+ {%- set system_message = message['content'][0]['text'] -%}
85
+ {%- endif -%}
86
+ {%- else -%}
87
+ {%- set system_message = '' -%}
88
+ {%- endif -%}
89
+
90
+ {%- if tools is not none and tools|length > 0 -%}
91
+ {{ bos_token + '<|begin_system|>\n' + reasoning_prompt + '\n' + system_message + '\n' + available_tool_string + '\n' }}
92
+ {%- else -%}
93
+ {{ bos_token + '<|begin_system|>\n' + reasoning_prompt + '\n' + system_message + '\n' }}
94
+ {%- endif -%}
95
+
96
+ {# ---------------- ASSISTANT MESSAGE ---------------- #}
97
+ {%- elif message['role'] == 'assistant' -%}
98
+ {%- if loop.last -%}
99
+ {%- set add_tool_id = false -%}
100
+ {%- endif -%}
101
+
102
+ {{ '\n<|begin_assistant|>\n' }}
103
+
104
+ {%- if add_thoughts and 'thought' in message and message['thought'] is not none -%}
105
+ <thinking>{{ message['thought'] }}</thinking>
106
+ {%- endif -%}
107
+
108
+ {%- if message['content'] is not none and message['content']|length > 0 -%}
109
+ {%- if message['content'] is not string -%}
110
+ {{ message['content'][0]['text'] }}
111
+ {%- else -%}
112
+ {{ message['content'] }}
113
+ {%- endif -%}
114
+ {%- elif message['chosen'] is not none and message['chosen']|length > 0 -%}
115
+ {{ message['chosen'][0] }}
116
+ {%- endif -%}
117
+
118
+ {# Tool call output #}
119
+ {%- if message['tool_calls'] is not none and message['tool_calls']|length > 0 -%}
120
+ {{ '\n<tool_calls>[' }}
121
+ {%- for tool_call in message['tool_calls'] -%}
122
+ {{ '{"name": "' + tool_call['function']['name'] + '", "arguments": ' + tool_call['function']['arguments']|string }}
123
+ {%- if add_tool_id == true and 'id' in tool_call -%}
124
+ {{ ', "id": "' + tool_call['id'] + '"' }}
125
+ {%- endif -%}
126
+ {{ '}' }}
127
+ {%- if not loop.last -%}{{ ', ' }}{%- endif -%}
128
+ {%- endfor -%}
129
+ {{ ']</tool_calls>' }}
130
+ {%- endif -%}
131
+
132
+ {%- if not loop.last or training_prompt -%}
133
+ {{ '\n<|end|>\n' }}
134
+ {%- endif -%}
135
+
136
+ {# ---------------- TOOL RESULT MESSAGE ---------------- #}
137
+ {%- elif message['role'] == 'tool' -%}
138
+ {%- if message['content'] is string -%}
139
+ {%- set tool_message = message['content'] -%}
140
+ {%- else -%}
141
+ {%- set tool_message = message['content'][0]['text'] -%}
142
+ {%- endif -%}
143
+ {{ '<|begin_tool_result|>\n' + tool_message|string + '\n' }}
144
+
145
+ {# ---------------- CONTENT MESSAGE ---------------- #}
146
+ {%- elif message['role'] == 'content' -%}
147
+ {%- if message['content'] is not string -%}
148
+ {{ '<|begin_content|>\n' + message['content'][0]['text'] + '\n' }}
149
+ {%- else -%}
150
+ {{ '<|begin_content|>\n' + message['content'] + '\n' }}
151
+ {%- endif -%}
152
+ {%- endif -%}
153
+
154
+ {# ---------------- REASONING PROMPT BEFORE NEXT ASSISTANT ---------------- #}
155
+ {%- if loop.last and add_generation_prompt and message['role'] != 'assistant' -%}
156
+ {{ '\n<|begin_assistant|>\n' + reasoning_asst_turn_start }}
157
+ {%- endif -%}
158
+
159
+ {%- endfor -%}
config.json ADDED
@@ -0,0 +1,271 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "LlavaForConditionalGeneration"
4
+ ],
5
+ "dtype": "float32",
6
+ "ignore_index": -100,
7
+ "image_seq_length": 1,
8
+ "image_token_index": 10,
9
+ "model_type": "llava",
10
+ "multimodal_projector_bias": true,
11
+ "projector_hidden_act": "gelu",
12
+ "quantization_config": {
13
+ "config_groups": {
14
+ "group_0": {
15
+ "format": "pack-quantized",
16
+ "input_activations": null,
17
+ "output_activations": null,
18
+ "targets": [
19
+ "Linear"
20
+ ],
21
+ "weights": {
22
+ "actorder": null,
23
+ "block_structure": null,
24
+ "dynamic": false,
25
+ "group_size": 32,
26
+ "num_bits": 4,
27
+ "observer": "mse",
28
+ "observer_kwargs": {},
29
+ "strategy": "group",
30
+ "symmetric": true,
31
+ "type": "int"
32
+ }
33
+ }
34
+ },
35
+ "format": "pack-quantized",
36
+ "global_compression_ratio": null,
37
+ "ignore": [
38
+ "model.vision_tower.transformer.layers.0.feed_forward.gate_proj",
39
+ "model.vision_tower.transformer.layers.0.feed_forward.up_proj",
40
+ "model.vision_tower.transformer.layers.0.feed_forward.down_proj",
41
+ "model.vision_tower.transformer.layers.0.attention.k_proj",
42
+ "model.vision_tower.transformer.layers.0.attention.v_proj",
43
+ "model.vision_tower.transformer.layers.0.attention.q_proj",
44
+ "model.vision_tower.transformer.layers.0.attention.o_proj",
45
+ "model.vision_tower.transformer.layers.1.feed_forward.gate_proj",
46
+ "model.vision_tower.transformer.layers.1.feed_forward.up_proj",
47
+ "model.vision_tower.transformer.layers.1.feed_forward.down_proj",
48
+ "model.vision_tower.transformer.layers.1.attention.k_proj",
49
+ "model.vision_tower.transformer.layers.1.attention.v_proj",
50
+ "model.vision_tower.transformer.layers.1.attention.q_proj",
51
+ "model.vision_tower.transformer.layers.1.attention.o_proj",
52
+ "model.vision_tower.transformer.layers.2.feed_forward.gate_proj",
53
+ "model.vision_tower.transformer.layers.2.feed_forward.up_proj",
54
+ "model.vision_tower.transformer.layers.2.feed_forward.down_proj",
55
+ "model.vision_tower.transformer.layers.2.attention.k_proj",
56
+ "model.vision_tower.transformer.layers.2.attention.v_proj",
57
+ "model.vision_tower.transformer.layers.2.attention.q_proj",
58
+ "model.vision_tower.transformer.layers.2.attention.o_proj",
59
+ "model.vision_tower.transformer.layers.3.feed_forward.gate_proj",
60
+ "model.vision_tower.transformer.layers.3.feed_forward.up_proj",
61
+ "model.vision_tower.transformer.layers.3.feed_forward.down_proj",
62
+ "model.vision_tower.transformer.layers.3.attention.k_proj",
63
+ "model.vision_tower.transformer.layers.3.attention.v_proj",
64
+ "model.vision_tower.transformer.layers.3.attention.q_proj",
65
+ "model.vision_tower.transformer.layers.3.attention.o_proj",
66
+ "model.vision_tower.transformer.layers.4.feed_forward.gate_proj",
67
+ "model.vision_tower.transformer.layers.4.feed_forward.up_proj",
68
+ "model.vision_tower.transformer.layers.4.feed_forward.down_proj",
69
+ "model.vision_tower.transformer.layers.4.attention.k_proj",
70
+ "model.vision_tower.transformer.layers.4.attention.v_proj",
71
+ "model.vision_tower.transformer.layers.4.attention.q_proj",
72
+ "model.vision_tower.transformer.layers.4.attention.o_proj",
73
+ "model.vision_tower.transformer.layers.5.feed_forward.gate_proj",
74
+ "model.vision_tower.transformer.layers.5.feed_forward.up_proj",
75
+ "model.vision_tower.transformer.layers.5.feed_forward.down_proj",
76
+ "model.vision_tower.transformer.layers.5.attention.k_proj",
77
+ "model.vision_tower.transformer.layers.5.attention.v_proj",
78
+ "model.vision_tower.transformer.layers.5.attention.q_proj",
79
+ "model.vision_tower.transformer.layers.5.attention.o_proj",
80
+ "model.vision_tower.transformer.layers.6.feed_forward.gate_proj",
81
+ "model.vision_tower.transformer.layers.6.feed_forward.up_proj",
82
+ "model.vision_tower.transformer.layers.6.feed_forward.down_proj",
83
+ "model.vision_tower.transformer.layers.6.attention.k_proj",
84
+ "model.vision_tower.transformer.layers.6.attention.v_proj",
85
+ "model.vision_tower.transformer.layers.6.attention.q_proj",
86
+ "model.vision_tower.transformer.layers.6.attention.o_proj",
87
+ "model.vision_tower.transformer.layers.7.feed_forward.gate_proj",
88
+ "model.vision_tower.transformer.layers.7.feed_forward.up_proj",
89
+ "model.vision_tower.transformer.layers.7.feed_forward.down_proj",
90
+ "model.vision_tower.transformer.layers.7.attention.k_proj",
91
+ "model.vision_tower.transformer.layers.7.attention.v_proj",
92
+ "model.vision_tower.transformer.layers.7.attention.q_proj",
93
+ "model.vision_tower.transformer.layers.7.attention.o_proj",
94
+ "model.vision_tower.transformer.layers.8.feed_forward.gate_proj",
95
+ "model.vision_tower.transformer.layers.8.feed_forward.up_proj",
96
+ "model.vision_tower.transformer.layers.8.feed_forward.down_proj",
97
+ "model.vision_tower.transformer.layers.8.attention.k_proj",
98
+ "model.vision_tower.transformer.layers.8.attention.v_proj",
99
+ "model.vision_tower.transformer.layers.8.attention.q_proj",
100
+ "model.vision_tower.transformer.layers.8.attention.o_proj",
101
+ "model.vision_tower.transformer.layers.9.feed_forward.gate_proj",
102
+ "model.vision_tower.transformer.layers.9.feed_forward.up_proj",
103
+ "model.vision_tower.transformer.layers.9.feed_forward.down_proj",
104
+ "model.vision_tower.transformer.layers.9.attention.k_proj",
105
+ "model.vision_tower.transformer.layers.9.attention.v_proj",
106
+ "model.vision_tower.transformer.layers.9.attention.q_proj",
107
+ "model.vision_tower.transformer.layers.9.attention.o_proj",
108
+ "model.vision_tower.transformer.layers.10.feed_forward.gate_proj",
109
+ "model.vision_tower.transformer.layers.10.feed_forward.up_proj",
110
+ "model.vision_tower.transformer.layers.10.feed_forward.down_proj",
111
+ "model.vision_tower.transformer.layers.10.attention.k_proj",
112
+ "model.vision_tower.transformer.layers.10.attention.v_proj",
113
+ "model.vision_tower.transformer.layers.10.attention.q_proj",
114
+ "model.vision_tower.transformer.layers.10.attention.o_proj",
115
+ "model.vision_tower.transformer.layers.11.feed_forward.gate_proj",
116
+ "model.vision_tower.transformer.layers.11.feed_forward.up_proj",
117
+ "model.vision_tower.transformer.layers.11.feed_forward.down_proj",
118
+ "model.vision_tower.transformer.layers.11.attention.k_proj",
119
+ "model.vision_tower.transformer.layers.11.attention.v_proj",
120
+ "model.vision_tower.transformer.layers.11.attention.q_proj",
121
+ "model.vision_tower.transformer.layers.11.attention.o_proj",
122
+ "model.vision_tower.transformer.layers.12.feed_forward.gate_proj",
123
+ "model.vision_tower.transformer.layers.12.feed_forward.up_proj",
124
+ "model.vision_tower.transformer.layers.12.feed_forward.down_proj",
125
+ "model.vision_tower.transformer.layers.12.attention.k_proj",
126
+ "model.vision_tower.transformer.layers.12.attention.v_proj",
127
+ "model.vision_tower.transformer.layers.12.attention.q_proj",
128
+ "model.vision_tower.transformer.layers.12.attention.o_proj",
129
+ "model.vision_tower.transformer.layers.13.feed_forward.gate_proj",
130
+ "model.vision_tower.transformer.layers.13.feed_forward.up_proj",
131
+ "model.vision_tower.transformer.layers.13.feed_forward.down_proj",
132
+ "model.vision_tower.transformer.layers.13.attention.k_proj",
133
+ "model.vision_tower.transformer.layers.13.attention.v_proj",
134
+ "model.vision_tower.transformer.layers.13.attention.q_proj",
135
+ "model.vision_tower.transformer.layers.13.attention.o_proj",
136
+ "model.vision_tower.transformer.layers.14.feed_forward.gate_proj",
137
+ "model.vision_tower.transformer.layers.14.feed_forward.up_proj",
138
+ "model.vision_tower.transformer.layers.14.feed_forward.down_proj",
139
+ "model.vision_tower.transformer.layers.14.attention.k_proj",
140
+ "model.vision_tower.transformer.layers.14.attention.v_proj",
141
+ "model.vision_tower.transformer.layers.14.attention.q_proj",
142
+ "model.vision_tower.transformer.layers.14.attention.o_proj",
143
+ "model.vision_tower.transformer.layers.15.feed_forward.gate_proj",
144
+ "model.vision_tower.transformer.layers.15.feed_forward.up_proj",
145
+ "model.vision_tower.transformer.layers.15.feed_forward.down_proj",
146
+ "model.vision_tower.transformer.layers.15.attention.k_proj",
147
+ "model.vision_tower.transformer.layers.15.attention.v_proj",
148
+ "model.vision_tower.transformer.layers.15.attention.q_proj",
149
+ "model.vision_tower.transformer.layers.15.attention.o_proj",
150
+ "model.vision_tower.transformer.layers.16.feed_forward.gate_proj",
151
+ "model.vision_tower.transformer.layers.16.feed_forward.up_proj",
152
+ "model.vision_tower.transformer.layers.16.feed_forward.down_proj",
153
+ "model.vision_tower.transformer.layers.16.attention.k_proj",
154
+ "model.vision_tower.transformer.layers.16.attention.v_proj",
155
+ "model.vision_tower.transformer.layers.16.attention.q_proj",
156
+ "model.vision_tower.transformer.layers.16.attention.o_proj",
157
+ "model.vision_tower.transformer.layers.17.feed_forward.gate_proj",
158
+ "model.vision_tower.transformer.layers.17.feed_forward.up_proj",
159
+ "model.vision_tower.transformer.layers.17.feed_forward.down_proj",
160
+ "model.vision_tower.transformer.layers.17.attention.k_proj",
161
+ "model.vision_tower.transformer.layers.17.attention.v_proj",
162
+ "model.vision_tower.transformer.layers.17.attention.q_proj",
163
+ "model.vision_tower.transformer.layers.17.attention.o_proj",
164
+ "model.vision_tower.transformer.layers.18.feed_forward.gate_proj",
165
+ "model.vision_tower.transformer.layers.18.feed_forward.up_proj",
166
+ "model.vision_tower.transformer.layers.18.feed_forward.down_proj",
167
+ "model.vision_tower.transformer.layers.18.attention.k_proj",
168
+ "model.vision_tower.transformer.layers.18.attention.v_proj",
169
+ "model.vision_tower.transformer.layers.18.attention.q_proj",
170
+ "model.vision_tower.transformer.layers.18.attention.o_proj",
171
+ "model.vision_tower.transformer.layers.19.feed_forward.gate_proj",
172
+ "model.vision_tower.transformer.layers.19.feed_forward.up_proj",
173
+ "model.vision_tower.transformer.layers.19.feed_forward.down_proj",
174
+ "model.vision_tower.transformer.layers.19.attention.k_proj",
175
+ "model.vision_tower.transformer.layers.19.attention.v_proj",
176
+ "model.vision_tower.transformer.layers.19.attention.q_proj",
177
+ "model.vision_tower.transformer.layers.19.attention.o_proj",
178
+ "model.vision_tower.transformer.layers.20.feed_forward.gate_proj",
179
+ "model.vision_tower.transformer.layers.20.feed_forward.up_proj",
180
+ "model.vision_tower.transformer.layers.20.feed_forward.down_proj",
181
+ "model.vision_tower.transformer.layers.20.attention.k_proj",
182
+ "model.vision_tower.transformer.layers.20.attention.v_proj",
183
+ "model.vision_tower.transformer.layers.20.attention.q_proj",
184
+ "model.vision_tower.transformer.layers.20.attention.o_proj",
185
+ "model.vision_tower.transformer.layers.21.feed_forward.gate_proj",
186
+ "model.vision_tower.transformer.layers.21.feed_forward.up_proj",
187
+ "model.vision_tower.transformer.layers.21.feed_forward.down_proj",
188
+ "model.vision_tower.transformer.layers.21.attention.k_proj",
189
+ "model.vision_tower.transformer.layers.21.attention.v_proj",
190
+ "model.vision_tower.transformer.layers.21.attention.q_proj",
191
+ "model.vision_tower.transformer.layers.21.attention.o_proj",
192
+ "model.vision_tower.transformer.layers.22.feed_forward.gate_proj",
193
+ "model.vision_tower.transformer.layers.22.feed_forward.up_proj",
194
+ "model.vision_tower.transformer.layers.22.feed_forward.down_proj",
195
+ "model.vision_tower.transformer.layers.22.attention.k_proj",
196
+ "model.vision_tower.transformer.layers.22.attention.v_proj",
197
+ "model.vision_tower.transformer.layers.22.attention.q_proj",
198
+ "model.vision_tower.transformer.layers.22.attention.o_proj",
199
+ "model.vision_tower.transformer.layers.23.feed_forward.gate_proj",
200
+ "model.vision_tower.transformer.layers.23.feed_forward.up_proj",
201
+ "model.vision_tower.transformer.layers.23.feed_forward.down_proj",
202
+ "model.vision_tower.transformer.layers.23.attention.k_proj",
203
+ "model.vision_tower.transformer.layers.23.attention.v_proj",
204
+ "model.vision_tower.transformer.layers.23.attention.q_proj",
205
+ "model.vision_tower.transformer.layers.23.attention.o_proj",
206
+ "model.multi_modal_projector.linear_1",
207
+ "model.multi_modal_projector.linear_2",
208
+ "lm_head"
209
+ ],
210
+ "kv_cache_scheme": null,
211
+ "quant_method": "compressed-tensors",
212
+ "quantization_status": "compressed",
213
+ "sparsity_config": {},
214
+ "transform_config": {},
215
+ "version": "0.12.3.a20251203"
216
+ },
217
+ "text_config": {
218
+ "_attn_implementation_autoset": false,
219
+ "attention_dropout": 0.0,
220
+ "dtype": "float32",
221
+ "head_dim": 128,
222
+ "hidden_act": "silu",
223
+ "hidden_size": 5120,
224
+ "initializer_range": 0.02,
225
+ "intermediate_size": 14336,
226
+ "max_position_embeddings": 262400,
227
+ "model_type": "mistral",
228
+ "num_attention_heads": 32,
229
+ "num_hidden_layers": 48,
230
+ "num_key_value_heads": 8,
231
+ "pruned_heads": {},
232
+ "rms_norm_eps": 1e-05,
233
+ "rope_parameters": {
234
+ "rope_theta": 1000000000.0,
235
+ "rope_type": "default"
236
+ },
237
+ "sliding_window": null,
238
+ "tf_legacy_loss": false,
239
+ "torchscript": false,
240
+ "use_bfloat16": false,
241
+ "use_cache": true,
242
+ "vocab_size": 131072
243
+ },
244
+ "transformers_version": "5.0.0.dev0",
245
+ "vision_config": {
246
+ "_attn_implementation_autoset": false,
247
+ "attention_dropout": 0.0,
248
+ "dtype": "float32",
249
+ "head_dim": 64,
250
+ "hidden_act": "silu",
251
+ "hidden_size": 1024,
252
+ "image_size": 1024,
253
+ "initializer_range": 0.02,
254
+ "intermediate_size": 4096,
255
+ "model_type": "pixtral",
256
+ "num_attention_heads": 16,
257
+ "num_channels": 3,
258
+ "num_hidden_layers": 24,
259
+ "patch_size": 16,
260
+ "pruned_heads": {},
261
+ "rope_parameters": {
262
+ "rope_theta": 10000.0,
263
+ "rope_type": "default"
264
+ },
265
+ "tf_legacy_loss": false,
266
+ "torchscript": false,
267
+ "use_bfloat16": false
268
+ },
269
+ "vision_feature_layer": -1,
270
+ "vision_feature_select_strategy": "full"
271
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "transformers_version": "4.49.0"
6
+ }
model-00001-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe54efbb0f4585d8495e2ad42c45791e1baa1799eb28e0abc398d6b782349ae8
3
+ size 2684354704
model-00002-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5946a049beccee410214c8335a5d0ab216372ff09f38dc82a5b25f8d05d8ec99
3
+ size 4991815688
model-00003-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f375f476d5ea64bd5f9db4d879783250cc7b42e2ec7570e754b20d28e751b9d1
3
+ size 4991864760
model-00004-of-00004.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:431543dc3e1134f74f3bfabe0383649711036acc7c5305632d080024e74e91d7
3
+ size 2621559976
model.safetensors.index.json ADDED
The diff for this file is too large to render. See raw diff
 
preprocessor_config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "do_convert_rgb": true,
3
+ "do_normalize": true,
4
+ "do_rescale": true,
5
+ "do_resize": true,
6
+ "image_mean": [
7
+ 0.48145466,
8
+ 0.4578275,
9
+ 0.40821073
10
+ ],
11
+ "image_processor_type": "PixtralImageProcessor",
12
+ "image_std": [
13
+ 0.26862954,
14
+ 0.26130258,
15
+ 0.27577711
16
+ ],
17
+ "patch_size": {
18
+ "height": 16,
19
+ "width": 16
20
+ },
21
+ "processor_class": "PixtralProcessor",
22
+ "resample": 3,
23
+ "rescale_factor": 0.00392156862745098,
24
+ "size": {
25
+ "longest_edge": 1024
26
+ }
27
+ }
recipe.yaml ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ default_stage:
2
+ default_modifiers:
3
+ AWQModifier:
4
+ config_groups:
5
+ group_0:
6
+ targets: [Linear]
7
+ weights:
8
+ num_bits: 4
9
+ type: int
10
+ symmetric: true
11
+ group_size: 32
12
+ strategy: group
13
+ block_structure: null
14
+ dynamic: false
15
+ actorder: null
16
+ scale_dtype: null
17
+ zp_dtype: null
18
+ observer: mse
19
+ observer_kwargs: {}
20
+ input_activations: null
21
+ output_activations: null
22
+ format: null
23
+ targets: [Linear]
24
+ ignore: ['re:.*embed_tokens', 're:.*input_layernorm$', 're:.*post_attention_layernorm$',
25
+ 're:.*model.norm', 're:.*lm_head', 're:.*multi_modal_projector.*', 're:.*vision_tower.*']
26
+ mappings:
27
+ - smooth_layer: re:.*input_layernorm$
28
+ balance_layers: ['re:.*q_proj$', 're:.*k_proj$', 're:.*v_proj$']
29
+ - smooth_layer: re:.*v_proj$
30
+ balance_layers: ['re:.*o_proj$']
31
+ - smooth_layer: re:.*post_attention_layernorm$
32
+ balance_layers: ['re:.*gate_proj$', 're:.*up_proj$']
33
+ - smooth_layer: re:.*up_proj$
34
+ balance_layers: ['re:.*down_proj$']
35
+ offload_device: !!python/object/apply:torch.device [cpu]
36
+ duo_scaling: true
37
+ n_grid: 20
special_tokens_map.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "<pad>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "unk_token": {
24
+ "content": "<unk>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ }
30
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50c4196bd3d61abf4a6f9d116435140b8ac0606e15eb4d02e235f9036257dc3e
3
+ size 17077327
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff