Files changed (3) hide show
  1. README.md +236 -141
  2. config.json +1 -0
  3. tokenizer_config.json +1 -1
README.md CHANGED
@@ -1,98 +1,112 @@
1
  ---
2
- language:
3
- - en
4
- - fr
5
- - es
6
- - pt
7
  tags:
8
  - falcon3
9
  base_model: tiiuae/Falcon3-1B-Base
10
- license: other
11
- license_name: falcon-llm-license
12
  license_link: https://falconllm.tii.ae/falcon-terms-and-conditions.html
13
- library_name: transformers
14
  ---
15
 
16
- <div align="center">
17
- <img src="https://huggingface.co/datasets/tiiuae/documentation-images/resolve/main/general/falco3-logo.png" alt="drawing" width="500"/>
18
- </div>
19
 
20
- # Falcon3-1B-Instruct
 
 
21
 
22
- **Falcon3** family of Open Foundation Models is a set of pretrained and instruct LLMs ranging from 1B to 10B parameters.
23
 
24
- This repository contains the **Falcon3-1B-Instruct**. It achieves strong results on reasoning, language understanding, instruction following, code and mathematics tasks.
25
- Falcon3-1B-Instruct supports 4 languages (English, French, Spanish, Portuguese) and a context length of up to 8K.
26
 
27
  ## Model Details
28
- - Architecture
29
- - Transformer-based causal decoder-only architecture
30
- - 18 decoder blocks
31
- - Grouped Query Attention (GQA) for faster inference: 8 query heads and 4 key-value heads
32
- - Wider head dimension: 256
33
- - High RoPE value to support long context understanding: 1000042
34
- - Uses SwiGLU and RMSNorm
35
- - 8K context length
36
- - 131K vocab size
37
- - Pruned and healed using larger Falcon models (3B and 7B respectively) on only 80 Gigatokens of datasets comprising of web, code, STEM, high quality and multilingual data using 256 H100 GPU chips
38
- - Posttrained on 1.2 million samples of STEM, conversational, code, safety and function call data
39
- - Supports EN, FR, ES, PT
40
- - Developed by [Technology Innovation Institute](https://www.tii.ae)
41
- - License: TII Falcon-LLM License 2.0
42
- - Model Release Date: December 2024
43
-
44
-
45
- ## Getting started
46
-
47
- <details>
48
- <summary> Click to expand </summary>
49
-
50
- ```python
51
- from transformers import AutoTokenizer, AutoModelForCausalLM
52
-
53
-
54
- model_name = "tiiuae/Falcon3-1B-Instruct"
55
-
56
- model = AutoModelForCausalLM.from_pretrained(
57
- model_name,
58
- torch_dtype="auto",
59
- device_map="auto"
60
- )
61
- tokenizer = AutoTokenizer.from_pretrained(model_name)
62
-
63
- prompt = "How many hours in one day?"
64
- messages = [
65
- {"role": "system", "content": "You are a helpful friendly assistant Falcon3 from TII, try to follow instructions as much as possible."},
66
- {"role": "user", "content": prompt}
67
- ]
68
- text = tokenizer.apply_chat_template(
69
- messages,
70
- tokenize=False,
71
- add_generation_prompt=True
72
- )
73
- model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
74
-
75
- generated_ids = model.generate(
76
- **model_inputs,
77
- max_new_tokens=1024
78
- )
79
- generated_ids = [
80
- output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
81
- ]
82
-
83
- response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
84
- print(response)
85
- ```
86
-
87
- </details>
88
-
89
- <br>
90
-
91
- ## Benchmarks
92
- We report in the following table our internal pipeline benchmarks.
93
- - We use [lm-evaluation harness](https://github.com/EleutherAI/lm-evaluation-harness).
94
- - We report **raw scores** obtained by applying chat template and fewshot_as_multiturn.
95
- - We use same batch-size across all models.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
  <table border="1" style="width: 100%; text-align: center; border-collapse: collapse;">
98
  <colgroup>
@@ -117,90 +131,97 @@ We report in the following table our internal pipeline benchmarks.
117
  <tr>
118
  <td rowspan="3">General</td>
119
  <td>MMLU (5-shot)</td>
120
- <td><b>68.2</b></td>
121
- <td>59.8</td>
122
- <td>49.2</td>
123
- <td>46.1</td>
124
  </tr>
125
  <tr>
126
  <td>MMLU-PRO (5-shot)</td>
127
- <td>16</td>
128
- <td><b>28.2</b></td>
129
- <td>20</td>
130
  <td>18.6</td>
131
  </tr>
132
  <tr>
133
  <td>IFEval</td>
134
- <td><b>55.3</b></td>
135
- <td>44.2</td>
136
- <td>53</td>
137
  <td>54.4</td>
138
  </tr>
139
  <tr>
140
  <td rowspan="3">Math</td>
141
  <td>GSM8K (5-shot)</td>
142
- <td><b>82.6</b></td>
143
- <td>57.8</td>
144
- <td>47.6</td>
145
- <td>43.9</td>
146
  </tr>
147
  <tr>
148
  <td>GSM8K (8-shot, COT)</td>
149
- <td>46.6</td>
150
- <td><b>58.8</b></td>
151
- <td>46.3</td>
152
- <td>45.8</td>
153
  </tr>
154
  <tr>
155
  <td>MATH Lvl-5 (4-shot)</td>
156
- <td><b>5.2</b></td>
157
- <td>1.1</td>
158
- <td>3.1</td>
159
- <td>1</td>
160
  </tr>
161
  <tr>
162
- <td rowspan="5">Reasoning</td>
163
  <td>Arc Challenge (25-shot)</td>
164
- <td><b>58.6</b></td>
165
- <td>50.7</td>
166
- <td>49.7</td>
167
- <td>47.7</td>
168
  </tr>
169
  <tr>
170
  <td>GPQA (0-shot)</td>
171
- <td>24.4</td>
172
  <td><b>29.6</b></td>
173
- <td>28.6</td>
174
  <td>26.5</td>
175
  </tr>
176
  <tr>
177
  <td>GPQA (0-shot, COT)</td>
178
  <td>13.2</td>
179
  <td>9.2</td>
180
- <td>16</td>
181
  <td><b>21.3</b></td>
182
  </tr>
183
  <tr>
184
  <td>MUSR (0-shot)</td>
185
- <td>32</td>
186
- <td>36.5</td>
187
- <td>32.9</td>
188
  <td><b>40.7</b></td>
189
  </tr>
190
  <tr>
191
  <td>BBH (3-shot)</td>
192
- <td>33.8</td>
193
- <td><b>39.2</b></td>
194
- <td>34</td>
195
  <td>35.1</td>
196
  </tr>
 
 
 
 
 
 
 
197
  <tr>
198
  <td rowspan="5">CommonSense Understanding</td>
199
  <td>PIQA (0-shot)</td>
200
  <td>72.1</td>
201
  <td>73.2</td>
202
  <td><b>74.4</b></td>
203
- <td>72</td>
204
  </tr>
205
  <tr>
206
  <td>SciQ (0-shot)</td>
@@ -221,7 +242,7 @@ We report in the following table our internal pipeline benchmarks.
221
  <td>40.2</td>
222
  <td>40.4</td>
223
  <td><b>42.8</b></td>
224
- <td>40</td>
225
  </tr>
226
  <tr>
227
  <td>MT-Bench (avg)</td>
@@ -232,7 +253,7 @@ We report in the following table our internal pipeline benchmarks.
232
  </tr>
233
  <tr>
234
  <td rowspan="1">Instructions following</td>
235
- <td>Alpaca (WC)</td>
236
  <td><b>8.6</b></td>
237
  <td><b>8.6</b></td>
238
  <td>5.4</td>
@@ -241,22 +262,96 @@ We report in the following table our internal pipeline benchmarks.
241
  </tbody>
242
  </table>
243
 
244
- ## Useful links
245
- - View our [release blogpost](https://huggingface.co/blog/falcon3).
246
- - Feel free to join [our discord server](https://discord.gg/fwXpMyGc) if you have any questions or to interact with our researchers and developers.
247
-
248
- ## Technical Report
249
- Coming soon....
250
-
251
- ## Citation
252
- If the Falcon3 family of models were helpful to your work, feel free to give us a cite.
253
-
254
- ```
255
- @misc{Falcon3,
256
- title = {The Falcon 3 Family of Open Models},
257
- url = {https://huggingface.co/blog/falcon3},
258
- author = {Falcon-LLM Team},
259
- month = {December},
260
- year = {2024}
261
- }
262
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ library_name: transformers
 
 
 
 
3
  tags:
4
  - falcon3
5
  base_model: tiiuae/Falcon3-1B-Base
6
+ license: other
7
+ license_name: falcon-llm-license
8
  license_link: https://falconllm.tii.ae/falcon-terms-and-conditions.html
 
9
  ---
10
 
 
 
 
11
 
12
+ # Model Card for Model ID
13
+
14
+ <!-- Provide a quick summary of what the model is/does. -->
15
 
 
16
 
 
 
17
 
18
  ## Model Details
19
+
20
+ ### Model Description
21
+
22
+ <!-- Provide a longer summary of what this model is. -->
23
+
24
+ This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
25
+
26
+ - **Developed by:** [More Information Needed]
27
+ - **Funded by [optional]:** [More Information Needed]
28
+ - **Shared by [optional]:** [More Information Needed]
29
+ - **Model type:** [More Information Needed]
30
+ - **Language(s) (NLP):** [More Information Needed]
31
+ - **License:** [More Information Needed]
32
+ - **Finetuned from model [optional]:** [More Information Needed]
33
+
34
+ ### Model Sources [optional]
35
+
36
+ <!-- Provide the basic links for the model. -->
37
+
38
+ - **Repository:** [More Information Needed]
39
+ - **Paper [optional]:** [More Information Needed]
40
+ - **Demo [optional]:** [More Information Needed]
41
+
42
+ ## Uses
43
+
44
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
45
+
46
+ ### Direct Use
47
+
48
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
49
+
50
+ [More Information Needed]
51
+
52
+ ### Downstream Use [optional]
53
+
54
+ <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
55
+
56
+ [More Information Needed]
57
+
58
+ ### Out-of-Scope Use
59
+
60
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
61
+
62
+ [More Information Needed]
63
+
64
+ ## Bias, Risks, and Limitations
65
+
66
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
67
+
68
+ [More Information Needed]
69
+
70
+ ### Recommendations
71
+
72
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
73
+
74
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
75
+
76
+ ## How to Get Started with the Model
77
+
78
+ Use the code below to get started with the model.
79
+
80
+ [More Information Needed]
81
+
82
+ ## Training Details
83
+
84
+ ### Training Data
85
+
86
+ <!-- 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. -->
87
+
88
+ [More Information Needed]
89
+
90
+ ### Training Procedure
91
+
92
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
93
+
94
+ #### Preprocessing [optional]
95
+
96
+ [More Information Needed]
97
+
98
+
99
+ #### Training Hyperparameters
100
+
101
+ - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
102
+
103
+ #### Speeds, Sizes, Times [optional]
104
+
105
+ <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
106
+
107
+ [More Information Needed]
108
+
109
+ ## Evaluation
110
 
111
  <table border="1" style="width: 100%; text-align: center; border-collapse: collapse;">
112
  <colgroup>
 
131
  <tr>
132
  <td rowspan="3">General</td>
133
  <td>MMLU (5-shot)</td>
134
+ <td>23.4</td>
135
+ <td><b>58.4</b></td>
136
+ <td>48.4</td>
137
+ <td>43.9</td>
138
  </tr>
139
  <tr>
140
  <td>MMLU-PRO (5-shot)</td>
141
+ <td>11.3</td>
142
+ <td><b>21.3</b></td>
143
+ <td>17.2</td>
144
  <td>18.6</td>
145
  </tr>
146
  <tr>
147
  <td>IFEval</td>
148
+ <td><b>55.8</b></td>
149
+ <td>44.4</td>
150
+ <td>53.0</td>
151
  <td>54.4</td>
152
  </tr>
153
  <tr>
154
  <td rowspan="3">Math</td>
155
  <td>GSM8K (5-shot)</td>
156
+ <td>37.4</td>
157
+ <td><b>57.2</b></td>
158
+ <td>43.4</td>
159
+ <td>38.6</td>
160
  </tr>
161
  <tr>
162
  <td>GSM8K (8-shot, COT)</td>
163
+ <td>35.6</td>
164
+ <td><b>62.2</b></td>
165
+ <td>47.2</td>
166
+ <td>41.8</td>
167
  </tr>
168
  <tr>
169
  <td>MATH Lvl-5 (4-shot)</td>
170
+ <td><b>3.9</b></td>
171
+ <td>0.2</td>
172
+ <td>0.1</td>
173
+ <td>1.0</td>
174
  </tr>
175
  <tr>
176
+ <td rowspan="6">Reasoning</td>
177
  <td>Arc Challenge (25-shot)</td>
178
+ <td>34.1</td>
179
+ <td>47.0</td>
180
+ <td><b>47.6</b></td>
181
+ <td>45.9</td>
182
  </tr>
183
  <tr>
184
  <td>GPQA (0-shot)</td>
185
+ <td>25.3</td>
186
  <td><b>29.6</b></td>
187
+ <td>28.7</td>
188
  <td>26.5</td>
189
  </tr>
190
  <tr>
191
  <td>GPQA (0-shot, COT)</td>
192
  <td>13.2</td>
193
  <td>9.2</td>
194
+ <td>16.0</td>
195
  <td><b>21.3</b></td>
196
  </tr>
197
  <tr>
198
  <td>MUSR (0-shot)</td>
199
+ <td>32.4</td>
200
+ <td>36.8</td>
201
+ <td>33.0</td>
202
  <td><b>40.7</b></td>
203
  </tr>
204
  <tr>
205
  <td>BBH (3-shot)</td>
206
+ <td>30.3</td>
207
+ <td><b>38.5</b></td>
208
+ <td>33.1</td>
209
  <td>35.1</td>
210
  </tr>
211
+ <tr>
212
+ <td>BBH (3-shot, COT)</td>
213
+ <td>0.0</td>
214
+ <td>20.3</td>
215
+ <td>0.8</td>
216
+ <td><b>30.5</b></td>
217
+ </tr>
218
  <tr>
219
  <td rowspan="5">CommonSense Understanding</td>
220
  <td>PIQA (0-shot)</td>
221
  <td>72.1</td>
222
  <td>73.2</td>
223
  <td><b>74.4</b></td>
224
+ <td>72.0</td>
225
  </tr>
226
  <tr>
227
  <td>SciQ (0-shot)</td>
 
242
  <td>40.2</td>
243
  <td>40.4</td>
244
  <td><b>42.8</b></td>
245
+ <td>40.0</td>
246
  </tr>
247
  <tr>
248
  <td>MT-Bench (avg)</td>
 
253
  </tr>
254
  <tr>
255
  <td rowspan="1">Instructions following</td>
256
+ <td>Alapaca (WC)</td>
257
  <td><b>8.6</b></td>
258
  <td><b>8.6</b></td>
259
  <td>5.4</td>
 
262
  </tbody>
263
  </table>
264
 
265
+ ### Testing Data, Factors & Metrics
266
+
267
+ #### Testing Data
268
+
269
+ <!-- This should link to a Dataset Card if possible. -->
270
+
271
+ [More Information Needed]
272
+
273
+ #### Factors
274
+
275
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
276
+
277
+ [More Information Needed]
278
+
279
+ #### Metrics
280
+
281
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
282
+
283
+ [More Information Needed]
284
+
285
+ ### Results
286
+
287
+ [More Information Needed]
288
+
289
+ #### Summary
290
+
291
+
292
+
293
+ ## Model Examination [optional]
294
+
295
+ <!-- Relevant interpretability work for the model goes here -->
296
+
297
+ [More Information Needed]
298
+
299
+ ## Environmental Impact
300
+
301
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
302
+
303
+ 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).
304
+
305
+ - **Hardware Type:** [More Information Needed]
306
+ - **Hours used:** [More Information Needed]
307
+ - **Cloud Provider:** [More Information Needed]
308
+ - **Compute Region:** [More Information Needed]
309
+ - **Carbon Emitted:** [More Information Needed]
310
+
311
+ ## Technical Specifications [optional]
312
+
313
+ ### Model Architecture and Objective
314
+
315
+ [More Information Needed]
316
+
317
+ ### Compute Infrastructure
318
+
319
+ [More Information Needed]
320
+
321
+ #### Hardware
322
+
323
+ [More Information Needed]
324
+
325
+ #### Software
326
+
327
+ [More Information Needed]
328
+
329
+ ## Citation [optional]
330
+
331
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
332
+
333
+ **BibTeX:**
334
+
335
+ [More Information Needed]
336
+
337
+ **APA:**
338
+
339
+ [More Information Needed]
340
+
341
+ ## Glossary [optional]
342
+
343
+ <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
344
+
345
+ [More Information Needed]
346
+
347
+ ## More Information [optional]
348
+
349
+ [More Information Needed]
350
+
351
+ ## Model Card Authors [optional]
352
+
353
+ [More Information Needed]
354
+
355
+ ## Model Card Contact
356
+
357
+ [More Information Needed]
config.json CHANGED
@@ -4,6 +4,7 @@
4
  ],
5
  "attention_bias": false,
6
  "attention_dropout": 0.0,
 
7
  "eos_token_id": 11,
8
  "head_dim": 256,
9
  "hidden_act": "silu",
 
4
  ],
5
  "attention_bias": false,
6
  "attention_dropout": 0.0,
7
+ "bos_token_id": 11,
8
  "eos_token_id": 11,
9
  "head_dim": 256,
10
  "hidden_act": "silu",
tokenizer_config.json CHANGED
@@ -16219,7 +16219,7 @@
16219
  ">>PASSWORD<<",
16220
  ">>KEY<<"
16221
  ],
16222
- "chat_template": "{% if tools %}{% for message in messages %}{% if message['role'] == 'system' %}{{ '<|system|>\n' + message['content'] + '\nYou are an expert in composing functions. You are given a question and a set of possible functions. \nBased on the question, you will need to make one or more function/tool calls to achieve the purpose. \nIf none of the functions can be used, point it out and refuse to answer. \nIf the given question lacks the parameters required by the function, also point it out.\n\n You have access to the following tools:\n<tools>' + tools|tojson + '</tools>\n\nThe output MUST strictly adhere to the following format, and NO other text MUST be included.\nThe example format is as follows. Please make sure the parameter type is correct. If no function call is needed, please make the tool calls an empty list [].\n<tool_call>[\n{\"name\": \"function_name1\", \"arguments\": {\"argument1\": \"value1\", \"argument2\": \"value2\"}},\n... (more tool calls as required)\n]</tool_call>' }}{% elif message['role'] == 'user' %}{{ '<|user|>\n' + message['content'] + '\n' }}{% elif message['role'] == 'assistant' %}{% if not loop.last %}{{ '<|assistant|>\n' + message['content'] + eos_token + '\n' }}{% else %}{{ '<|assistant|>\n' + message['content'] + eos_token }}{% endif %}{% endif %}{% if loop.last and add_generation_prompt %}{{ '<|assistant|>\n' }}{% endif %}{% endfor %}{% else %}{% for message in messages %}{% if message['role'] == 'system' %}{{ '<|system|>\n' + message['content'] + '\n' }}{% elif message['role'] == 'user' %}{{ '<|user|>\n' + message['content'] + '\n' }}{% elif message['role'] == 'assistant' %}{% if not loop.last %}{{ '<|assistant|>\n' + message['content'] + eos_token + '\n' }}{% else %}{{ '<|assistant|>\n' + message['content'] + eos_token }}{% endif %}{% endif %}{% if loop.last and add_generation_prompt %}{{ '<|assistant|>\n' }}{% endif %}{% endfor %}{% endif %}",
16223
  "clean_up_tokenization_spaces": true,
16224
  "eos_token": "<|endoftext|>",
16225
  "extra_special_tokens": {},
 
16219
  ">>PASSWORD<<",
16220
  ">>KEY<<"
16221
  ],
16222
+ "chat_template": "{% for message in messages %}{% if message['role'] == 'system' %}{{ '<|system|>\n' + message['content'] + '\n' }}{% elif message['role'] == 'user' %}{{ '<|user|>\n' + message['content'] + '\n' }}{% elif message['role'] == 'assistant' %}{% if not loop.last %}{{ '<|assistant|>\n' + message['content'] + eos_token + '\n' }}{% else %}{{ '<|assistant|>\n' + message['content'] + eos_token }}{% endif %}{% endif %}{% if loop.last and add_generation_prompt %}{{ '<|assistant|>\n' }}{% endif %}{% endfor %}",
16223
  "clean_up_tokenization_spaces": true,
16224
  "eos_token": "<|endoftext|>",
16225
  "extra_special_tokens": {},