MassivDash commited on
Commit
8f3026f
·
verified ·
1 Parent(s): 5e0b657

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +379 -156
README.md CHANGED
@@ -1,199 +1,422 @@
1
  ---
2
  library_name: transformers
3
- tags: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  ---
 
5
 
6
- # Model Card for Model ID
7
 
8
- <!-- Provide a quick summary of what the model is/does. -->
 
 
 
 
 
 
 
 
 
 
9
 
 
10
 
 
 
 
 
11
 
12
- ## Model Details
13
 
14
- ### Model Description
15
 
16
- <!-- Provide a longer summary of what this model is. -->
17
 
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
 
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
 
28
- ### Model Sources [optional]
29
 
30
- <!-- Provide the basic links for the model. -->
31
 
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
 
36
- ## Uses
 
 
 
 
 
37
 
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
 
40
- ### Direct Use
41
 
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
 
44
- [More Information Needed]
45
 
46
- ### Downstream Use [optional]
 
 
 
 
47
 
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
 
50
- [More Information Needed]
51
 
52
- ### Out-of-Scope Use
 
 
 
53
 
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
 
55
 
56
- [More Information Needed]
 
57
 
58
- ## Bias, Risks, and Limitations
 
 
 
 
59
 
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
 
 
 
 
61
 
62
- [More Information Needed]
 
 
 
 
 
63
 
64
- ### Recommendations
 
65
 
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
 
 
 
67
 
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
 
69
 
70
- ## How to Get Started with the Model
71
 
72
- Use the code below to get started with the model.
 
 
 
 
 
 
 
 
 
 
73
 
74
- [More Information Needed]
75
 
76
- ## Training Details
77
 
78
- ### Training Data
79
 
80
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
 
 
 
 
 
81
 
82
- [More Information Needed]
 
 
 
 
 
83
 
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
  ## Evaluation
104
 
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  library_name: transformers
3
+ license: apache-2.0
4
+ language:
5
+ - en
6
+ - fr
7
+ - es
8
+ - it
9
+ - pt
10
+ - zh
11
+ - ar
12
+ - ru
13
+ base_model:
14
+ - HuggingFaceTB/SmolLM3-3B-Base
15
+ tags:
16
+ - heretic
17
+ - uncensored
18
+ - decensored
19
+ - abliterated
20
  ---
21
+ # This is a decensored version of [HuggingFaceTB/SmolLM3-3B](https://huggingface.co/HuggingFaceTB/SmolLM3-3B), made using [Heretic](https://github.com/p-e-w/heretic) v1.1.0
22
 
23
+ ## Abliteration parameters
24
 
25
+ | Parameter | Value |
26
+ | :-------- | :---: |
27
+ | **direction_index** | 21.74 |
28
+ | **attn.o_proj.max_weight** | 1.49 |
29
+ | **attn.o_proj.max_weight_position** | 22.07 |
30
+ | **attn.o_proj.min_weight** | 1.19 |
31
+ | **attn.o_proj.min_weight_distance** | 7.61 |
32
+ | **mlp.down_proj.max_weight** | 1.24 |
33
+ | **mlp.down_proj.max_weight_position** | 29.57 |
34
+ | **mlp.down_proj.min_weight** | 1.07 |
35
+ | **mlp.down_proj.min_weight_distance** | 1.16 |
36
 
37
+ ## Performance
38
 
39
+ | Metric | This model | Original model ([HuggingFaceTB/SmolLM3-3B](https://huggingface.co/HuggingFaceTB/SmolLM3-3B)) |
40
+ | :----- | :--------: | :---------------------------: |
41
+ | **KL divergence** | 0.0001 | 0 *(by definition)* |
42
+ | **Refusals** | 60/100 | 82/100 |
43
 
44
+ -----
45
 
 
46
 
 
47
 
48
+ # SmolLM3
49
 
 
 
 
 
 
 
 
50
 
51
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/61c141342aac764ce1654e43/zy0dqTCCt5IHmuzwoqtJ9.png)
52
 
 
53
 
54
+ ## Table of Contents
 
 
55
 
56
+ 1. [Model Summary](#model-summary)
57
+ 2. [How to use](#how-to-use)
58
+ 3. [Evaluation](#evaluation)
59
+ 4. [Training](#training)
60
+ 5. [Limitations](#limitations)
61
+ 6. [License](#license)
62
 
63
+ ## Model Summary
64
 
65
+ SmolLM3 is a 3B parameter language model designed to push the boundaries of small models. It supports dual mode reasoning, 6 languages and long context. SmolLM3 is a fully open model that offers strong performance at the 3B–4B scale.
66
 
67
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/6200d0a443eb0913fa2df7cc/db3az7eGzs-Sb-8yUj-ff.png)
68
 
69
+ The model is a decoder-only transformer using GQA and NoPE (with 3:1 ratio), it was pretrained on 11.2T tokens with a staged curriculum of web, code, math and reasoning data. Post-training included midtraining on 140B reasoning tokens followed by supervised fine-tuning and alignment via Anchored Preference Optimization (APO).
70
 
71
+ ### Key features
72
+ - Instruct model optimized for **hybrid reasoning**
73
+ - **Fully open model**: open weights + full training details including public data mixture and training configs
74
+ - **Long context:** Trained on 64k context and supports up to **128k tokens** using YARN extrapolation
75
+ - **Multilingual**: 6 natively supported (English, French, Spanish, German, Italian, and Portuguese)
76
 
77
+ For more details refer to our blog post: https://hf.co/blog/smollm3
78
 
79
+ ## How to use
80
 
81
+ The modeling code for SmolLM3 is available in transformers `v4.53.0`, so make sure to upgrade your transformers version. You can also load the model with the latest `vllm` which uses transformers as a backend.
82
+ ```bash
83
+ pip install -U transformers
84
+ ```
85
 
86
+ ```python
87
+ from transformers import AutoModelForCausalLM, AutoTokenizer
88
 
89
+ model_name = "HuggingFaceTB/SmolLM3-3B"
90
+ device = "cuda" # for GPU usage or "cpu" for CPU usage
91
 
92
+ # load the tokenizer and the model
93
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
94
+ model = AutoModelForCausalLM.from_pretrained(
95
+ model_name,
96
+ ).to(device)
97
 
98
+ # prepare the model input
99
+ prompt = "Give me a brief explanation of gravity in simple terms."
100
+ messages_think = [
101
+ {"role": "user", "content": prompt}
102
+ ]
103
 
104
+ text = tokenizer.apply_chat_template(
105
+ messages_think,
106
+ tokenize=False,
107
+ add_generation_prompt=True,
108
+ )
109
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
110
 
111
+ # Generate the output
112
+ generated_ids = model.generate(**model_inputs, max_new_tokens=32768)
113
 
114
+ # Get and decode the output
115
+ output_ids = generated_ids[0][len(model_inputs.input_ids[0]) :]
116
+ print(tokenizer.decode(output_ids, skip_special_tokens=True))
117
+ ```
118
 
119
+ >[!TIP]
120
+ > We recommend setting `temperature=0.6` and `top_p=0.95` in the sampling parameters.
121
 
122
+ ### Long context processing
123
 
124
+ The current `config.json` is set for context length up to 65,536 tokens. To handle longer inputs (128k or 256k), we utilize YaRN you can change the `max_position_embeddings` and rope_scaling` to:
125
+ ```
126
+ {
127
+ ...,
128
+ "rope_scaling": {
129
+ "factor": 2.0, #2x65536=131 072
130
+ "original_max_position_embeddings": 65536,
131
+ "type": "yarn"
132
+ }
133
+ }
134
+ ```
135
 
 
136
 
137
+ ### Enabling and Disabling Extended Thinking Mode
138
 
139
+ We enable extended thinking by default, so the example above generates the output with a reasoning trace. For choosing between enabling, you can provide the `/think` and `/no_think` flags through the system prompt as shown in the snippet below for extended thinking disabled. The code for generating the response with extended thinking would be the same except that the system prompt should have `/think` instead of `/no_think`.
140
 
141
+ ```python
142
+ prompt = "Give me a brief explanation of gravity in simple terms."
143
+ messages = [
144
+ {"role": "system", "content": "/no_think"},
145
+ {"role": "user", "content": prompt}
146
+ ]
147
 
148
+ text = tokenizer.apply_chat_template(
149
+ messages,
150
+ tokenize=False,
151
+ add_generation_prompt=True,
152
+ )
153
+ ```
154
 
155
+ We also provide the option of specifying the whether to use extended thinking through the `enable_thinking` kwarg as in the example below. You do not need to set the `/no_think` or `/think` flags through the system prompt if using the kwarg, but keep in mind that the flag in the system prompt overwrites the setting in the kwarg.
156
+
157
+ ```python
158
+ prompt = "Give me a brief explanation of gravity in simple terms."
159
+ messages = [
160
+ {"role": "user", "content": prompt}
161
+ ]
162
+
163
+ text = tokenizer.apply_chat_template(
164
+ messages,
165
+ tokenize=False,
166
+ add_generation_prompt=True,
167
+ enable_thinking=False
168
+ )
169
+ ```
170
+
171
+ ### Agentic Usage
172
+
173
+ SmolLM3 supports tool calling!
174
+ Just pass your list of tools:
175
+ - Under the argument `xml_tools` for standard tool-calling: these tools will be called as JSON blobs within XML tags, like `<tool_call>{"name": "get_weather", "arguments": {"city": "Copenhagen"}}</tool_call>`
176
+ - Or under `python_tools`: then the model will call tools like python functions in a `<code>` snippet, like `<code>get_weather(city="Copenhagen")</code>`
177
+
178
+ ```python
179
+ from transformers import AutoModelForCausalLM, AutoTokenizer
180
+
181
+ checkpoint = "HuggingFaceTB/SmolLM3-3B"
182
+
183
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
184
+ model = AutoModelForCausalLM.from_pretrained(checkpoint)
185
+
186
+ tools = [
187
+ {
188
+ "name": "get_weather",
189
+ "description": "Get the weather in a city",
190
+ "parameters": {"type": "object", "properties": {"city": {"type": "string", "description": "The city to get the weather for"}}}}
191
+ ]
192
+
193
+ messages = [
194
+ {
195
+ "role": "user",
196
+ "content": "Hello! How is the weather today in Copenhagen?"
197
+ }
198
+ ]
199
+
200
+ inputs = tokenizer.apply_chat_template(
201
+ messages,
202
+ enable_thinking=False, # True works as well, your choice!
203
+ xml_tools=tools,
204
+ add_generation_prompt=True,
205
+ tokenize=True,
206
+ return_tensors="pt"
207
+ )
208
+
209
+ outputs = model.generate(inputs)
210
+ print(tokenizer.decode(outputs[0]))
211
+ ```
212
+
213
+ ### Using Custom System Instructions.
214
+
215
+ You can specify custom instruction through the system prompt while controlling whether to use extended thinking. For example, the snippet below shows how to make the model speak like a pirate while enabling extended thinking.
216
+
217
+ ```python
218
+ prompt = "Give me a brief explanation of gravity in simple terms."
219
+ messages = [
220
+ {"role": "system", "content": "Speak like a pirate./think"},
221
+ {"role": "user", "content": prompt}
222
+ ]
223
+
224
+ text = tokenizer.apply_chat_template(
225
+ messages,
226
+ tokenize=False,
227
+ add_generation_prompt=True,
228
+ )
229
+ ```
230
+
231
+ For local inference, you can use `llama.cpp`, `ONNX`, `MLX`, `MLC` and `ExecuTorch`. You can find quantized checkpoints in this collection (https://huggingface.co/collections/HuggingFaceTB/smollm3-686d33c1fdffe8e635317e23)
232
+
233
+ ### vLLM and SGLang
234
+
235
+ You can use vLLM and SGLang to deploy the model in an API compatible with OpenAI format.
236
+
237
+ #### SGLang
238
+
239
+ ```bash
240
+ python -m sglang.launch_server --model-path HuggingFaceTB/SmolLM3-3B
241
+ ```
242
+
243
+ #### vLLM
244
+
245
+ ```bash
246
+ vllm serve HuggingFaceTB/SmolLM3-3B --enable-auto-tool-choice --tool-call-parser=hermes
247
+ ```
248
+
249
+ #### Setting `chat_template_kwargs`
250
+
251
+ You can specify `chat_template_kwargs` such as `enable_thinking` to a deployed model by passing the `chat_template_kwargs` parameter in the API request.
252
+
253
+ ```bash
254
+ curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
255
+ "model": "HuggingFaceTB/SmolLM3-3B",
256
+ "messages": [
257
+ {"role": "user", "content": "Give me a brief explanation of gravity in simple terms."}
258
+ ],
259
+ "temperature": 0.6,
260
+ "top_p": 0.95,
261
+ "max_tokens": 16384,
262
+ "chat_template_kwargs": {"enable_thinking": false}
263
+ }'
264
+ ```
265
 
266
  ## Evaluation
267
 
268
+ In this section, we report the evaluation results of SmolLM3 model. All evaluations are zero-shot unless stated otherwise, and we use [lighteval](https://github.com/huggingface/lighteval) to run them.
269
+
270
+ We highlight the best score in bold and underline the second-best score.
271
+
272
+ ### Instruction Model
273
+
274
+ #### No Extended Thinking
275
+ Evaluation results of non reasoning models and reasoning models in no thinking mode. We highlight the best and second-best scores in bold.
276
+ | Category | Metric | SmoLLM3-3B | Qwen2.5-3B | Llama3.1-3B | Qwen3-1.7B | Qwen3-4B |
277
+ |---------|--------|------------|------------|-------------|------------|----------|
278
+ | High school math competition | AIME 2025 | <u>9.3</u> | 2.9 | 0.3 | 8.0 | **17.1** |
279
+ | Math problem-solving | GSM-Plus | 72.8 | <u>74.1</u> | 59.2 | 68.3 | **82.1** |
280
+ | Competitive programming | LiveCodeBench v4 | <u>15.2</u> | 10.5 | 3.4 | 15.0 | **24.9** |
281
+ | Graduate-level reasoning | GPQA Diamond | <u>35.7</u> | 32.2 | 29.4 | 31.8 | **44.4** |
282
+ | Instruction following | IFEval | **76.7** | 65.6 | 71.6 | <u>74.0</u> | 68.9 |
283
+ | Alignment | MixEval Hard | 26.9 | <u>27.6</u> | 24.9 | 24.3 | **31.6** |
284
+ | Tool Calling | BFCL| <u>92.3</u> | - | <u>92.3</u> * | 89.5 | **95.0** |
285
+ | Multilingual Q&A | Global MMLU | <u>53.5</u> | 50.54 | 46.8 | 49.5 | **65.1** |
286
+
287
+ (*): this is a tool calling finetune
288
+
289
+ #### Extended Thinking
290
+ Evaluation results in reasoning mode for SmolLM3 and Qwen3 models:
291
+ | Category | Metric | SmoLLM3-3B | Qwen3-1.7B | Qwen3-4B |
292
+ |---------|--------|------------|------------|----------|
293
+ | High school math competition | AIME 2025 | <u>36.7</u> | 30.7 | **58.8** |
294
+ | Math problem-solving | GSM-Plus | <u>83.4</u> | 79.4 | **88.2** |
295
+ | Competitive programming | LiveCodeBench v4 | 30.0 | <u>34.4</u> | **52.9** |
296
+ | Graduate-level reasoning | GPQA Diamond | <u>41.7</u> | 39.9 | **55.3** |
297
+ | Instruction following | IFEval | 71.2 | <u>74.2</u> | **85.4** |
298
+ | Alignment | MixEval Hard | 30.8 | <u>33.9</u> | **38.0** |
299
+ | Tool Calling | BFCL | <u>88.8</u> | <u>88.8</u> | **95.5** |
300
+ | Multilingual Q&A | Global MMLU | <u>64.1</u> | 62.3 | **73.3** |
301
+
302
+
303
+ ### Base Pre-Trained Model
304
+
305
+ #### English benchmarks
306
+ Note: All evaluations are zero-shot unless stated otherwise. For Ruler 64k evaluation, we apply YaRN to the Qwen models with 32k context to extrapolate the context length.
307
+
308
+ | Category | Metric | SmolLM3-3B | Qwen2.5-3B | Llama3-3.2B | Qwen3-1.7B-Base | Qwen3-4B-Base |
309
+ |---------|--------|---------------------|------------|--------------|------------------|---------------|
310
+ | Reasoning & Commonsense| HellaSwag | **76.15** | 74.19 |<u>75.52</u> | 60.52 | 74.37 |
311
+ | | ARC-CF (Average) | **65.61** | 59.81 | 58.58 | 55.88 | <u>62.11</u> |
312
+ | | Winogrande | 58.88 | **61.41** | 58.72 | 57.06 | <u>59.59</u> |
313
+ | | CommonsenseQA | <u>55.28</u> | 49.14 | **60.60** | 48.98 | 52.99 |
314
+ | Knowledge & Understanding | MMLU-CF (Average) | <u>44.13</u> | 42.93 | 41.32 | 39.11 | **47.65** |
315
+ | | MMLU Pro CF | <u>19.61</u> | 16.66 | 16.42 | 18.04 | **24.92** |
316
+ | | MMLU Pro MCF | <u>32.70</u> | 31.32 | 25.07 | 30.39 | **41.07** |
317
+ | | PIQA | **78.89** | 78.35 | <u>78.51</u> | 75.35 | 77.58 |
318
+ | | OpenBookQA | 40.60 | 40.20 | <u>42.00</u> | 36.40 | **42.40** |
319
+ | | BoolQ | **78.99** | 73.61 | <u>75.33</u> | 74.46 | 74.28 |
320
+ | **Math & Code** | | | | | | |
321
+ | Coding & math | HumanEval+ | 30.48 | 34.14| 25.00 | <u>43.29</u>| **54.87** |
322
+ | | MBPP+ | 52.91 | 52.11 | 38.88| <u>59.25</u> | **63.75** |
323
+ | | MATH (4-shot) | <u>46.10</u> | 40.10 | 7.44 | 41.64 | **51.20** |
324
+ | | GSM8k (5-shot) | 67.63 | <u>70.13</u> | 25.92 | 65.88 | **74.14** |
325
+ | **Long context** | | | | | | |
326
+ | | Ruler 32k | 76.35 | 75.93 | <u>77.58</u> | 70.63 | **83.98** |
327
+ | | Ruler 64k | <u>67.85</u> | 64.90 | **72.93** | 57.18 | 60.29 |
328
+ | | Ruler 128k | 61.03 | <u>62.23</u> | **71.30** | 43.03 | 47.23 |
329
+
330
+ #### Multilingual benchmarks
331
+
332
+
333
+ | Category | Metric | SmolLM3 3B Base | Qwen2.5-3B | Llama3.2 3B | Qwen3 1.7B Base | Qwen3 4B Base |
334
+ |---------|--------|---------------------|------------|--------------|------------------|---------------|
335
+ | Main supported languages | | | | | | | |
336
+ | French| MLMM Hellaswag | **63.94** | 57.47 | 57.66 | 51.26 | <u>61.00</u> |
337
+ | | Belebele | 51.00 | <u>51.55</u> | 49.22 |49.44| **55.00** |
338
+ | | Global MMLU (CF) | <u>38.37</u> | 34.22 | 33.71 | 34.94 |**41.80** |
339
+ | | Flores-200 (5-shot) | 62.85| 61.38| <u>62.89</u> | 58.68 | **65.76** |
340
+ | Spanish| MLMM Hellaswag | **65.85** | 58.25 | 59.39 | 52.40 | <u>61.85</u> |
341
+ | | Belebele | 47.00 | <u>48.88</u> | 47.00 | 47.56 | **50.33** |
342
+ | | Global MMLU (CF) | <u>38.51</u> | 35.84 | 35.60 | 34.79 |**41.22** |
343
+ | | Flores-200 (5-shot) | <u>48.25</u>| 50.00| 44.45 | 46.93 | **50.16** |
344
+ | German| MLMM Hellaswag | **59.56** | 49.99| 53.19|46.10| <u>56.43</u>|
345
+ | | Belebele | <u>48.44</u> | 47.88 | 46.22 | 48.00 | **53.44**|
346
+ | | Global MMLU (CF) | <u>35.10</u> | 33.19 | 32.60 | 32.73 |**38.70** |
347
+ | | Flores-200 (5-shot) | **56.60**| 50.63| <u>54.95</u> | 52.58 | 50.48 |
348
+ | Italian| MLMM Hellaswag | **62.49** | 53.21 | 54.96 | 48.72 | <u>58.76</u> |
349
+ | | Belebele | <u>46.44</u> | 44.77 | 43.88 | 44.00 | **48.78** | 44.88 |
350
+ | | Global MMLU (CF) | <u>36.99</u> | 33.91 | 32.79 | 35.37 |**39.26** |
351
+ | | Flores-200 (5-shot) | <u>52.65<u/>| **54.87**| 48.83 | 48.37 | 49.11 |
352
+ | Portuguese| MLMM Hellaswag | **63.22** | 57.38 | 56.84 | 50.73 | <u>59.89</u> |
353
+ | | Belebele | 47.67 | **49.22** | 45.00 | 44.00 | 50.00 | <u>49.00</U> |
354
+ | | Global MMLU (CF) | <u>36.88</u> | 34.72 | 33.05 | 35.26 |**40.66** |
355
+ | | Flores-200 (5-shot) | <u>60.93</u> |57.68| 54.28 | 56.58 | **63.43** |
356
+
357
+ The model has also been trained on Arabic (standard), Chinese and Russian data, but has seen fewer tokens in these languages compared to the 6 above. We report the performance on these langages for information.
358
+ | Category | Metric | SmolLM3 3B Base | Qwen2.5-3B | Llama3.2 3B | Qwen3 1.7B Base | Qwen3 4B Base |
359
+ |---------|--------|---------------------|------------|--------------|------------------|---------------|
360
+ | Other supported languages | | | | | | | |
361
+ | Arabic| Belebele | 40.22 | 44.22 | <u>45.33</u> | 42.33 | **51.78** |
362
+ | | Global MMLU (CF) | 28.57 | 28.81 | 27.67 | <u>29.37</u> | **31.85** |
363
+ | | Flores-200 (5-shot) | <u>40.22</u> | 39.44 | **44.43** | 35.82 | 39.76 |
364
+ | Chinese| Belebele | 43.78 | 44.56 | <u>49.56</u> | 48.78 | **53.22** |
365
+ | | Global MMLU (CF) | 36.16 | 33.79 | <u>39.57</u> | 38.56 | **44.55** |
366
+ | | Flores-200 (5-shot) | 29.17 | **33.21** | 31.89 | 25.70 | <u>32.50</u> |
367
+ | Russian| Belebele | <u>47.44</u> | 45.89 | <u>47.44</u> | 45.22 | **51.44** |
368
+ | | Global MMLU (CF) | <u>36.51</u> | 32.47 | 34.52 | 34.83 | **38.80** |
369
+ | | Flores-200 (5-shot) | 47.13 | 48.74 | 50.74 | <u>54.70</u> | **60.53** |
370
+
371
+ ## Training
372
+
373
+ ### Model
374
+
375
+ - **Architecture:** Transformer decoder
376
+ - **Pretraining tokens:** 11T
377
+ - **Precision:** bfloat16
378
+
379
+ ### Software & hardware
380
+
381
+ - **GPUs:** 384 H100
382
+ - **Training Framework:** [nanotron](https://github.com/huggingface/nanotron/tree/smollm3)
383
+ - **Data processing framework:** [datatrove](https://github.com/huggingface/datatrove)
384
+ - **Evaluation framework:** [lighteval](https://github.com/huggingface/lighteval)
385
+ - **Post-training Framework:** [TRL](https://github.com/huggingface/trl)
386
+
387
+ ### Open resources
388
+ Here is an infographic with all the training details
389
+ - The datasets used for pretraining can be found in this [collection](https://huggingface.co/collections/HuggingFaceTB/smollm3-pretraining-datasets-685a7353fdc01aecde51b1d9) and those used in mid-training and post-training will be uploaded later
390
+ - The training and evaluation configs and code can be found in the [huggingface/smollm](https://github.com/huggingface/smollm) repository.
391
+ - The training intermediate checkpoints (including the mid-training and SFT checkpoints) are available at [HuggingFaceTB/SmolLM3-3B-checkpoints](https://huggingface.co/HuggingFaceTB/SmolLM3-3B-checkpoints)
392
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/651e96991b97c9f33d26bde6/qiE5ZYr9SD1CIAtfEfuC8.png)
393
+
394
+ ### EU Summary of Public Content
395
+
396
+ The EU AI Act requires all GPAI models to provide a Public Summary of Training Content according to a [given template](https://digital-strategy.ec.europa.eu/en/library/explanatory-notice-and-template-public-summary-training-content-general-purpose-ai-models).
397
+ You can find the summary for this model below, as well as in its [development Space](https://huggingface.co/spaces/hfmlsoc/smollm3-eu-data-transparency).
398
+
399
+ <iframe
400
+ src="https://hfmlsoc-smollm3-eu-data-transparency.hf.space"
401
+ frameborder="0"
402
+ width="850"
403
+ height="350"
404
+ ></iframe>
405
+
406
+
407
+ ## Limitations
408
+
409
+ SmolLM3 can produce text on a variety of topics, but the generated content may not always be factually accurate, logically consistent, or free from biases present in the training data. These models should be used as assistive tools rather than definitive sources of information. Users should always verify important information and critically evaluate any generated content.
410
+
411
+ ## License
412
+ [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0)
413
+
414
+ ## Citation
415
+ ```bash
416
+ @misc{bakouch2025smollm3,
417
+ title={{SmolLM3: smol, multilingual, long-context reasoner}},
418
+ author={Bakouch, Elie and Ben Allal, Loubna and Lozhkov, Anton and Tazi, Nouamane and Tunstall, Lewis and Patiño, Carlos Miguel and Beeching, Edward and Roucher, Aymeric and Reedi, Aksel Joonas and Gallouédec, Quentin and Rasul, Kashif and Habib, Nathan and Fourrier, Clémentine and Kydlicek, Hynek and Penedo, Guilherme and Larcher, Hugo and Morlon, Mathieu and Srivastav, Vaibhav and Lochner, Joshua and Nguyen, Xuan-Son and Raffel, Colin and von Werra, Leandro and Wolf, Thomas},
419
+ year={2025},
420
+ howpublished={\url{https://huggingface.co/blog/smollm3}}
421
+ }
422
+ ```