TheBloke commited on
Commit
80397c1
โ€ข
1 Parent(s): 21c859a

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +466 -0
README.md ADDED
@@ -0,0 +1,466 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ datasets:
3
+ - tiiuae/falcon-refinedweb
4
+ inference: false
5
+ language:
6
+ - en
7
+ - de
8
+ - es
9
+ - fr
10
+ license: unknown
11
+ model_creator: Technology Innovation Institute
12
+ model_link: https://huggingface.co/tiiuae/falcon-180B
13
+ model_name: Falcon 180B
14
+ model_type: falcon
15
+ quantized_by: TheBloke
16
+ ---
17
+
18
+ <!-- header start -->
19
+ <!-- 200823 -->
20
+ <div style="width: auto; margin-left: auto; margin-right: auto">
21
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
22
+ </div>
23
+ <div style="display: flex; justify-content: space-between; width: 100%;">
24
+ <div style="display: flex; flex-direction: column; align-items: flex-start;">
25
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
26
+ </div>
27
+ <div style="display: flex; flex-direction: column; align-items: flex-end;">
28
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
29
+ </div>
30
+ </div>
31
+ <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
32
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
33
+ <!-- header end -->
34
+
35
+ # Falcon 180B - GPTQ
36
+ - Model creator: [Technology Innovation Institute](https://huggingface.co/tiiuae)
37
+ - Original model: [Falcon 180B](https://huggingface.co/tiiuae/falcon-180B)
38
+
39
+ <!-- description start -->
40
+ ## Description
41
+
42
+ This repo contains GPTQ model files for [Technology Innovation Institute's Falcon 180B](https://huggingface.co/tiiuae/falcon-180B).
43
+
44
+ Multiple GPTQ parameter permutations are provided; see Provided Files below for details of the options provided, their parameters, and the software used to create them.
45
+
46
+ <!-- description end -->
47
+ <!-- repositories-available start -->
48
+ ## Repositories available
49
+
50
+ * [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Falcon-180B-GPTQ)
51
+ * [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Falcon-180B-GGUF)
52
+ * [Technology Innovation Institute's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/tiiuae/falcon-180B)
53
+ <!-- repositories-available end -->
54
+
55
+ <!-- prompt-template start -->
56
+ ## Prompt template: None
57
+
58
+ ```
59
+ {prompt}
60
+
61
+ ```
62
+
63
+ <!-- prompt-template end -->
64
+
65
+ <!-- README_GPTQ.md-provided-files start -->
66
+ ## Provided files and GPTQ parameters
67
+
68
+ Multiple quantisation parameters are provided, to allow you to choose the best one for your hardware and requirements.
69
+
70
+ Each separate quant is in a different branch. See below for instructions on fetching from different branches.
71
+
72
+ All recent GPTQ files are made with AutoGPTQ, and all files in non-main branches are made with AutoGPTQ. Files in the `main` branch which were uploaded before August 2023 were made with GPTQ-for-LLaMa.
73
+
74
+ <details>
75
+ <summary>Explanation of GPTQ parameters</summary>
76
+
77
+ - Bits: The bit size of the quantised model.
78
+ - GS: GPTQ group size. Higher numbers use less VRAM, but have lower quantisation accuracy. "None" is the lowest possible value.
79
+ - Act Order: True or False. Also known as `desc_act`. True results in better quantisation accuracy. Some GPTQ clients have had issues with models that use Act Order plus Group Size, but this is generally resolved now.
80
+ - Damp %: A GPTQ parameter that affects how samples are processed for quantisation. 0.01 is default, but 0.1 results in slightly better accuracy.
81
+ - GPTQ dataset: The dataset used for quantisation. Using a dataset more appropriate to the model's training can improve quantisation accuracy. Note that the GPTQ dataset is not the same as the dataset used to train the model - please refer to the original model repo for details of the training dataset(s).
82
+ - Sequence Length: The length of the dataset sequences used for quantisation. Ideally this is the same as the model sequence length. For some very long sequence models (16+K), a lower sequence length may have to be used. Note that a lower sequence length does not limit the sequence length of the quantised model. It only impacts the quantisation accuracy on longer inference sequences.
83
+ - ExLlama Compatibility: Whether this file can be loaded with ExLlama, which currently only supports Llama models in 4-bit.
84
+
85
+ </details>
86
+
87
+ | Branch | Bits | GS | Act Order | Damp % | GPTQ Dataset | Seq Len | Size | ExLlama | Desc |
88
+ | ------ | ---- | -- | --------- | ------ | ------------ | ------- | ---- | ------- | ---- |
89
+ | main | 4 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | 10.00 GB | No | 4-bit, with Act Order and group size 128g. Uses even less VRAM than 64g, but with slightly lower accuracy. |
90
+ | gptq-3bit-128g-actorder_True | 3 | 128 | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | Processing, coming soon | No | 3-bit, with group size 128g and act-order. Higher quality than 128g-False. |
91
+ | gptq-3bit--1g-actorder_True | 3 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | Processing, coming soon | No | 3-bit, with Act Order and no group size. Lowest possible VRAM requirements. May be lower quality than 3-bit 128g. |
92
+ | gptq-4bit--1g-actorder_True | 4 | None | Yes | 0.1 | [wikitext](https://huggingface.co/datasets/wikitext/viewer/wikitext-2-v1/test) | 2048 | Processing, coming soon | No | 4-bit, with Act Order. No group size, to lower VRAM requirements. |
93
+
94
+ <!-- README_GPTQ.md-provided-files end -->
95
+
96
+ <!-- README_GPTQ.md-download-from-branches start -->
97
+ ## How to download from branches
98
+
99
+ - In text-generation-webui, you can add `:branch` to the end of the download name, eg `TheBloke/Falcon-180B-GPTQ:main`
100
+ - With Git, you can clone a branch with:
101
+ ```
102
+ git clone --single-branch --branch main https://huggingface.co/TheBloke/Falcon-180B-GPTQ
103
+ ```
104
+ - In Python Transformers code, the branch is the `revision` parameter; see below.
105
+ <!-- README_GPTQ.md-download-from-branches end -->
106
+ <!-- README_GPTQ.md-text-generation-webui start -->
107
+ ## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
108
+
109
+ Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
110
+
111
+ It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install.
112
+
113
+ 1. Click the **Model tab**.
114
+ 2. Under **Download custom model or LoRA**, enter `TheBloke/Falcon-180B-GPTQ`.
115
+ - To download from a specific branch, enter for example `TheBloke/Falcon-180B-GPTQ:main`
116
+ - see Provided Files above for the list of branches for each option.
117
+ 3. Click **Download**.
118
+ 4. The model will start downloading. Once it's finished it will say "Done".
119
+ 5. In the top left, click the refresh icon next to **Model**.
120
+ 6. In the **Model** dropdown, choose the model you just downloaded: `Falcon-180B-GPTQ`
121
+ 7. The model will automatically load, and is now ready for use!
122
+ 8. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.
123
+ * Note that you do not need to and should not set manual GPTQ parameters any more. These are set automatically from the file `quantize_config.json`.
124
+ 9. Once you're ready, click the **Text Generation tab** and enter a prompt to get started!
125
+ <!-- README_GPTQ.md-text-generation-webui end -->
126
+
127
+ <!-- README_GPTQ.md-use-from-python start -->
128
+ ## How to use this GPTQ model from Python code
129
+
130
+ ### Install the necessary packages
131
+
132
+ Requires: Transformers 4.32.0 or later, Optimum 1.12.0 or later, and AutoGPTQ 0.4.2 or later.
133
+
134
+ ```shell
135
+ pip3 install transformers>=4.32.0 optimum>=1.12.0
136
+ pip3 install auto-gptq --extra-index-url https://huggingface.github.io/autogptq-index/whl/cu118/ # Use cu117 if on CUDA 11.7
137
+ ```
138
+
139
+ If you have problems installing AutoGPTQ using the pre-built wheels, install it from source instead:
140
+
141
+ ```shell
142
+ pip3 uninstall -y auto-gptq
143
+ git clone https://github.com/PanQiWei/AutoGPTQ
144
+ cd AutoGPTQ
145
+ pip3 install .
146
+ ```
147
+
148
+ ### For CodeLlama models only: you must use Transformers 4.33.0 or later.
149
+
150
+ If 4.33.0 is not yet released when you read this, you will need to install Transformers from source:
151
+ ```shell
152
+ pip3 uninstall -y transformers
153
+ pip3 install git+https://github.com/huggingface/transformers.git
154
+ ```
155
+
156
+ ### You can then use the following code
157
+
158
+ ```python
159
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
160
+
161
+ model_name_or_path = "TheBloke/Falcon-180B-GPTQ"
162
+ # To use a different branch, change revision
163
+ # For example: revision="main"
164
+ model = AutoModelForCausalLM.from_pretrained(model_name_or_path,
165
+ device_map="auto",
166
+ trust_remote_code=False,
167
+ revision="main")
168
+
169
+ tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, use_fast=True)
170
+
171
+ prompt = "Tell me about AI"
172
+ prompt_template=f'''{prompt}
173
+
174
+ '''
175
+
176
+ print("\n\n*** Generate:")
177
+
178
+ input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
179
+ output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
180
+ print(tokenizer.decode(output[0]))
181
+
182
+ # Inference can also be done using transformers' pipeline
183
+
184
+ print("*** Pipeline:")
185
+ pipe = pipeline(
186
+ "text-generation",
187
+ model=model,
188
+ tokenizer=tokenizer,
189
+ max_new_tokens=512,
190
+ do_sample=True,
191
+ temperature=0.7,
192
+ top_p=0.95,
193
+ top_k=40,
194
+ repetition_penalty=1.1
195
+ )
196
+
197
+ print(pipe(prompt_template)[0]['generated_text'])
198
+ ```
199
+ <!-- README_GPTQ.md-use-from-python end -->
200
+
201
+ <!-- README_GPTQ.md-compatibility start -->
202
+ ## Compatibility
203
+
204
+ The files provided are tested to work with AutoGPTQ, both via Transformers and using AutoGPTQ directly. They should also work with [Occ4m's GPTQ-for-LLaMa fork](https://github.com/0cc4m/KoboldAI).
205
+
206
+ [ExLlama](https://github.com/turboderp/exllama) is compatible with Llama models in 4-bit. Please see the Provided Files table above for per-file compatibility.
207
+
208
+ [Huggingface Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) is compatible with all GPTQ models.
209
+ <!-- README_GPTQ.md-compatibility end -->
210
+
211
+ <!-- footer start -->
212
+ <!-- 200823 -->
213
+ ## Discord
214
+
215
+ For further support, and discussions on these models and AI in general, join us at:
216
+
217
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
218
+
219
+ ## Thanks, and how to contribute
220
+
221
+ Thanks to the [chirper.ai](https://chirper.ai) team!
222
+
223
+ Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
224
+
225
+ I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
226
+
227
+ If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
228
+
229
+ Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
230
+
231
+ * Patreon: https://patreon.com/TheBlokeAI
232
+ * Ko-Fi: https://ko-fi.com/TheBlokeAI
233
+
234
+ **Special thanks to**: Aemon Algiz.
235
+
236
+ **Patreon special mentions**: Russ Johnson, J, alfie_i, Alex, NimbleBox.ai, Chadd, Mandus, Nikolai Manek, Ken Nordquist, ya boyyy, Illia Dulskyi, Viktor Bowallius, vamX, Iucharbius, zynix, Magnesian, Clay Pascal, Pierre Kircher, Enrico Ros, Tony Hughes, Elle, Andrey, knownsqashed, Deep Realms, Jerry Meng, Lone Striker, Derek Yates, Pyrater, Mesiah Bishop, James Bentley, Femi Adebogun, Brandon Frisco, SuperWojo, Alps Aficionado, Michael Dempsey, Vitor Caleffi, Will Dee, Edmond Seymore, usrbinkat, LangChain4j, Kacper Wikieล‚, Luke Pendergrass, John Detwiler, theTransient, Nathan LeClaire, Tiffany J. Kim, biorpg, Eugene Pentland, Stanislav Ovsiannikov, Fred von Graf, terasurfer, Kalila, Dan Guido, Nitin Borwankar, ้˜ฟๆ˜Ž, Ai Maven, John Villwock, Gabriel Puliatti, Stephen Murray, Asp the Wyvern, danny, Chris Smitley, ReadyPlayerEmma, S_X, Daniel P. Andersen, Olakabola, Jeffrey Morgan, Imad Khwaja, Caitlyn Gatomon, webtim, Alicia Loh, Trenton Dambrowitz, Swaroop Kallakuri, Erik Bjรคreholt, Leonard Tan, Spiking Neurons AB, Luke @flexchar, Ajan Kanaga, Thomas Belote, Deo Leter, RoA, Willem Michiel, transmissions 11, subjectnull, Matthew Berman, Joseph William Delisle, David Ziegler, Michael Davis, Johann-Peter Hartmann, Talal Aujan, senxiiz, Artur Olbinski, Rainer Wilmers, Spencer Kim, Fen Risland, Cap'n Zoog, Rishabh Srivastava, Michael Levine, Geoffrey Montalvo, Sean Connelly, Alexandros Triantafyllidis, Pieter, Gabriel Tamborski, Sam, Subspace Studios, Junyu Yang, Pedro Madruga, Vadim, Cory Kujawski, K, Raven Klaugh, Randy H, Mano Prime, Sebastain Graf, Space Cruiser
237
+
238
+
239
+ Thank you to all my generous patrons and donaters!
240
+
241
+ And thank you again to a16z for their generous grant.
242
+
243
+ <!-- footer end -->
244
+
245
+ # Original model card: Technology Innovation Institute's Falcon 180B
246
+
247
+
248
+ # ๐Ÿš€ Falcon-180B
249
+
250
+ **Falcon-180B is a 180B parameters causal decoder-only model built by [TII](https://www.tii.ae) and trained on 3,500B tokens of [RefinedWeb](https://huggingface.co/datasets/tiiuae/falcon-refinedweb) enhanced with curated corpora. It is made available under the [Falcon-180B TII License](https://huggingface.co/spaces/tiiuae/falcon-180b-license/blob/main/LICENSE.txt) and [Acceptable Use Policy](https://huggingface.co/spaces/tiiuae/falcon-180b-license/blob/main/ACCEPTABLE_USE_POLICY.txt).**
251
+
252
+ *Paper coming soon* ๐Ÿ˜Š
253
+
254
+
255
+ ๐Ÿค— To get started with Falcon (inference, finetuning, quantization, etc.), we recommend reading [this great blogpost from HF](https://hf.co/blog/falcon-180b) or this [one](https://huggingface.co/blog/falcon) from the release of the 40B!
256
+ Note that since the 180B is larger than what can easily be handled with `transformers`+`acccelerate`, we recommend using [Text Generation Inference](https://github.com/huggingface/text-generation-inference).
257
+
258
+ You will need **at least 400GB of memory** to swiftly run inference with Falcon-180B.
259
+
260
+ ## Why use Falcon-180B?
261
+
262
+ * **It is the best open-access model currently available, and one of the best model overall.** Falcon-180B outperforms [LLaMA-2](https://huggingface.co/meta-llama/Llama-2-70b-hf), [StableLM](https://github.com/Stability-AI/StableLM), [RedPajama](https://huggingface.co/togethercomputer/RedPajama-INCITE-Base-7B-v0.1), [MPT](https://huggingface.co/mosaicml/mpt-7b), etc. See the [OpenLLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard).
263
+ * **It features an architecture optimized for inference**, with multiquery ([Shazeer et al., 2019](https://arxiv.org/abs/1911.02150)).
264
+ * **It is made available under a permissive license allowing for commercial use**.
265
+ * โš ๏ธ **This is a raw, pretrained model, which should be further finetuned for most usecases.** If you are looking for a version better suited to taking generic instructions in a chat format, we recommend taking a look at [Falcon-180B-Chat](https://huggingface.co/tiiuae/falcon-180b-chat).
266
+
267
+
268
+ ๐Ÿ’ธ **Looking for a smaller, less expensive model?** [Falcon-7B](https://huggingface.co/tiiuae/falcon-7b) and [Falcon-40B](https://huggingface.co/tiiuae/falcon-40b) are Falcon-180B's little brothers!
269
+
270
+ ๐Ÿ’ฅ **Falcon LLMs require PyTorch 2.0 for use with `transformers`!**
271
+
272
+
273
+ # Model Card for Falcon-180B
274
+
275
+ ## Model Details
276
+
277
+ ### Model Description
278
+
279
+ - **Developed by:** [https://www.tii.ae](https://www.tii.ae);
280
+ - **Model type:** Causal decoder-only;
281
+ - **Language(s) (NLP):** English, German, Spanish, French (and limited capabilities in Italian, Portuguese, Polish, Dutch, Romanian, Czech, Swedish);
282
+ - **License:** [Falcon-180B TII License](https://huggingface.co/tiiuae/falcon-180B/blob/main/LICENSE.txt) and [Acceptable Use Policy](https://huggingface.co/tiiuae/falcon-180B/blob/main/ACCEPTABLE_USE_POLICY.txt).
283
+
284
+ ### Model Source
285
+
286
+ - **Paper:** *coming soon*.
287
+
288
+ ## Uses
289
+
290
+ See the [acceptable use policy](https://huggingface.co/tiiuae/falcon-180B/blob/main/ACCEPTABLE_USE_POLICY.txt).
291
+
292
+ ### Direct Use
293
+
294
+ Research on large language models; as a foundation for further specialization and finetuning for specific usecases (e.g., summarization, text generation, chatbot, etc.)
295
+
296
+ ### Out-of-Scope Use
297
+
298
+ Production use without adequate assessment of risks and mitigation; any use cases which may be considered irresponsible or harmful.
299
+
300
+ ## Bias, Risks, and Limitations
301
+
302
+ Falcon-180B is trained mostly on English, German, Spanish, French, with limited capabilities also in in Italian, Portuguese, Polish, Dutch, Romanian, Czech, Swedish. It will not generalize appropriately to other languages. Furthermore, as it is trained on a large-scale corpora representative of the web, it will carry the stereotypes and biases commonly encountered online.
303
+
304
+ ### Recommendations
305
+
306
+ We recommend users of Falcon-180B to consider finetuning it for the specific set of tasks of interest, and for guardrails and appropriate precautions to be taken for any production use.
307
+
308
+ ## How to Get Started with the Model
309
+
310
+ To run inference with the model in full `bfloat16` precision you need approximately 8xA100 80GB or equivalent.
311
+
312
+
313
+
314
+ ```python
315
+ from transformers import AutoTokenizer, AutoModelForCausalLM
316
+ import transformers
317
+ import torch
318
+
319
+ model = "tiiuae/falcon-180b"
320
+
321
+ tokenizer = AutoTokenizer.from_pretrained(model)
322
+ pipeline = transformers.pipeline(
323
+ "text-generation",
324
+ model=model,
325
+ tokenizer=tokenizer,
326
+ torch_dtype=torch.bfloat16,
327
+ trust_remote_code=True,
328
+ device_map="auto",
329
+ )
330
+ sequences = pipeline(
331
+ "Girafatron is obsessed with giraffes, the most glorious animal on the face of this Earth. Giraftron believes all other animals are irrelevant when compared to the glorious majesty of the giraffe.\nDaniel: Hello, Girafatron!\nGirafatron:",
332
+ max_length=200,
333
+ do_sample=True,
334
+ top_k=10,
335
+ num_return_sequences=1,
336
+ eos_token_id=tokenizer.eos_token_id,
337
+ )
338
+ for seq in sequences:
339
+ print(f"Result: {seq['generated_text']}")
340
+
341
+ ```
342
+
343
+ ## Training Details
344
+
345
+ ### Training Data
346
+
347
+ Falcon-180B was trained on 3,500B tokens of [RefinedWeb](https://huggingface.co/datasets/tiiuae/falcon-refinedweb), a high-quality filtered and deduplicated web dataset which we enhanced with curated corpora. Significant components from our curated copora were inspired by The Pile ([Gao et al., 2020](https://arxiv.org/abs/2101.00027)).
348
+
349
+ | **Data source** | **Fraction** | **Tokens** | **Sources** |
350
+ |--------------------|--------------|------------|-----------------------------------|
351
+ | [RefinedWeb-English](https://huggingface.co/datasets/tiiuae/falcon-refinedweb) | 75% | 750B | massive web crawl |
352
+ | RefinedWeb-Europe | 7% | 70B | European massive web crawl |
353
+ | Books | 6% | 60B | |
354
+ | Conversations | 5% | 50B | Reddit, StackOverflow, HackerNews |
355
+ | Code | 5% | 50B | |
356
+ | Technical | 2% | 20B | arXiv, PubMed, USPTO, etc. |
357
+
358
+ RefinedWeb-Europe is made of the following languages:
359
+
360
+ | **Language** | **Fraction of multilingual data** | **Tokens** |
361
+ |--------------|-----------------------------------|------------|
362
+ | German | 26% | 18B |
363
+ | Spanish | 24% | 17B |
364
+ | French | 23% | 16B |
365
+ | _Italian_ | 7% | 5B |
366
+ | _Portuguese_ | 4% | 3B |
367
+ | _Polish_ | 4% | 3B |
368
+ | _Dutch_ | 4% | 3B |
369
+ | _Romanian_ | 3% | 2B |
370
+ | _Czech_ | 3% | 2B |
371
+ | _Swedish_ | 2% | 1B |
372
+
373
+
374
+ The data was tokenized with the Falcon tokenizer.
375
+
376
+ ### Training Procedure
377
+
378
+ Falcon-180B was trained on up to 4,096 A100 40GB GPUs, using a 3D parallelism strategy (TP=8, PP=8, DP=64) combined with ZeRO.
379
+
380
+ #### Training Hyperparameters
381
+
382
+ | **Hyperparameter** | **Value** | **Comment** |
383
+ |--------------------|------------|-------------------------------------------|
384
+ | Precision | `bfloat16` | |
385
+ | Optimizer | AdamW | |
386
+ | Learning rate | 1.25e-4 | 4B tokens warm-up, cosine decay to 1.25e-5 |
387
+ | Weight decay | 1e-1 | |
388
+ | Z-loss | 1e-4 | |
389
+ | Batch size | 2048 | 100B tokens ramp-up |
390
+
391
+
392
+ #### Speeds, Sizes, Times
393
+
394
+ Training started in early 2023.
395
+
396
+ ## Evaluation
397
+
398
+ *Paper coming soon.*
399
+
400
+ See the [OpenLLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard) for early results.
401
+
402
+
403
+ ## Technical Specifications
404
+
405
+ ### Model Architecture and Objective
406
+
407
+ Falcon-180B is a causal decoder-only model trained on a causal language modeling task (i.e., predict the next token).
408
+
409
+ The architecture is broadly adapted from the GPT-3 paper ([Brown et al., 2020](https://arxiv.org/abs/2005.14165)), with the following differences:
410
+
411
+ * **Positionnal embeddings:** rotary ([Su et al., 2021](https://arxiv.org/abs/2104.09864));
412
+ * **Attention:** multiquery ([Shazeer et al., 2019](https://arxiv.org/abs/1911.02150)) and FlashAttention ([Dao et al., 2022](https://arxiv.org/abs/2205.14135));
413
+ * **Decoder-block:** parallel attention/MLP with two layer norms.
414
+
415
+ For multiquery, we are using an internal variant which uses independent key and values per tensor parallel degree (so-called multigroup).
416
+
417
+ | **Hyperparameter** | **Value** | **Comment** |
418
+ |--------------------|-----------|----------------------------------------|
419
+ | Layers | 80 | |
420
+ | `d_model` | 14848 | |
421
+ | `head_dim` | 64 | Reduced to optimise for FlashAttention |
422
+ | Vocabulary | 65024 | |
423
+ | Sequence length | 2048 | |
424
+
425
+ ### Compute Infrastructure
426
+
427
+ #### Hardware
428
+
429
+ Falcon-180B was trained on AWS SageMaker, on up to 4,096 A100 40GB GPUs in P4d instances.
430
+
431
+ #### Software
432
+
433
+ Falcon-180B was trained a custom distributed training codebase, Gigatron. It uses a 3D parallelism approach combined with ZeRO and high-performance Triton kernels (FlashAttention, etc.)
434
+
435
+
436
+ ## Citation
437
+
438
+ *Paper coming soon* ๐Ÿ˜Š (actually this time). In the meanwhile, you can use the following information to cite:
439
+ ```
440
+ @article{falcon,
441
+ title={The Falcon Series of Language Models: Towards Open Frontier Models},
442
+ author={Almazrouei, Ebtesam and Alobeidli, Hamza and Alshamsi, Abdulaziz and Cappelli, Alessandro and Cojocaru, Ruxandra and Alhammadi, Maitha and Daniele, Mazzotta and Heslow, Daniel and Launay, Julien and Malartic, Quentin and Noune, Badreddine and Pannier, Baptiste and Penedo, Guilherme},
443
+ year={2023}
444
+ }
445
+ ```
446
+
447
+
448
+
449
+
450
+ To learn more about the pretraining dataset, see the ๐Ÿ““ [RefinedWeb paper](https://arxiv.org/abs/2306.01116).
451
+
452
+ ```
453
+ @article{refinedweb,
454
+ title={The {R}efined{W}eb dataset for {F}alcon {LLM}: outperforming curated corpora with web data, and web data only},
455
+ author={Guilherme Penedo and Quentin Malartic and Daniel Hesslow and Ruxandra Cojocaru and Alessandro Cappelli and Hamza Alobeidli and Baptiste Pannier and Ebtesam Almazrouei and Julien Launay},
456
+ journal={arXiv preprint arXiv:2306.01116},
457
+ eprint={2306.01116},
458
+ eprinttype = {arXiv},
459
+ url={https://arxiv.org/abs/2306.01116},
460
+ year={2023}
461
+ }
462
+ ```
463
+
464
+
465
+ ## Contact
466
+ falconllm@tii.ae