RichardErkhov commited on
Commit
b66a577
1 Parent(s): 088e659

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +360 -0
README.md ADDED
@@ -0,0 +1,360 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ falcon-mamba-7b-instruct - GGUF
11
+ - Model creator: https://huggingface.co/tiiuae/
12
+ - Original model: https://huggingface.co/tiiuae/falcon-mamba-7b-instruct/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [falcon-mamba-7b-instruct.Q2_K.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q2_K.gguf) | Q2_K | 2.39GB |
18
+ | [falcon-mamba-7b-instruct.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.IQ3_XS.gguf) | IQ3_XS | 3.05GB |
19
+ | [falcon-mamba-7b-instruct.IQ3_S.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.IQ3_S.gguf) | IQ3_S | 3.05GB |
20
+ | [falcon-mamba-7b-instruct.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q3_K_S.gguf) | Q3_K_S | 3.05GB |
21
+ | [falcon-mamba-7b-instruct.IQ3_M.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.IQ3_M.gguf) | IQ3_M | 3.05GB |
22
+ | [falcon-mamba-7b-instruct.Q3_K.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q3_K.gguf) | Q3_K | 3.05GB |
23
+ | [falcon-mamba-7b-instruct.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q3_K_M.gguf) | Q3_K_M | 3.05GB |
24
+ | [falcon-mamba-7b-instruct.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q3_K_L.gguf) | Q3_K_L | 3.05GB |
25
+ | [falcon-mamba-7b-instruct.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.IQ4_XS.gguf) | IQ4_XS | 3.71GB |
26
+ | [falcon-mamba-7b-instruct.Q4_0.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q4_0.gguf) | Q4_0 | 3.92GB |
27
+ | [falcon-mamba-7b-instruct.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.IQ4_NL.gguf) | IQ4_NL | 3.92GB |
28
+ | [falcon-mamba-7b-instruct.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q4_K_S.gguf) | Q4_K_S | 3.92GB |
29
+ | [falcon-mamba-7b-instruct.Q4_K.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q4_K.gguf) | Q4_K | 3.92GB |
30
+ | [falcon-mamba-7b-instruct.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q4_K_M.gguf) | Q4_K_M | 3.92GB |
31
+ | [falcon-mamba-7b-instruct.Q4_1.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q4_1.gguf) | Q4_1 | 4.32GB |
32
+ | [falcon-mamba-7b-instruct.Q5_0.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q5_0.gguf) | Q5_0 | 4.73GB |
33
+ | [falcon-mamba-7b-instruct.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q5_K_S.gguf) | Q5_K_S | 4.73GB |
34
+ | [falcon-mamba-7b-instruct.Q5_K.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q5_K.gguf) | Q5_K | 4.73GB |
35
+ | [falcon-mamba-7b-instruct.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q5_K_M.gguf) | Q5_K_M | 4.73GB |
36
+ | [falcon-mamba-7b-instruct.Q5_1.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q5_1.gguf) | Q5_1 | 5.14GB |
37
+ | [falcon-mamba-7b-instruct.Q6_K.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q6_K.gguf) | Q6_K | 5.59GB |
38
+ | [falcon-mamba-7b-instruct.Q8_0.gguf](https://huggingface.co/RichardErkhov/tiiuae_-_falcon-mamba-7b-instruct-gguf/blob/main/falcon-mamba-7b-instruct.Q8_0.gguf) | Q8_0 | 7.23GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ datasets:
46
+ - tiiuae/falcon-refinedweb
47
+ - HuggingFaceFW/fineweb-edu
48
+ language:
49
+ - en
50
+ license: other
51
+ license_name: falcon-mamba-7b-license
52
+ license_link: https://falconllm.tii.ae/falcon-mamba-7b-terms-and-conditions.html
53
+ base_model: tiiuae/falcon-mamba-7b
54
+ ---
55
+
56
+ <img src="https://huggingface.co/datasets/tiiuae/documentation-images/resolve/main/falcon_mamba/thumbnail.png" alt="drawing" width="800"/>
57
+
58
+ **Model card for FalconMamba Instruct model**
59
+
60
+ # Table of Contents
61
+
62
+ 0. [TL;DR](#TL;DR)
63
+ 1. [Model Details](#model-details)
64
+ 2. [Usage](#usage)
65
+ 3. [Training Details](#training-details)
66
+ 4. [Evaluation](#evaluation)
67
+
68
+
69
+ # TL;DR
70
+
71
+ # Model Details
72
+
73
+ ## Model Description
74
+
75
+ - **Developed by:** [https://www.tii.ae](https://www.tii.ae)
76
+ - **Model type:** Causal decoder-only
77
+ - **Architecture:** Mamba
78
+ - **Language(s) (NLP):** Mainly English
79
+ - **License:** TII Falcon-Mamba License 2.0
80
+
81
+ <br>
82
+
83
+ # Usage
84
+
85
+ Find below some example scripts on how to use the model in `transformers` (Make sure to have the latest transformers, or the one built from source):
86
+
87
+ ## Using the Pytorch model
88
+
89
+ ### Running the model on a CPU
90
+
91
+ <details>
92
+ <summary> Click to expand </summary>
93
+
94
+ ```python
95
+ from transformers import AutoTokenizer, AutoModelForCausalLM
96
+
97
+ tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-mamba-7b-instruct")
98
+ model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-mamba-7b-instruct")
99
+
100
+ # We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
101
+ messages = [
102
+ {"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
103
+ ]
104
+
105
+ input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
106
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids
107
+
108
+ outputs = model.generate(input_ids, max_new_tokens=30)
109
+ print(tokenizer.decode(outputs[0]))
110
+ ```
111
+
112
+ </details>
113
+
114
+ ### Running the model on a GPU
115
+
116
+ <details>
117
+ <summary> Click to expand </summary>
118
+
119
+ ```python
120
+ # pip install accelerate
121
+ from transformers import AutoTokenizer, AutoModelForCausalLM
122
+
123
+ tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-mamba-7b-instruct")
124
+ model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-mamba-7b-instruct", device_map="auto")
125
+
126
+ # We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
127
+ messages = [
128
+ {"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
129
+ ]
130
+
131
+ input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
132
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
133
+
134
+ outputs = model.generate(input_ids, max_new_tokens=30)
135
+ print(tokenizer.decode(outputs[0]))
136
+ ```
137
+
138
+ </details>
139
+
140
+ ### Running the model on a GPU using `torch.compile`
141
+
142
+ <details>
143
+ <summary> Click to expand </summary>
144
+
145
+ ```python
146
+ import torch
147
+ from transformers import AutoTokenizer, AutoModelForCausalLM
148
+
149
+ tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-mamba-7b-instruct")
150
+ model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-mamba-7b-instruct", torch_dtype=torch.bfloat16).to(0)
151
+
152
+ model = torch.compile(model)
153
+
154
+ # We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
155
+ messages = [
156
+ {"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
157
+ ]
158
+ input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
159
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
160
+
161
+ outputs = model.generate(input_ids, max_new_tokens=30)
162
+ print(tokenizer.decode(outputs[0]))
163
+ ```
164
+
165
+ </details>
166
+
167
+
168
+ ### Running the model on a GPU using different precisions
169
+
170
+ #### FP16
171
+
172
+ <details>
173
+ <summary> Click to expand </summary>
174
+
175
+ ```python
176
+ # pip install accelerate
177
+ import torch
178
+ from transformers import AutoTokenizer, AutoModelForCausalLM
179
+
180
+ tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-mamba-7b-instruct")
181
+ model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-mamba-7b-instruct", device_map="auto", torch_dtype=torch.float16)
182
+
183
+ # We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
184
+ messages = [
185
+ {"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
186
+ ]
187
+ input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
188
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
189
+
190
+ outputs = model.generate(input_ids, max_new_tokens=30)
191
+ print(tokenizer.decode(outputs[0]))
192
+ ```
193
+
194
+ </details>
195
+
196
+ #### 4-bit
197
+
198
+ <details>
199
+ <summary> Click to expand </summary>
200
+
201
+ ```python
202
+ # pip install bitsandbytes accelerate
203
+ from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
204
+
205
+ tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-mamba-7b-instruct")
206
+ model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-mamba-7b-instruct", device_map="auto", quantization_config=BitsAndBytesConfig(load_in_4bit=True))
207
+
208
+ # We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
209
+ messages = [
210
+ {"role": "user", "content": "How many helicopters can a human eat in one sitting?"},
211
+ ]
212
+ input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
213
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to("cuda")
214
+
215
+ outputs = model.generate(input_ids, max_new_tokens=30)
216
+ print(tokenizer.decode(outputs[0]))
217
+ ```
218
+
219
+ </details>
220
+
221
+ <br>
222
+
223
+ # Training Details
224
+
225
+ ## Training Data
226
+
227
+ Falcon-Mamba has been trained with ~ 5,500 GT mainly coming from [Refined-Web](https://huggingface.co/datasets/tiiuae/falcon-refinedweb), a large volume web-only dataset filtered and deduplicated.
228
+ Similar to the others [Falcon](https://huggingface.co/tiiuae/falcon-11B) suite models, Falcon-Mamba has been trained leveraging a multi-stage training strategy to increase the context-length from 2,048 to 8,192.
229
+ Moreover, inspired by the concept of Curriculum Learning, we carefully selected data mixtures throughout the training stages, considering both data diversity and complexity.
230
+ Note that at inference the context-length is not relevant as the Mamba architecture has no limit on long range dependency.
231
+ At the last training stage, small portion of high-quality curated data was used to further enhance performance.
232
+
233
+ Overall, the data sources included RefinedWeb-English, high quality technical data, code data and math data extracted from public sources.
234
+ In particular, we used samples coming from [Fineweb-edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu) during our last training stage.
235
+
236
+ The data was tokenized with the Falcon-[7B](https://huggingface.co/tiiuae/falcon-7B)/[11B](https://huggingface.co/tiiuae/falcon-11B) tokenizer.
237
+
238
+ After pre-training, the model has been further fine-tuned on instruction data.
239
+
240
+ ## Training Procedure
241
+ Falcon-Mamba-7B was trained on 256 H100 80GB GPUs for the majority of the training, using a 3D parallelism strategy (TP=1, PP=1, DP=256) combined with ZeRO.
242
+
243
+ ### Training Hyperparameters
244
+
245
+ | **Hyperparameter** | **Value** | **Comment** |
246
+ |--------------------|------------|-------------------------------------------|
247
+ | Precision | `bfloat16` | |
248
+ | Optimizer | AdamW | |
249
+ | Max learning rate | 6.4e-4 | Following a WSD (warmup-stable-decay) learning rate schedule |
250
+ | Weight decay | 1e-1 | |
251
+ | Batch size | 2048 | |
252
+
253
+
254
+ The model was trained AdamW optimizer, WSD (warmup-stable-decay) learning rate schedule, and a batch size rampup from \\(b_{\mathrm{min}}=128\\) to \\(b_{\mathrm{max}}=2048\\) during first 50 GT of training.
255
+ In the stable phase we used maximal learning rate \\(\eta_{\mathrm{max}}=6.4 \times 10^{-4}\\), and decayed it to the minimal value \\(\eta_{\mathrm{min}}=\frac{\eta_{\mathrm{max}}}{256}\\) with exponential schedule over 500 GT.
256
+ Also, we applied *BatchScaling* during the rampup — rescaling learning rate \\(\eta\\) so that the Adam noise temperature \\(T_{\mathrm{noise}}\equiv\frac{\eta}{\sqrt{b}}\\) is kept constant.
257
+
258
+ ### Speeds, Sizes, Times
259
+
260
+ The model training took roughly two months.
261
+
262
+ <br>
263
+
264
+ # Evaluation
265
+
266
+ ## Benchmarks
267
+
268
+ We evaluate our model on all benchmarks of the new leaderboard's version using the `lm-evaluation-harness` package, and then normalize the evaluation results with HuggingFace score normalization.
269
+
270
+
271
+ | `model name` |`IFEval`| `BBH` |`MATH LvL5`| `GPQA`| `MUSR`|`MMLU-PRO`|`Average`|
272
+ |:--------------------------|:------:|:-----:|:---------:|:-----:|:-----:|:--------:|:-------:|
273
+ | ***Pure SSM models*** | | | | | | | |
274
+ | `FalconMamba-7B` | 33.36 | 19.88 | 3.63 |8.05 |10.86 | 14.47 |**15.04**|
275
+ | `TRI-ML/mamba-7b-rw`<sup>*</sup>| 22.46 | 6.71 | 0.45 | 1.12 | 5.51 | 1.69 | 6.25 |
276
+ |***Hybrid SSM-attention models*** | | | | | | |
277
+ |`recurrentgemma-9b` | 30.76 | 14.80 | 4.83 | 4.70 | 6.60 | 17.88 | 13.20 |
278
+ | `Zyphra/Zamba-7B-v1`<sup>*</sup> | 24.06 | 21.12 | 3.32 | 3.03 | 7.74 | 16.02 | 12.55 |
279
+ |***Transformer models*** | | | | | | | |
280
+ | `Falcon2-11B` | 32.61 | 21.94 | 2.34 | 2.80 | 7.53 | 15.44 | 13.78 |
281
+ | `Meta-Llama-3-8B` | 14.55 | 24.50 | 3.25 | 7.38 | 6.24 | 24.55 | 13.41 |
282
+ | `Meta-Llama-3.1-8B` | 12.70 | 25.29 | 4.61 | 6.15 | 8.98 | 24.95 | 13.78 |
283
+ | `Mistral-7B-v0.1` | 23.86 | 22.02 | 2.49 | 5.59 | 10.68 | 22.36 | 14.50 |
284
+ | `Mistral-Nemo-Base-2407 (12B)` | 16.83 | 29.37 | 4.98 | 5.82 | 6.52 | 27.46 | 15.08 |
285
+ | `gemma-7B` | 26.59 | 21.12 | 6.42 | 4.92 | 10.98 | 21.64 |**15.28**|
286
+
287
+
288
+ Also, we evaluate our model on the benchmarks of the first leaderboard using `lighteval`.
289
+
290
+
291
+ | `model name` |`ARC`|`HellaSwag` |`MMLU` |`Winogrande`|`TruthfulQA`|`GSM8K`|`Average` |
292
+ |:-----------------------------|:------:|:---------:|:-----:|:----------:|:----------:|:-----:|:----------------:|
293
+ | ***Pure SSM models*** | | | | | | | |
294
+ | `FalconMamba-7B`<sup>*</sup> | 62.03 | 80.82 | 62.11 | 73.64 | 53.42 | 52.54 | **64.09** |
295
+ | `TRI-ML/mamba-7b-rw`<sup>*</sup> | 51.25 | 80.85 | 33.41 | 71.11 | 32.08 | 4.70 | 45.52 |
296
+ |***Hybrid SSM-attention models***| | | | | | | |
297
+ | `recurrentgemma-9b`<sup>**</sup> |52.00 | 80.40 | 60.50 | 73.60 | 38.60 | 42.60 | 57.95 |
298
+ | `Zyphra/Zamba-7B-v1`<sup>*</sup> | 56.14 | 82.23 | 58.11 | 79.87 | 52.88 | 30.78 | 60.00 |
299
+ |***Transformer models*** | | | | | | | |
300
+ | `Falcon2-11B` | 59.73 | 82.91 | 58.37 | 78.30 | 52.56 | 53.83 | **64.28** |
301
+ | `Meta-Llama-3-8B` | 60.24 | 82.23 | 66.70 | 78.45 | 42.93 | 45.19 | 62.62 |
302
+ | `Meta-Llama-3.1-8B` | 58.53 | 82.13 | 66.43 | 74.35 | 44.29 | 47.92 | 62.28 |
303
+ | `Mistral-7B-v0.1` | 59.98 | 83.31 | 64.16 | 78.37 | 42.15 | 37.83 | 60.97 |
304
+ | `gemma-7B` | 61.09 | 82.20 | 64.56 | 79.01 | 44.79 | 50.87 | 63.75 |
305
+
306
+ Mostly, we took evaluation results from both leaderboards. For the models marked by *star* we evaluated the tasks internally, while for the models marked by two *stars* the results were taken from paper or model card.
307
+
308
+ ## Throughput
309
+
310
+ This model can achieve comparable throughput and performance compared to other transformer based models that use optimized kernels such as Flash Attention 2. Make sure to install the optimized Mamba kernels with the following commands:
311
+
312
+ ```bash
313
+ pip install "causal-conv1d>=1.4.0" mamba-ssm
314
+ ```
315
+
316
+ Refer to our [FalconMamba blogpost](https://huggingface.co/blog/falconmamba) for more details about performance evaluation.
317
+
318
+
319
+ <br>
320
+
321
+ # Technical Specifications
322
+
323
+ ## Model Architecture and Objective
324
+
325
+ Falcon-Mamba-7B is a causal decoder-only model trained on a causal language modeling task (i.e., predict the next token).
326
+
327
+ The model is based on the Mamba architecture ([Gu et al., 2023](https://arxiv.org/abs/2312.00752)).
328
+
329
+ | **Hyperparameter** | **Value** | **Comment** |
330
+ |--------------------|-----------|----------------------------------------|
331
+ | Layers | 64 | Number of layers |
332
+ | `d_model` | 4096 | Hidden dimension |
333
+ | `d_state` | 16 | The SSM state dimension |
334
+ | Vocabulary | 65024 | Vocabulary Size |
335
+ | Sequence length | 8192 | During the last training stages |
336
+
337
+ ## Compute Infrastructure
338
+
339
+ ### Hardware
340
+
341
+ Falcon-Mamba-7B was trained on AWS SageMaker, using on average 256 H100 80GB GPUs in 32 p5 instances.
342
+
343
+ ### Software
344
+
345
+ Falcon-Mamba-7B was trained on an internal distributed training codebase, Gigatron. It uses a 3D parallelism approach combined with ZeRO, high-performance Triton kernels.
346
+
347
+ <br>
348
+
349
+ # Citation
350
+
351
+ *Paper coming soon* 😊. In the meanwhile, you can use the following information to cite:
352
+ ```
353
+ @article{falconmamba,
354
+ title={Falcon Mamba: The First Competitive Attention-free 7B Language Model},
355
+ author={Zuo, Jingwei and Velikanov, Maksim and Rhaiem, Dhia Eddine and Chahed, Ilyas and Belkada, Younes and Kunsch, Guillaume and Hacid, Hakim},
356
+ year={2024}
357
+ }
358
+ ```
359
+
360
+