Safetensors
llama
falcon3
8-bit precision
gptq
slimfrikha-tii commited on
Commit
0c45e91
0 Parent(s):

falcon3 release

Browse files
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - fr
5
+ - es
6
+ - pt
7
+ tags:
8
+ - falcon3
9
+ base_model: tiiuae/Falcon3-7B-Instruct
10
+ license: other
11
+ license_name: falcon-llm-license
12
+ license_link: https://falconllm.tii.ae/falcon-terms-and-conditions.html
13
+ ---
14
+
15
+
16
+ # Falcon3-7B-Instruct-GPTQ-Int8
17
+
18
+ **Falcon3** family of Open Foundation Models is a set of pretrained and instruct LLMs ranging from 1B to 10B parameters.
19
+
20
+ **Falcon3-7B-Instruct** achieves state-of-the-art results (at release's time) on reasoning, language understanding, instruction following, code and mathematics tasks.
21
+ Falcon3-7B-Instruct supports 4 languages (English, French, Spanish, Portuguese) and a context length of up to 32K.
22
+
23
+ This repository contains the GPTQ-quantized 8-bit instruction-tuned 7B Falcon3 model.
24
+
25
+ ## Model Details
26
+
27
+ - Architecture
28
+ - Transformer-based causal decoder-only architecture
29
+ - 28 decoder blocks
30
+ - Grouped Query Attention (GQA) for faster inference: 12 query heads and 4 key-value heads
31
+ - Wider head dimension: 256
32
+ - High RoPE value to support long context understanding: 1000042
33
+ - Uses SwiGLU and RMSNorm
34
+ - 32K context length
35
+ - 131K vocab size
36
+ - Pretrained on 14 Teratokens of datasets comprising of web, code, STEM, high quality and mutlilingual data using 1024 H100 GPU chips
37
+ - Posttrained on 1.2 million samples of STEM, conversational, code, safety and function call data
38
+ - Supports EN, FR, ES, PT
39
+ - Developed by [Technology Innovation Institute](https://www.tii.ae)
40
+ - License: TII Falcon-LLM License 2.0
41
+ - Model Release Date: December 2024
42
+ - Quantization: GPTQ 8-bit
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
+ model_name = "tiiuae/Falcon3-7B-Instruct-GPTQ-Int8"
54
+
55
+ model = AutoModelForCausalLM.from_pretrained(
56
+ model_name,
57
+ torch_dtype="auto",
58
+ device_map="auto"
59
+ )
60
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
61
+
62
+ prompt = "How many hours in one day?"
63
+
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
+ <table border="1" style="width: 100%; text-align: center; border-collapse: collapse;">
94
+ <colgroup>
95
+ <col style="width: 10%;">
96
+ <col style="width: 10%;">
97
+ <col style="width: 10%;">
98
+ <col style="width: 10%;">
99
+ <col style="background-color: rgba(80, 15, 213, 0.5); width: 7%;">
100
+ </colgroup>
101
+ <thead>
102
+ <tr>
103
+ <th>Benchmark</th>
104
+ <th>Falcon3-7B-Instruct</th>
105
+ <th>Falcon3-7B-Instruct-GPTQ-Int4</th>
106
+ <th>Falcon3-7B-Instruct-AWQ</th>
107
+ <th>Falcon3-7B-Instruct-GPTQ-Int8</th>
108
+ </tr>
109
+ </thead>
110
+ <tbody>
111
+ <tr>
112
+ <td>MMLU</td>
113
+ <td>67.68</td>
114
+ <td>65.55</td>
115
+ <td>66.33</td>
116
+ <td>67.55</td>
117
+ </tr>
118
+ <tr>
119
+ <td>MMLU-PRO</td>
120
+ <td>40.86</td>
121
+ <td>39.07</td>
122
+ <td>39.82</td>
123
+ <td>40.85</td>
124
+ </tr>
125
+ <tr>
126
+ <td>IFEval</td>
127
+ <td>75.06</td>
128
+ <td>72.14</td>
129
+ <td>74.76</td>
130
+ <td>76.92</td>
131
+ </tr>
132
+ </tbody>
133
+ </table>
134
+
135
+ ## Useful links
136
+ - View our [release blogpost](https://huggingface.co/blog/falcon3).
137
+ - Feel free to join [our discord server](https://discord.gg/fwXpMyGc) if you have any questions or to interact with our researchers and developers.
138
+
139
+ ## Technical Report
140
+ Coming soon....
141
+
142
+ ## Citation
143
+ If the Falcon3 family of models were helpful to your work, feel free to give us a cite.
144
+
145
+ ```
146
+ @misc{Falcon3,
147
+ title = {The Falcon 3 Family of Open Models},
148
+ url = {https://huggingface.co/blog/falcon3},
149
+ author = {Falcon-LLM Team},
150
+ month = {December},
151
+ year = {2024}
152
+ }
153
+ ```
config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_attn_implementation_autoset": true,
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "eos_token_id": 11,
9
+ "head_dim": 256,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 3072,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 23040,
14
+ "max_position_embeddings": 32768,
15
+ "mlp_bias": false,
16
+ "model_type": "llama",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 28,
19
+ "num_key_value_heads": 4,
20
+ "pretraining_tp": 1,
21
+ "quantization_config": {
22
+ "bits": 8,
23
+ "checkpoint_format": "gptq",
24
+ "damp_percent": 0.01,
25
+ "desc_act": false,
26
+ "group_size": 128,
27
+ "model_file_base_name": "model",
28
+ "model_name_or_path": null,
29
+ "quant_method": "gptq",
30
+ "static_groups": false,
31
+ "sym": true,
32
+ "true_sequential": true
33
+ },
34
+ "rms_norm_eps": 1e-06,
35
+ "rope_scaling": null,
36
+ "rope_theta": 1000042,
37
+ "tie_word_embeddings": false,
38
+ "torch_dtype": "float16",
39
+ "transformers_version": "4.47.0",
40
+ "use_cache": true,
41
+ "vocab_size": 131072
42
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d70853f1b80a9d750175efd571a07c1bd4a81742c2f910f526054333934acf1b
3
+ size 8421632904
quantize_config.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bits": 8,
3
+ "group_size": 128,
4
+ "damp_percent": 0.01,
5
+ "desc_act": false,
6
+ "static_groups": false,
7
+ "sym": true,
8
+ "true_sequential": true,
9
+ "model_name_or_path": null,
10
+ "model_file_base_name": "model",
11
+ "quant_method": "gptq",
12
+ "checkpoint_format": "gptq"
13
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ ">>TITLE<<",
4
+ ">>ABSTRACT<<",
5
+ ">>INTRODUCTION<<",
6
+ ">>SUMMARY<<",
7
+ ">>COMMENT<<",
8
+ ">>ANSWER<<",
9
+ ">>QUESTION<<",
10
+ ">>DOMAIN<<",
11
+ ">>EMAIL_ADDRESS<<",
12
+ ">>IP_ADDRESS<<",
13
+ "<|startoftext|>",
14
+ ">>IP_ADDRESS_0<<",
15
+ ">>IP_ADDRESS_1<<",
16
+ ">>IP_ADDRESS_2<<",
17
+ ">>IP_ADDRESS_3<<",
18
+ ">>IP_ADDRESS_4<<",
19
+ ">>IP_ADDRESS_5<<",
20
+ ">>IP_ADDRESS_6<<",
21
+ ">>IP_ADDRESS_7<<",
22
+ ">>IP_ADDRESS_8<<",
23
+ ">>IP_ADDRESS_9<<",
24
+ ">>PASSWORD<<",
25
+ ">>KEY<<"
26
+ ],
27
+ "eos_token": {
28
+ "content": "<|endoftext|>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false
33
+ },
34
+ "pad_token": {
35
+ "content": "<|pad|>",
36
+ "lstrip": false,
37
+ "normalized": false,
38
+ "rstrip": false,
39
+ "single_word": false
40
+ }
41
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff