JoseCarlosGarcia95 commited on
Commit
d53137c
·
1 Parent(s): 7b66e40

add config files

Browse files

Signed-off-by: José Carlos García <hola@josecarlos.me>

.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* 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
 
 
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
36
+ Falcon3-1B-Instruct-1.58bit-q2b0.gguf filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -1,5 +1,144 @@
1
- ---
2
- license: other
3
- license_name: falcon-llm-license
4
- license_link: https://falconllm.tii.ae/falcon-terms-and-conditions.html
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - bitnet
5
+ - falcon3
6
+ base_model: tiiuae/Falcon3-1B-Instruct
7
+ license: other
8
+ license_name: falcon-llm-license
9
+ license_link: https://falconllm.tii.ae/falcon-terms-and-conditions.html
10
+ ---
11
+
12
+
13
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/62441d1d9fdefb55a0b7d12c/c-tosr0FvMlKuKQTojx_6.png)
14
+
15
+
16
+ # Table of Contents
17
+
18
+ 0. [TL;DR](#TL;DR)
19
+ 1. [Model Details](#model-details)
20
+ 2. [Training Details](#training-details)
21
+ 3. [Usage](#usage)
22
+ 4. [Evaluation](#evaluation)
23
+ 5. [Citation](#citation)
24
+
25
+
26
+ # TL;DR
27
+
28
+ # Model Details
29
+
30
+ ## Model Description
31
+
32
+ - **Developed by:** [https://www.tii.ae](https://www.tii.ae)
33
+ - **Model type:** Causal decoder-only - instruct / chat version
34
+ - **Architecture:** Pure-transformer - 1.58bit version
35
+ - **Language(s) (NLP):** Mainly English
36
+ - **License:** TII Falcon License 2.0
37
+
38
+ # Training details
39
+
40
+ The model has been trained following the training strategies from the recent [1-bit LLM HF blogpost](https://huggingface.co/blog/1_58_llm_extreme_quantization) and [1-bit LLM paper](https://huggingface.co/papers/2402.17764).
41
+ For more details about the training protocol of this model, please refer to the Falcon-3 technical report, section *Compression*.
42
+
43
+
44
+ # Usage
45
+
46
+ Currently to use this model you can either rely on Hugging Face transformers library or [BitNet](https://github.com/microsoft/BitNet) library. You can also play with the model using the [falcon-1.58bit playground](https://huggingface.co/spaces/tiiuae/falcon3-1.58bit-playground) (only for the 7B instruct version).
47
+
48
+ ## 🤗 transformers
49
+
50
+ ```python
51
+ import torch
52
+ from transformers import AutoModelForCausalLM, AutoTokenizer
53
+
54
+ model_id = "tiiuae/Falcon3-1B-Instruct-1.58bit"
55
+
56
+ model = AutoModelForCausalLM.from_pretrained(
57
+ model_id,
58
+ torch_dtype=torch.bfloat16,
59
+ ).to("cuda")
60
+
61
+ # Perform text generation
62
+ ```
63
+
64
+ ## BitNet
65
+
66
+ ```
67
+ git clone https://github.com/microsoft/BitNet && cd BitNet
68
+ pip install -r requirements.txt
69
+ python setup_env.py --hf-repo tiiuae/Falcon3-1B-Instruct-1.58bit -q i2_s
70
+ python run_inference.py -m models/Falcon3-1B-1.58bit/ggml-model-i2_s.gguf -p "You are a helpful assistant" -cnv
71
+ ```
72
+
73
+ # Evaluation
74
+ We report in the following table our internal pipeline benchmarks:
75
+
76
+ **Note evaluation results are normalized score from v2 leaderboard tasks - reported results of original models in the blogpost are raw scores**
77
+
78
+ <table border="1" style="width: 100%; text-align: center; border-collapse: collapse;">
79
+ <colgroup>
80
+ <col style="width: 10%;">
81
+ <col style="width: 10%;">
82
+ <col style="background-color: rgba(80, 15, 213, 0.5); width: 7%;">
83
+ </colgroup>
84
+ <thead>
85
+ <tr>
86
+ <th>Benchmark</th>
87
+ <th>Llama3-8B-1.58-100B-tokens</th>
88
+ <th>Falcon3-1B-Instruct-1.58bit</th>
89
+ </tr>
90
+ </thead>
91
+ <tbody>
92
+ <tr>
93
+ <td>IFEval</td>
94
+ <td>17.91</td>
95
+ <td>44.5</td>
96
+ </tr>
97
+ <tr>
98
+ <td>MUSR</td>
99
+ <td>4.87</td>
100
+ <td>2.78</td>
101
+ </tr>
102
+ <tr>
103
+ <td>GPQA</td>
104
+ <td>1.83</td>
105
+ <td>0</td>
106
+ </tr>
107
+ <tr>
108
+ <td>BBH</td>
109
+ <td>5.36</td>
110
+ <td>2.24</td>
111
+ </tr>
112
+ <tr>
113
+ <td>MMLU-PRO</td>
114
+ <td>2.78</td>
115
+ <td>1.93</td>
116
+ </tr>
117
+ <tr>
118
+ <td>MATH</td>
119
+ <td>0.26</td>
120
+ <td>0.17</td>
121
+ </tr>
122
+ <tr>
123
+ <td>Average</td>
124
+ <td>5.5</td>
125
+ <td>8.6</td>
126
+ </tr>
127
+ </tbody>
128
+ </table>
129
+
130
+ ## Useful links
131
+ - View our [release blogpost](https://huggingface.co/blog/falcon3).
132
+ - Feel free to join [our discord server](https://discord.gg/fwXpMyGc) if you have any questions or to interact with our researchers and developers.
133
+
134
+ ## Citation
135
+ If the Falcon3 family of models were helpful to your work, feel free to give us a cite.
136
+
137
+ ```
138
+ @misc{Falcon3,
139
+ title = {The Falcon 3 Family of Open Models},
140
+ author = {Falcon-LLM Team},
141
+ month = {December},
142
+ year = {2024}
143
+ }
144
+ ```
config.json ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/home/ec2-user/checkpoints/falcon3-1b-1bit/hf-1bit",
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": 2048,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 8192,
14
+ "is_bitnet_config": true,
15
+ "max_position_embeddings": 8192,
16
+ "mlp_bias": false,
17
+ "model_type": "llama",
18
+ "num_attention_heads": 8,
19
+ "num_hidden_layers": 18,
20
+ "num_key_value_heads": 4,
21
+ "pretraining_tp": 1,
22
+ "quantization_config": {
23
+ "modules_to_not_convert": [
24
+ "lm_head"
25
+ ],
26
+ "quant_method": "bitnet"
27
+ },
28
+ "rms_norm_eps": 1e-06,
29
+ "rope_scaling": null,
30
+ "rope_theta": 1000042,
31
+ "tie_word_embeddings": false,
32
+ "torch_dtype": "bfloat16",
33
+ "transformers_version": "4.48.0.dev0",
34
+ "use_cache": true,
35
+ "vocab_size": 131072
36
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 11,
4
+ "eos_token_id": 11,
5
+ "transformers_version": "4.48.0.dev0"
6
+ }
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