Mungert commited on
Commit
968ac19
·
verified ·
0 Parent(s):

Super-squash history to reclaim storage

Browse files
.gitattributes ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz 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
+ Devstral-Small-2505-f16.gguf filter=lfs diff=lfs merge=lfs -text
37
+ Devstral-Small-2505-f16_q8_0.gguf filter=lfs diff=lfs merge=lfs -text
38
+ Devstral-Small-2505-bf16_q8_0.gguf filter=lfs diff=lfs merge=lfs -text
39
+ Devstral-Small-2505-f16_q6_k.gguf filter=lfs diff=lfs merge=lfs -text
40
+ Devstral-Small-2505-bf16_q6_k.gguf filter=lfs diff=lfs merge=lfs -text
41
+ Devstral-Small-2505-f16_q4_k.gguf filter=lfs diff=lfs merge=lfs -text
42
+ Devstral-Small-2505-bf16_q4_k.gguf filter=lfs diff=lfs merge=lfs -text
43
+ Devstral-Small-2505-q2_k_l.gguf filter=lfs diff=lfs merge=lfs -text
44
+ Devstral-Small-2505-q3_k_l.gguf filter=lfs diff=lfs merge=lfs -text
45
+ Devstral-Small-2505-q4_k_l.gguf filter=lfs diff=lfs merge=lfs -text
46
+ Devstral-Small-2505-q5_k_l.gguf filter=lfs diff=lfs merge=lfs -text
47
+ Devstral-Small-2505-q6_k_l.gguf filter=lfs diff=lfs merge=lfs -text
48
+ Devstral-Small-2505-q2_k_m.gguf filter=lfs diff=lfs merge=lfs -text
49
+ Devstral-Small-2505-q2_k_s.gguf filter=lfs diff=lfs merge=lfs -text
50
+ Devstral-Small-2505-q3_k_m.gguf filter=lfs diff=lfs merge=lfs -text
51
+ Devstral-Small-2505-q3_k_s.gguf filter=lfs diff=lfs merge=lfs -text
52
+ Devstral-Small-2505-q4_k_m.gguf filter=lfs diff=lfs merge=lfs -text
53
+ Devstral-Small-2505-q4_k_s.gguf filter=lfs diff=lfs merge=lfs -text
54
+ Devstral-Small-2505-q5_k_m.gguf filter=lfs diff=lfs merge=lfs -text
55
+ Devstral-Small-2505-q5_k_s.gguf filter=lfs diff=lfs merge=lfs -text
56
+ Devstral-Small-2505-q6_k_m.gguf filter=lfs diff=lfs merge=lfs -text
57
+ Devstral-Small-2505-q8_0.gguf filter=lfs diff=lfs merge=lfs -text
58
+ Devstral-Small-2505-q4_0.gguf filter=lfs diff=lfs merge=lfs -text
59
+ Devstral-Small-2505-q4_1.gguf filter=lfs diff=lfs merge=lfs -text
60
+ Devstral-Small-2505-q4_0_l.gguf filter=lfs diff=lfs merge=lfs -text
61
+ Devstral-Small-2505-q4_1_l.gguf filter=lfs diff=lfs merge=lfs -text
62
+ Devstral-Small-2505-q5_0.gguf filter=lfs diff=lfs merge=lfs -text
63
+ Devstral-Small-2505-q5_1.gguf filter=lfs diff=lfs merge=lfs -text
64
+ Devstral-Small-2505-q5_0_l.gguf filter=lfs diff=lfs merge=lfs -text
65
+ Devstral-Small-2505-q5_1_l.gguf filter=lfs diff=lfs merge=lfs -text
66
+ Devstral-Small-2505-iq1_s.gguf filter=lfs diff=lfs merge=lfs -text
67
+ Devstral-Small-2505-iq1_m.gguf filter=lfs diff=lfs merge=lfs -text
68
+ Devstral-Small-2505-iq2_xs.gguf filter=lfs diff=lfs merge=lfs -text
69
+ Devstral-Small-2505-iq2_xxs.gguf filter=lfs diff=lfs merge=lfs -text
70
+ Devstral-Small-2505-iq2_s.gguf filter=lfs diff=lfs merge=lfs -text
71
+ Devstral-Small-2505-iq2_m.gguf filter=lfs diff=lfs merge=lfs -text
72
+ Devstral-Small-2505-iq3_xs.gguf filter=lfs diff=lfs merge=lfs -text
73
+ Devstral-Small-2505-iq3_xxs.gguf filter=lfs diff=lfs merge=lfs -text
74
+ Devstral-Small-2505-iq3_s.gguf filter=lfs diff=lfs merge=lfs -text
75
+ Devstral-Small-2505-iq3_m.gguf filter=lfs diff=lfs merge=lfs -text
76
+ Devstral-Small-2505-iq4_xs.gguf filter=lfs diff=lfs merge=lfs -text
77
+ Devstral-Small-2505-iq4_nl.gguf filter=lfs diff=lfs merge=lfs -text
78
+ Devstral-Small-2505-tq1_0.gguf filter=lfs diff=lfs merge=lfs -text
79
+ Devstral-Small-2505-tq2_0.gguf filter=lfs diff=lfs merge=lfs -text
80
+ Devstral-Small-2505.imatrix filter=lfs diff=lfs merge=lfs -text
81
+ Devstral-Small-2505-bf16.gguf filter=lfs diff=lfs merge=lfs -text
Devstral-Small-2505-bf16.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89aa48627ed17923a5e5bded64cf7c05cfa34fe6a33647fda91f98392712e894
3
+ size 47153525504
Devstral-Small-2505-bf16_q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7282919ea781fccb5de9d55bb0ae34563098129e6f21938199861d96fa873504
3
+ size 33587573504
Devstral-Small-2505-f16_q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a339e6e42fcb59944205f22f0e35af5e18287d6ee03f0ec475cb49722b76beee
3
+ size 33587573504
Devstral-Small-2505-iq1_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:92b05f966a8a95b79c5f719f6ebcfe403c027aecf1b8daa80bc47d3caf491fb4
3
+ size 7045821504
Devstral-Small-2505-iq1_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c5d569560295aecb0379f8a7157c27ad9c40ef8854b025df19116f2be55f1fe
3
+ size 6516618304
Devstral-Small-2505-iq2_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd7d33a0a8a02ff8ce3192db07362f87e7788560a49118baff26450e66b1c3c9
3
+ size 8686515264
Devstral-Small-2505-iq2_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b6bd0e830ec746a457b8bbfc2ecf35f4c5630200c6dc293003960291af3efc6
3
+ size 8247424064
Devstral-Small-2505-iq2_xs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2bcd61a98c178442efd55525d5fd8b3c90ec236c4792de091997ebfc0e50cfea
3
+ size 7989539904
Devstral-Small-2505-iq2_xxs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:449aad327588c796fde7e01ae5c31dc8c1a58a072199cb27e035c3268366990c
3
+ size 7355479104
Devstral-Small-2505-iq3_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65a621dc52967841ce647f6a259f664a2771bf6d5429ee5836e8e1f655b14807
3
+ size 10617861184
Devstral-Small-2505-iq3_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70951b64b8298332bc1489359ba5c351dc6eca7080093236820a123f79f3c4f0
3
+ size 10506449984
Devstral-Small-2505-iq3_xs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf2d7eb2916205f40d686338cb5fed6a4ef1d91ef52ecff98308e6bfa0c046db
3
+ size 9985438784
Devstral-Small-2505-iq3_xxs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:387bd32c570948d96496969114552c42ac83352f1373aada8e5ea859166a9261
3
+ size 9510958144
Devstral-Small-2505-iq4_nl.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:403ffaac4d059825ac192bf9f721a8138eae44f384d0c990c89eb30fd4843515
3
+ size 13468021824
Devstral-Small-2505-iq4_xs.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:555c3bf2d26d9eb9a8549fdfd37ddf372084b61d7ccc44f5618a96cbf75ad265
3
+ size 12758922304
Devstral-Small-2505-q2_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e4bd9122b1911df3a5496a9dae48de844115dbcb02a8523bcfcd70122201ae7
3
+ size 9142318144
Devstral-Small-2505-q2_k_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7e9296045802d20e8211c04437c31012322cacc3e27f9d6cc57c93ea0e6c46f9
3
+ size 8389964864
Devstral-Small-2505-q3_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ba021a2a91919a9fd1caa646d9e47f81b717dd207ff94f4627ae089b2c09b5a
3
+ size 11644482624
Devstral-Small-2505-q3_k_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ce53ba70ba6e22ce6b5f34fd83db5d0ffc93f443f3895bb4614a878c7a4bb96
3
+ size 10641781824
Devstral-Small-2505-q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d3d14ca810b73086d78a316ef210394400afaa959dc627f4493bf8bdf9641cbe
3
+ size 13268792384
Devstral-Small-2505-q4_1.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:127051dd38627d53f6590b4e1c13f8964cc6a11d1179431c050c84ea6f382a38
3
+ size 14742041664
Devstral-Small-2505-q4_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2aef4472c8a5d3c177a83c9d8d17961f7ba672f0c964a01eb2ffb84283228fad
3
+ size 14344074304
Devstral-Small-2505-q4_k_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d2767b079cbbb28a0221c14a29d56a6f04984f0a63cef57f9bfe80e10b7c7aef
3
+ size 13829780544
Devstral-Small-2505-q5_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ddd51f0e61394ccdd31f8cb4438d9ff35d18ba1a8e092c06d4686039b952b5e
3
+ size 16215290944
Devstral-Small-2505-q5_1.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a3102ef832359b2adec49d2538b847827e2ef6c5002a20d305e345726be8870c
3
+ size 17688540224
Devstral-Small-2505-q5_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8cf7edbf3e12a7173792fe41df91d0ca350b7a13dd7e20e9b5650ca85011a35d
3
+ size 16875402304
Devstral-Small-2505-q5_k_s.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2116dd423d01abbef2e18be6c3090bce9dd6cb1f92968835d7abc03afe4a654
3
+ size 16599659584
Devstral-Small-2505-q6_k_m.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5d08738dee69bdccdbafef73f728ef584e16f18d10363e5f10f5378c1ae4ee6f
3
+ size 19345945664
Devstral-Small-2505-q8_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:94a24a7597d1ce08150f6fbcc15a478afd8ab07e520b4dd2673aa0fd45a805ac
3
+ size 25054786304
Devstral-Small-2505-tq1_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1164d4ec2620eac3d0361633475bab8a002dab20e4cce882af07443838674c4
3
+ size 5626639424
Devstral-Small-2505-tq2_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62999e293a0ca23542d0f8942f196830dd3e6928dd9edd34c9a7e0401e55fcc7
3
+ size 6668661824
Devstral-Small-2505.imatrix ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:238cf635da7128aed1e84edc76314a429776f82b378ddc794ebbb978a8c09076
3
+ size 10003572
README.md ADDED
@@ -0,0 +1,669 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - fr
5
+ - de
6
+ - es
7
+ - pt
8
+ - it
9
+ - ja
10
+ - ko
11
+ - ru
12
+ - zh
13
+ - ar
14
+ - fa
15
+ - id
16
+ - ms
17
+ - ne
18
+ - pl
19
+ - ro
20
+ - sr
21
+ - sv
22
+ - tr
23
+ - uk
24
+ - vi
25
+ - hi
26
+ - bn
27
+ license: apache-2.0
28
+ library_name: vllm
29
+ inference: false
30
+ base_model:
31
+ - mistralai/Devstral-Small-2505
32
+ extra_gated_description: >-
33
+ If you want to learn more about how we process your personal data, please read
34
+ our <a href="https://mistral.ai/terms/">Privacy Policy</a>.
35
+ pipeline_tag: text2text-generation
36
+ ---
37
+
38
+ # <span style="color: #7FFF7F;">Devstral-Small-2505 GGUF Models</span>
39
+
40
+
41
+ ## <span style="color: #7F7FFF;">Model Generation Details</span>
42
+
43
+ This model was generated using [llama.cpp](https://github.com/ggerganov/llama.cpp) at commit [`f5cd27b7`](https://github.com/ggerganov/llama.cpp/commit/f5cd27b71da3ac375a04a41643d14fc779a8057b).
44
+
45
+
46
+
47
+
48
+ ## <span style="color: #7FFF7F;">Ultra-Low-Bit Quantization with IQ-DynamicGate (1-2 bit)</span>
49
+
50
+ Our latest quantization method introduces **precision-adaptive quantization** for ultra-low-bit models (1-2 bit), with benchmark-proven improvements on **Llama-3-8B**. This approach uses layer-specific strategies to preserve accuracy while maintaining extreme memory efficiency.
51
+
52
+ ### **Benchmark Context**
53
+ All tests conducted on **Llama-3-8B-Instruct** using:
54
+ - Standard perplexity evaluation pipeline
55
+ - 2048-token context window
56
+ - Same prompt set across all quantizations
57
+
58
+ ### **Method**
59
+ - **Dynamic Precision Allocation**:
60
+ - First/Last 25% of layers → IQ4_XS (selected layers)
61
+ - Middle 50% → IQ2_XXS/IQ3_S (increase efficiency)
62
+ - **Critical Component Protection**:
63
+ - Embeddings/output layers use Q5_K
64
+ - Reduces error propagation by 38% vs standard 1-2bit
65
+
66
+ ### **Quantization Performance Comparison (Llama-3-8B)**
67
+
68
+ | Quantization | Standard PPL | DynamicGate PPL | Δ PPL | Std Size | DG Size | Δ Size | Std Speed | DG Speed |
69
+ |--------------|--------------|------------------|---------|----------|---------|--------|-----------|----------|
70
+ | IQ2_XXS | 11.30 | 9.84 | -12.9% | 2.5G | 2.6G | +0.1G | 234s | 246s |
71
+ | IQ2_XS | 11.72 | 11.63 | -0.8% | 2.7G | 2.8G | +0.1G | 242s | 246s |
72
+ | IQ2_S | 14.31 | 9.02 | -36.9% | 2.7G | 2.9G | +0.2G | 238s | 244s |
73
+ | IQ1_M | 27.46 | 15.41 | -43.9% | 2.2G | 2.5G | +0.3G | 206s | 212s |
74
+ | IQ1_S | 53.07 | 32.00 | -39.7% | 2.1G | 2.4G | +0.3G | 184s | 209s |
75
+
76
+ **Key**:
77
+ - PPL = Perplexity (lower is better)
78
+ - Δ PPL = Percentage change from standard to DynamicGate
79
+ - Speed = Inference time (CPU avx2, 2048 token context)
80
+ - Size differences reflect mixed quantization overhead
81
+
82
+ **Key Improvements:**
83
+ - 🔥 **IQ1_M** shows massive 43.9% perplexity reduction (27.46 → 15.41)
84
+ - 🚀 **IQ2_S** cuts perplexity by 36.9% while adding only 0.2GB
85
+ - ⚡ **IQ1_S** maintains 39.7% better accuracy despite 1-bit quantization
86
+
87
+ **Tradeoffs:**
88
+ - All variants have modest size increases (0.1-0.3GB)
89
+ - Inference speeds remain comparable (<5% difference)
90
+
91
+
92
+ ### **When to Use These Models**
93
+ 📌 **Fitting models into GPU VRAM**
94
+
95
+ ✔ **Memory-constrained deployments**
96
+
97
+ ✔ **Cpu and Edge Devices** where 1-2bit errors can be tolerated
98
+
99
+ ✔ **Research** into ultra-low-bit quantization
100
+
101
+
102
+
103
+ ## **Choosing the Right Model Format**
104
+
105
+ Selecting the correct model format depends on your **hardware capabilities** and **memory constraints**.
106
+
107
+ ### **BF16 (Brain Float 16) – Use if BF16 acceleration is available**
108
+ - A 16-bit floating-point format designed for **faster computation** while retaining good precision.
109
+ - Provides **similar dynamic range** as FP32 but with **lower memory usage**.
110
+ - Recommended if your hardware supports **BF16 acceleration** (check your device's specs).
111
+ - Ideal for **high-performance inference** with **reduced memory footprint** compared to FP32.
112
+
113
+ 📌 **Use BF16 if:**
114
+ ✔ Your hardware has native **BF16 support** (e.g., newer GPUs, TPUs).
115
+ ✔ You want **higher precision** while saving memory.
116
+ ✔ You plan to **requantize** the model into another format.
117
+
118
+ 📌 **Avoid BF16 if:**
119
+ ❌ Your hardware does **not** support BF16 (it may fall back to FP32 and run slower).
120
+ ❌ You need compatibility with older devices that lack BF16 optimization.
121
+
122
+ ---
123
+
124
+ ### **F16 (Float 16) – More widely supported than BF16**
125
+ - A 16-bit floating-point **high precision** but with less of range of values than BF16.
126
+ - Works on most devices with **FP16 acceleration support** (including many GPUs and some CPUs).
127
+ - Slightly lower numerical precision than BF16 but generally sufficient for inference.
128
+
129
+ 📌 **Use F16 if:**
130
+ ✔ Your hardware supports **FP16** but **not BF16**.
131
+ ✔ You need a **balance between speed, memory usage, and accuracy**.
132
+ ✔ You are running on a **GPU** or another device optimized for FP16 computations.
133
+
134
+ 📌 **Avoid F16 if:**
135
+ ❌ Your device lacks **native FP16 support** (it may run slower than expected).
136
+ ❌ You have memory limitations.
137
+
138
+ ---
139
+
140
+ ### **Quantized Models (Q4_K, Q6_K, Q8, etc.) – For CPU & Low-VRAM Inference**
141
+ Quantization reduces model size and memory usage while maintaining as much accuracy as possible.
142
+ - **Lower-bit models (Q4_K)** → **Best for minimal memory usage**, may have lower precision.
143
+ - **Higher-bit models (Q6_K, Q8_0)** → **Better accuracy**, requires more memory.
144
+
145
+ 📌 **Use Quantized Models if:**
146
+ ✔ You are running inference on a **CPU** and need an optimized model.
147
+ ✔ Your device has **low VRAM** and cannot load full-precision models.
148
+ ✔ You want to reduce **memory footprint** while keeping reasonable accuracy.
149
+
150
+ 📌 **Avoid Quantized Models if:**
151
+ ❌ You need **maximum accuracy** (full-precision models are better for this).
152
+ ❌ Your hardware has enough VRAM for higher-precision formats (BF16/F16).
153
+
154
+ ---
155
+
156
+ ### **Very Low-Bit Quantization (IQ3_XS, IQ3_S, IQ3_M, Q4_K, Q4_0)**
157
+ These models are optimized for **extreme memory efficiency**, making them ideal for **low-power devices** or **large-scale deployments** where memory is a critical constraint.
158
+
159
+ - **IQ3_XS**: Ultra-low-bit quantization (3-bit) with **extreme memory efficiency**.
160
+ - **Use case**: Best for **ultra-low-memory devices** where even Q4_K is too large.
161
+ - **Trade-off**: Lower accuracy compared to higher-bit quantizations.
162
+
163
+ - **IQ3_S**: Small block size for **maximum memory efficiency**.
164
+ - **Use case**: Best for **low-memory devices** where **IQ3_XS** is too aggressive.
165
+
166
+ - **IQ3_M**: Medium block size for better accuracy than **IQ3_S**.
167
+ - **Use case**: Suitable for **low-memory devices** where **IQ3_S** is too limiting.
168
+
169
+ - **Q4_K**: 4-bit quantization with **block-wise optimization** for better accuracy.
170
+ - **Use case**: Best for **low-memory devices** where **Q6_K** is too large.
171
+
172
+ - **Q4_0**: Pure 4-bit quantization, optimized for **ARM devices**.
173
+ - **Use case**: Best for **ARM-based devices** or **low-memory environments**.
174
+
175
+ ---
176
+
177
+ ### **Summary Table: Model Format Selection**
178
+
179
+ | Model Format | Precision | Memory Usage | Device Requirements | Best Use Case |
180
+ |--------------|------------|---------------|----------------------|---------------|
181
+ | **BF16** | Highest | High | BF16-supported GPU/CPUs | High-speed inference with reduced memory |
182
+ | **F16** | High | High | FP16-supported devices | GPU inference when BF16 isn't available |
183
+ | **Q4_K** | Medium Low | Low | CPU or Low-VRAM devices | Best for memory-constrained environments |
184
+ | **Q6_K** | Medium | Moderate | CPU with more memory | Better accuracy while still being quantized |
185
+ | **Q8_0** | High | Moderate | CPU or GPU with enough VRAM | Best accuracy among quantized models |
186
+ | **IQ3_XS** | Very Low | Very Low | Ultra-low-memory devices | Extreme memory efficiency and low accuracy |
187
+ | **Q4_0** | Low | Low | ARM or low-memory devices | llama.cpp can optimize for ARM devices |
188
+
189
+ ---
190
+
191
+ ## **Included Files & Details**
192
+
193
+ ### `Devstral-Small-2505-bf16.gguf`
194
+ - Model weights preserved in **BF16**.
195
+ - Use this if you want to **requantize** the model into a different format.
196
+ - Best if your device supports **BF16 acceleration**.
197
+
198
+ ### `Devstral-Small-2505-f16.gguf`
199
+ - Model weights stored in **F16**.
200
+ - Use if your device supports **FP16**, especially if BF16 is not available.
201
+
202
+ ### `Devstral-Small-2505-bf16-q8_0.gguf`
203
+ - **Output & embeddings** remain in **BF16**.
204
+ - All other layers quantized to **Q8_0**.
205
+ - Use if your device supports **BF16** and you want a quantized version.
206
+
207
+ ### `Devstral-Small-2505-f16-q8_0.gguf`
208
+ - **Output & embeddings** remain in **F16**.
209
+ - All other layers quantized to **Q8_0**.
210
+
211
+ ### `Devstral-Small-2505-q4_k.gguf`
212
+ - **Output & embeddings** quantized to **Q8_0**.
213
+ - All other layers quantized to **Q4_K**.
214
+ - Good for **CPU inference** with limited memory.
215
+
216
+ ### `Devstral-Small-2505-q4_k_s.gguf`
217
+ - Smallest **Q4_K** variant, using less memory at the cost of accuracy.
218
+ - Best for **very low-memory setups**.
219
+
220
+ ### `Devstral-Small-2505-q6_k.gguf`
221
+ - **Output & embeddings** quantized to **Q8_0**.
222
+ - All other layers quantized to **Q6_K** .
223
+
224
+ ### `Devstral-Small-2505-q8_0.gguf`
225
+ - Fully **Q8** quantized model for better accuracy.
226
+ - Requires **more memory** but offers higher precision.
227
+
228
+ ### `Devstral-Small-2505-iq3_xs.gguf`
229
+ - **IQ3_XS** quantization, optimized for **extreme memory efficiency**.
230
+ - Best for **ultra-low-memory devices**.
231
+
232
+ ### `Devstral-Small-2505-iq3_m.gguf`
233
+ - **IQ3_M** quantization, offering a **medium block size** for better accuracy.
234
+ - Suitable for **low-memory devices**.
235
+
236
+ ### `Devstral-Small-2505-q4_0.gguf`
237
+ - Pure **Q4_0** quantization, optimized for **ARM devices**.
238
+ - Best for **low-memory environments**.
239
+ - Prefer IQ4_NL for better accuracy.
240
+
241
+ # <span id="testllm" style="color: #7F7FFF;">🚀 If you find these models useful</span>
242
+ ❤ **Please click "Like" if you find this useful!**
243
+
244
+ Help me test my **AI-Powered Network Monitor Assistant** with **quantum-ready security checks**:
245
+ 👉 [Quantum Network Monitor](https://readyforquantum.com/dashboard/?assistant=open&utm_source=huggingface&utm_medium=referral&utm_campaign=huggingface_repo_readme)
246
+
247
+ 💬 **How to test**:
248
+ Choose an **AI assistant type**:
249
+ - `TurboLLM` (GPT-4o-mini)
250
+ - `HugLLM` (Hugginface Open-source)
251
+
252
+ 🟢 **TurboLLM** – Uses **gpt-4o-mini** for:
253
+ - **Create custom cmd processors to run .net code on Quantum Network Monitor Agents**
254
+ - **Real-time network diagnostics and monitoring**
255
+ - **Security Audits**
256
+ - **Penetration testing** (Nmap/Metasploit)
257
+
258
+
259
+ 🔵 **HugLLM** – Latest Open-source models:
260
+ - 🌐 Runs on Hugging Face Inference API
261
+
262
+ ### 💡 **Example commands to you could test**:
263
+ 1. `"Give me info on my websites SSL certificate"`
264
+ 2. `"Check if my server is using quantum safe encyption for communication"`
265
+ 3. `"Run a comprehensive security audit on my server"`
266
+ 4. '"Create a cmd processor to .. (what ever you want)" Note you need to install a Quantum Network Monitor Agent to run the .net code from. This is a very flexible and powerful feature. Use with caution!
267
+
268
+ ### Final Word
269
+
270
+ I fund the servers used to create these model files, run the Quantum Network Monitor service, and pay for inference from Novita and OpenAI—all out of my own pocket. All the code behind the model creation and the Quantum Network Monitor project is [open source](https://github.com/Mungert69). Feel free to use whatever you find helpful.
271
+
272
+ If you appreciate the work, please consider [buying me a coffee](https://www.buymeacoffee.com/mahadeva) ☕. Your support helps cover service costs and allows me to raise token limits for everyone.
273
+
274
+ I'm also open to job opportunities or sponsorship.
275
+
276
+ Thank you! 😊
277
+
278
+
279
+
280
+
281
+ # Model Card for mistralai/Devstrall-Small-2505
282
+
283
+ Devstral is an agentic LLM for software engineering tasks built under a collaboration between [Mistral AI](https://mistral.ai/) and [All Hands AI](https://www.all-hands.dev/) 🙌. Devstral excels at using tools to explore codebases, editing multiple files and power software engineering agents. The model achieves remarkable performance on SWE-bench which positionates it as the #1 open source model on this [benchmark](#benchmark-results).
284
+
285
+ It is finetuned from [Mistral-Small-3.1](https://huggingface.co/mistralai/Mistral-Small-3.1-24B-Base-2503), therefore it has a long context window of up to 128k tokens. As a coding agent, Devstral is text-only and before fine-tuning from `Mistral-Small-3.1` the vision encoder was removed.
286
+
287
+ For enterprises requiring specialized capabilities (increased context, domain-specific knowledge, etc.), we will release commercial models beyond what Mistral AI contributes to the community.
288
+
289
+ Learn more about Devstral in our [blog post](https://mistral.ai/news/devstral).
290
+
291
+
292
+ ## Key Features:
293
+ - **Agentic coding**: Devstral is designed to excel at agentic coding tasks, making it a great choice for software engineering agents.
294
+ - **lightweight**: with its compact size of just 24 billion parameters, Devstral is light enough to run on a single RTX 4090 or a Mac with 32GB RAM, making it an appropriate model for local deployment and on-device use.
295
+ - **Apache 2.0 License**: Open license allowing usage and modification for both commercial and non-commercial purposes.
296
+ - **Context Window**: A 128k context window.
297
+ - **Tokenizer**: Utilizes a Tekken tokenizer with a 131k vocabulary size.
298
+
299
+
300
+
301
+ ## Benchmark Results
302
+
303
+ ### SWE-Bench
304
+
305
+ Devstral achieves a score of 46.8% on SWE-Bench Verified, outperforming prior open-source SoTA by 6%.
306
+
307
+ | Model | Scaffold | SWE-Bench Verified (%) |
308
+ |------------------|--------------------|------------------------|
309
+ | Devstral | OpenHands Scaffold | **46.8** |
310
+ | GPT-4.1-mini | OpenAI Scaffold | 23.6 |
311
+ | Claude 3.5 Haiku | Anthropic Scaffold | 40.6 |
312
+ | SWE-smith-LM 32B | SWE-agent Scaffold | 40.2 |
313
+
314
+
315
+ When evaluated under the same test scaffold (OpenHands, provided by All Hands AI 🙌), Devstral exceeds far larger models such as Deepseek-V3-0324 and Qwen3 232B-A22B.
316
+
317
+ ![SWE Benchmark](assets/swe_bench.png)
318
+
319
+ ## Usage
320
+
321
+ We recommend to use Devstral with the [OpenHands](https://github.com/All-Hands-AI/OpenHands/tree/main) scaffold.
322
+ You can use it either through our API or by running locally.
323
+
324
+ ### API
325
+ Follow these [instructions](https://docs.mistral.ai/getting-started/quickstart/#account-setup) to create a Mistral account and get an API key.
326
+
327
+ Then run these commands to start the OpenHands docker container.
328
+ ```bash
329
+ export MISTRAL_API_KEY=<MY_KEY>
330
+
331
+ docker pull docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik
332
+
333
+ mkdir -p ~/.openhands-state && echo '{"language":"en","agent":"CodeActAgent","max_iterations":null,"security_analyzer":null,"confirmation_mode":false,"llm_model":"mistral/devstral-small-2505","llm_api_key":"'$MISTRAL_API_KEY'","remote_runtime_resource_factor":null,"github_token":null,"enable_default_condenser":true}' > ~/.openhands-state/settings.json
334
+
335
+ docker run -it --rm --pull=always \
336
+ -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.39-nikolaik \
337
+ -e LOG_ALL_EVENTS=true \
338
+ -v /var/run/docker.sock:/var/run/docker.sock \
339
+ -v ~/.openhands-state:/.openhands-state \
340
+ -p 3000:3000 \
341
+ --add-host host.docker.internal:host-gateway \
342
+ --name openhands-app \
343
+ docker.all-hands.dev/all-hands-ai/openhands:0.39
344
+ ```
345
+
346
+ ### Local inference
347
+
348
+ You can also run the model locally. It can be done with LMStudio or other providers listed below.
349
+
350
+ Launch Openhands
351
+ You can now interact with the model served from LM Studio with openhands. Start the openhands server with the docker
352
+
353
+ ```bash
354
+ docker pull docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik
355
+ docker run -it --rm --pull=always \
356
+ -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
357
+ -e LOG_ALL_EVENTS=true \
358
+ -v /var/run/docker.sock:/var/run/docker.sock \
359
+ -v ~/.openhands-state:/.openhands-state \
360
+ -p 3000:3000 \
361
+ --add-host host.docker.internal:host-gateway \
362
+ --name openhands-app \
363
+ docker.all-hands.dev/all-hands-ai/openhands:0.38
364
+ ```
365
+
366
+ The server will start at http://0.0.0.0:3000. Open it in your browser and you will see a tab AI Provider Configuration.
367
+ Now you can start a new conversation with the agent by clicking on the plus sign on the left bar.
368
+
369
+
370
+ The model can also be deployed with the following libraries:
371
+ - [`LMStudio (recommended for quantized model)`](https://lmstudio.ai/): See [here](#lmstudio-recommended-for-quantized-model)
372
+ - [`vllm (recommended)`](https://github.com/vllm-project/vllm): See [here](#vllm-recommended)
373
+ - [`mistral-inference`](https://github.com/mistralai/mistral-inference): See [here](#mistral-inference)
374
+ - [`transformers`](https://github.com/huggingface/transformers): See [here](#transformers)
375
+ - [`ollama`](https://github.com/ollama/ollama): See [here](#ollama)
376
+
377
+
378
+ ### OpenHands (recommended)
379
+
380
+ #### Launch a server to deploy Devstral-Small-2505
381
+
382
+ Make sure you launched an OpenAI-compatible server such as vLLM or Ollama as described above. Then, you can use OpenHands to interact with `Devstral-Small-2505`.
383
+
384
+ In the case of the tutorial we spineed up a vLLM server running the command:
385
+ ```bash
386
+ vllm serve mistralai/Devstral-Small-2505 --tokenizer_mode mistral --config_format mistral --load_format mistral --tool-call-parser mistral --enable-auto-tool-choice --tensor-parallel-size 2
387
+ ```
388
+
389
+ The server address should be in the following format: `http://<your-server-url>:8000/v1`
390
+
391
+ #### Launch OpenHands
392
+
393
+ You can follow installation of OpenHands [here](https://docs.all-hands.dev/modules/usage/installation).
394
+
395
+ The easiest way to launch OpenHands is to use the Docker image:
396
+ ```bash
397
+ docker pull docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik
398
+
399
+ docker run -it --rm --pull=always \
400
+ -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
401
+ -e LOG_ALL_EVENTS=true \
402
+ -v /var/run/docker.sock:/var/run/docker.sock \
403
+ -v ~/.openhands-state:/.openhands-state \
404
+ -p 3000:3000 \
405
+ --add-host host.docker.internal:host-gateway \
406
+ --name openhands-app \
407
+ docker.all-hands.dev/all-hands-ai/openhands:0.38
408
+ ```
409
+
410
+
411
+ Then, you can access the OpenHands UI at `http://localhost:3000`.
412
+
413
+ #### Connect to the server
414
+
415
+ When accessing the OpenHands UI, you will be prompted to connect to a server. You can use the advanced mode to connect to the server you launched earlier.
416
+
417
+ Fill the following fields:
418
+ - **Custom Model**: `openai/mistralai/Devstral-Small-2505`
419
+ - **Base URL**: `http://<your-server-url>:8000/v1`
420
+ - **API Key**: `token` (or any other token you used to launch the server if any)
421
+
422
+ #### Use OpenHands powered by Devstral
423
+
424
+ Now you're good to use Devstral Small inside OpenHands by **starting a new conversation**. Let's build a To-Do list app.
425
+
426
+ <details>
427
+ <summary>To-Do list app</summary
428
+
429
+ 1. Let's ask Devstral to generate the app with the following prompt:
430
+
431
+ ```txt
432
+ Build a To-Do list app with the following requirements:
433
+ - Built using FastAPI and React.
434
+ - Make it a one page app that:
435
+ - Allows to add a task.
436
+ - Allows to delete a task.
437
+ - Allows to mark a task as done.
438
+ - Displays the list of tasks.
439
+ - Store the tasks in a SQLite database.
440
+ ```
441
+
442
+ ![Agent prompting](assets/tuto_open_hands/agent_prompting.png)
443
+
444
+
445
+ 2. Let's see the result
446
+
447
+ You should see the agent construct the app and be able to explore the code it generated.
448
+
449
+ If it doesn't do it automatically, ask Devstral to deploy the app or do it manually, and then go the front URL deployment to see the app.
450
+
451
+ ![Agent working](assets/tuto_open_hands/agent_working.png)
452
+ ![App UI](assets/tuto_open_hands/app_ui.png)
453
+
454
+
455
+ 3. Iterate
456
+
457
+ Now that you have a first result you can iterate on it by asking your agent to improve it. For example, in the app generated we could click on a task to mark it checked but having a checkbox would improve UX. You could also ask it to add a feature to edit a task, or to add a feature to filter the tasks by status.
458
+
459
+ Enjoy building with Devstral Small and OpenHands!
460
+
461
+ </details>
462
+
463
+
464
+ ### LMStudio (recommended for quantized model)
465
+ Download the weights from huggingface:
466
+
467
+ ```
468
+ pip install -U "huggingface_hub[cli]"
469
+ huggingface-cli download \
470
+ "mistralai/Devstral-Small-2505_gguf" \
471
+ --include "devstralQ4_K_M.gguf" \
472
+ --local-dir "mistralai/Devstral-Small-2505_gguf/"
473
+ ```
474
+
475
+ You can serve the model locally with [LMStudio](https://lmstudio.ai/).
476
+ * Download [LM Studio](https://lmstudio.ai/) and install it
477
+ * Install `lms cli ~/.lmstudio/bin/lms bootstrap`
478
+ * In a bash terminal, run `lms import devstralQ4_K_M.ggu` in the directory where you've downloaded the model checkpoint (e.g. `mistralai/Devstral-Small-2505_gguf`)
479
+ * Open the LMStudio application, click the terminal icon to get into the developer tab. Click select a model to load and select Devstral Q4 K M. Toggle the status button to start the model, in setting oggle Serve on Local Network to be on.
480
+ * On the right tab, you will see an API identifier which should be devstralq4_k_m and an api address under API Usage. Keep note of this address, we will use it in the next step.
481
+
482
+ Launch Openhands
483
+ You can now interact with the model served from LM Studio with openhands. Start the openhands server with the docker
484
+
485
+ ```bash
486
+ docker pull docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik
487
+ docker run -it --rm --pull=always \
488
+ -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik \
489
+ -e LOG_ALL_EVENTS=true \
490
+ -v /var/run/docker.sock:/var/run/docker.sock \
491
+ -v ~/.openhands-state:/.openhands-state \
492
+ -p 3000:3000 \
493
+ --add-host host.docker.internal:host-gateway \
494
+ --name openhands-app \
495
+ docker.all-hands.dev/all-hands-ai/openhands:0.38
496
+ ```
497
+
498
+ Click “see advanced setting” on the second line.
499
+ In the new tab, toggle advanced to on. Set the custom model to be mistral/devstralq4_k_m and Base URL the api address we get from the last step in LM Studio. Set API Key to dummy. Click save changes.
500
+
501
+ ### vLLM (recommended)
502
+
503
+ We recommend using this model with the [vLLM library](https://github.com/vllm-project/vllm)
504
+ to implement production-ready inference pipelines.
505
+
506
+ **_Installation_**
507
+
508
+ Make sure you install [`vLLM >= 0.8.5`](https://github.com/vllm-project/vllm/releases/tag/v0.8.5):
509
+
510
+ ```
511
+ pip install vllm --upgrade
512
+ ```
513
+
514
+ Doing so should automatically install [`mistral_common >= 1.5.5`](https://github.com/mistralai/mistral-common/releases/tag/v1.5.5).
515
+
516
+ To check:
517
+ ```
518
+ python -c "import mistral_common; print(mistral_common.__version__)"
519
+ ```
520
+
521
+ You can also make use of a ready-to-go [docker image](https://github.com/vllm-project/vllm/blob/main/Dockerfile) or on the [docker hub](https://hub.docker.com/layers/vllm/vllm-openai/latest/images/sha256-de9032a92ffea7b5c007dad80b38fd44aac11eddc31c435f8e52f3b7404bbf39).
522
+
523
+ #### Server
524
+
525
+ We recommand that you use Devstral in a server/client setting.
526
+
527
+ 1. Spin up a server:
528
+
529
+ ```
530
+ vllm serve mistralai/Devstral-Small-2505 --tokenizer_mode mistral --config_format mistral --load_format mistral --tool-call-parser mistral --enable-auto-tool-choice --tensor-parallel-size 2
531
+ ```
532
+
533
+
534
+ 2. To ping the client you can use a simple Python snippet.
535
+
536
+ ```py
537
+ import requests
538
+ import json
539
+ from huggingface_hub import hf_hub_download
540
+
541
+
542
+ url = "http://<your-server-url>:8000/v1/chat/completions"
543
+ headers = {"Content-Type": "application/json", "Authorization": "Bearer token"}
544
+
545
+ model = "mistralai/Devstral-Small-2505"
546
+
547
+ def load_system_prompt(repo_id: str, filename: str) -> str:
548
+ file_path = hf_hub_download(repo_id=repo_id, filename=filename)
549
+ with open(file_path, "r") as file:
550
+ system_prompt = file.read()
551
+ return system_prompt
552
+
553
+ SYSTEM_PROMPT = load_system_prompt(model, "SYSTEM_PROMPT.txt")
554
+
555
+ messages = [
556
+ {"role": "system", "content": SYSTEM_PROMPT},
557
+ {
558
+ "role": "user",
559
+ "content": [
560
+ {
561
+ "type": "text",
562
+ "text": "<your-command>",
563
+ },
564
+ ],
565
+ },
566
+ ]
567
+
568
+ data = {"model": model, "messages": messages, "temperature": 0.15}
569
+
570
+ response = requests.post(url, headers=headers, data=json.dumps(data))
571
+ print(response.json()["choices"][0]["message"]["content"])
572
+ ```
573
+
574
+
575
+ ### Mistral-inference
576
+
577
+ We recommend using mistral-inference to quickly try out / "vibe-check" Devstral.
578
+
579
+ #### Install
580
+
581
+ Make sure to have mistral_inference >= 1.6.0 installed.
582
+
583
+ ```bash
584
+ pip install mistral_inference --upgrade
585
+ ```
586
+
587
+ #### Download
588
+
589
+ ```python
590
+ from huggingface_hub import snapshot_download
591
+ from pathlib import Path
592
+
593
+ mistral_models_path = Path.home().joinpath('mistral_models', 'Devstral')
594
+ mistral_models_path.mkdir(parents=True, exist_ok=True)
595
+
596
+ snapshot_download(repo_id="mistralai/Devstral-Small-2505", allow_patterns=["params.json", "consolidated.safetensors", "tekken.json"], local_dir=mistral_models_path)
597
+ ```
598
+
599
+ #### Python
600
+
601
+ You can run the model using the following command:
602
+
603
+ ```bash
604
+ mistral-chat $HOME/mistral_models/Devstral --instruct --max_tokens 300
605
+ ```
606
+
607
+ You can then prompt it with anything you'd like.
608
+
609
+ ### Ollama
610
+
611
+ You can run Devstral using the [Ollama](https://ollama.ai/) CLI.
612
+
613
+ ```bash
614
+ ollama run devstral
615
+ ```
616
+
617
+ ### Transformers
618
+
619
+ To make the best use of our model with transformers make sure to have [installed](https://github.com/mistralai/mistral-common) ` mistral-common >= 1.5.5` to use our tokenizer.
620
+
621
+ ```bash
622
+ pip install mistral-common --upgrade
623
+ ```
624
+
625
+ Then load our tokenizer along with the model and generate:
626
+
627
+ ```python
628
+ import torch
629
+
630
+ from mistral_common.protocol.instruct.messages import (
631
+ SystemMessage, UserMessage
632
+ )
633
+ from mistral_common.protocol.instruct.request import ChatCompletionRequest
634
+ from mistral_common.tokens.tokenizers.mistral import MistralTokenizer
635
+ from mistral_common.tokens.tokenizers.tekken import SpecialTokenPolicy
636
+ from huggingface_hub import hf_hub_download
637
+ from transformers import AutoModelForCausalLM
638
+
639
+ def load_system_prompt(repo_id: str, filename: str) -> str:
640
+ file_path = hf_hub_download(repo_id=repo_id, filename=filename)
641
+ with open(file_path, "r") as file:
642
+ system_prompt = file.read()
643
+ return system_prompt
644
+
645
+ model_id = "mistralai/Devstral-Small-2505"
646
+ tekken_file = hf_hub_download(repo_id=model_id, filename="tekken.json")
647
+ SYSTEM_PROMPT = load_system_prompt(model_id, "SYSTEM_PROMPT.txt")
648
+
649
+ tokenizer = MistralTokenizer.from_file(tekken_file)
650
+
651
+ model = AutoModelForCausalLM.from_pretrained(model_id)
652
+
653
+ tokenized = tokenizer.encode_chat_completion(
654
+ ChatCompletionRequest(
655
+ messages=[
656
+ SystemMessage(content=SYSTEM_PROMPT),
657
+ UserMessage(content="<your-command>"),
658
+ ],
659
+ )
660
+ )
661
+
662
+ output = model.generate(
663
+ input_ids=torch.tensor([tokenized.tokens]),
664
+ max_new_tokens=1000,
665
+ )[0]
666
+
667
+ decoded_output = tokenizer.decode(output[len(tokenized.tokens):])
668
+ print(decoded_output)
669
+ ```