megabytes commited on
Commit
3feff3b
·
verified ·
1 Parent(s): a564257

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +173 -199
README.md CHANGED
@@ -1,199 +1,173 @@
1
- ---
2
- library_name: transformers
3
- tags: []
4
- ---
5
-
6
- # Model Card for Model ID
7
-
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
-
11
-
12
- ## Model Details
13
-
14
- ### Model Description
15
-
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
-
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
- ### Out-of-Scope Use
53
-
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
-
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- 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. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- 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).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - falcon-h1
5
+ - heretic
6
+ - uncensored
7
+ - decensored
8
+ - abliterated
9
+ license: other
10
+ license_name: falcon-llm-license
11
+ license_link: https://falconllm.tii.ae/falcon-terms-and-conditions.html
12
+ base_model: tiiuae/Falcon-H1-0.5B-Base
13
+ inference: true
14
+ ---
15
+ # This is a decensored version of [tiiuae/Falcon-H1-0.5B-Instruct](https://huggingface.co/tiiuae/Falcon-H1-0.5B-Instruct), made using [Heretic](https://github.com/p-e-w/heretic) v1.1.0
16
+
17
+ ## Abliteration parameters
18
+
19
+ | Parameter | Value |
20
+ | :-------- | :---: |
21
+ | **direction_index** | per layer |
22
+ | **attn.o_proj.max_weight** | 1.49 |
23
+ | **attn.o_proj.max_weight_position** | 23.82 |
24
+ | **attn.o_proj.min_weight** | 1.27 |
25
+ | **attn.o_proj.min_weight_distance** | 20.96 |
26
+ | **mlp.down_proj.max_weight** | 1.47 |
27
+ | **mlp.down_proj.max_weight_position** | 21.57 |
28
+ | **mlp.down_proj.min_weight** | 1.46 |
29
+ | **mlp.down_proj.min_weight_distance** | 12.86 |
30
+
31
+ ## Performance
32
+
33
+ | Metric | This model | Original model ([tiiuae/Falcon-H1-0.5B-Instruct](https://huggingface.co/tiiuae/Falcon-H1-0.5B-Instruct)) |
34
+ | :----- | :--------: | :---------------------------: |
35
+ | **KL divergence** | 0.0954 | 0 *(by definition)* |
36
+ | **Refusals** | 30/100 | 91/100 |
37
+
38
+ -----
39
+
40
+
41
+ <img src="https://huggingface.co/datasets/tiiuae/documentation-images/resolve/main/falcon_mamba/falcon-h1-logo.png" alt="drawing" width="800"/>
42
+
43
+ # Table of Contents
44
+
45
+ 0. [TL;DR](#TL;DR)
46
+ 1. [Model Details](#model-details)
47
+ 2. [Training Details](#training-details)
48
+ 3. [Usage](#usage)
49
+ 4. [Evaluation](#evaluation)
50
+ 5. [Citation](#citation)
51
+
52
+ # TL;DR
53
+
54
+ # Model Details
55
+
56
+ ## Model Description
57
+
58
+ - **Developed by:** [https://www.tii.ae](https://www.tii.ae)
59
+ - **Model type:** Causal decoder-only
60
+ - **Architecture:** Hybrid Transformers + Mamba architecture
61
+ - **Language(s) (NLP):** English
62
+ - **License:** Falcon-LLM License
63
+
64
+ # Training details
65
+
66
+ For more details about the training protocol of this model, please refer to the [Falcon-H1 technical blogpost](https://falcon-lm.github.io/blog/falcon-h1/) and [Technical Report](https://arxiv.org/abs/2507.22448).
67
+
68
+ # Usage
69
+
70
+ Currently to use this model you can either rely on Hugging Face `transformers`, `vLLM` or `llama.cpp` library.
71
+
72
+ ## Inference
73
+
74
+ Make sure to install the latest version of `transformers` or `vllm`, eventually install these packages from source:
75
+
76
+ ```bash
77
+ pip install git+https://github.com/huggingface/transformers.git
78
+ ```
79
+
80
+ For vLLM, make sure to install `vllm>=0.9.0`:
81
+
82
+ ```bash
83
+ pip install "vllm>=0.9.0"
84
+ ```
85
+
86
+ ### 🤗 transformers
87
+
88
+ Refer to the snippet below to run H1 models using 🤗 transformers:
89
+
90
+ ```python
91
+ import torch
92
+ from transformers import AutoModelForCausalLM, AutoTokenizer
93
+
94
+ model_id = "tiiuae/Falcon-H1-1B-Base"
95
+
96
+ model = AutoModelForCausalLM.from_pretrained(
97
+ model_id,
98
+ torch_dtype=torch.bfloat16,
99
+ device_map="auto"
100
+ )
101
+
102
+ # Perform text generation
103
+ ```
104
+
105
+ ### vLLM
106
+
107
+ For vLLM, simply start a server by executing the command below:
108
+
109
+ ```
110
+ # pip install vllm>=0.9.0
111
+ vllm serve tiiuae/Falcon-H1-1B-Instruct --tensor-parallel-size 2 --data-parallel-size 1
112
+ ```
113
+
114
+ ### `llama.cpp`
115
+
116
+ You can find all GGUF files compatible with `llama.cpp` under [our official collection](https://huggingface.co/collections/tiiuae/falcon-h1-6819f2795bc406da60fab8df)
117
+
118
+ # Evaluation
119
+
120
+ Falcon-H1 series perform very well on a variety of tasks, including reasoning tasks.
121
+
122
+ | Tasks | Falcon-H1-0.5B | Qwen3-0.6B | Qwen2.5-0.5B | Gemma3-1B | Llama3.2-1B | Falcon3-1B |
123
+ | --- | --- | --- | --- | --- | --- | --- |
124
+ | **General** | | | | | |
125
+ | BBH | **42.91** | 32.95 | 33.26 | 35.86 | 33.21 | 34.47 |
126
+ | ARC-C | 37.8 | 31.06 | 33.28 | 34.13 | 34.64 | **43.09** |
127
+ | TruthfulQA | 44.12 | **51.65** | 46.19 | 42.17 | 42.08 | 42.31 |
128
+ | HellaSwag | 51.93 | 42.17 | 52.38 | 42.24 | 55.3 | **58.53** |
129
+ | MMLU | **53.4** | 42.98 | 46.07 | 40.87 | 45.93 | 46.1 |
130
+ | **Math** | | | | | |
131
+ | GSM8k | **68.39** | 42.61 | 38.51 | 42.38 | 44.28 | 44.05 |
132
+ | MATH-500 | **58.4** | 46.0 | 27.8 | 45.4 | 13.2 | 19.8 |
133
+ | AMC-23 | **33.13** | 27.97 | 12.5 | 19.22 | 7.19 | 6.87 |
134
+ | AIME-24 | **3.75** | 2.71 | 0.62 | 0.42 | 1.46 | 0.41 |
135
+ | AIME-25 | **4.38** | 1.67 | 0.21 | 1.25 | 0.0 | 0.21 |
136
+ | **Science** | | | | | |
137
+ | GPQA | **29.95** | 26.09 | 26.85 | 28.19 | 26.59 | 26.76 |
138
+ | GPQA_Diamond | 27.95 | 25.08 | 24.24 | 21.55 | 25.08 | **31.31** |
139
+ | MMLU-Pro | **31.03** | 16.95 | 18.73 | 14.46 | 16.2 | 18.49 |
140
+ | MMLU-stem | **54.55** | 39.3 | 39.83 | 35.39 | 39.16 | 39.64 |
141
+ | **Code** | | | | | |
142
+ | HumanEval | **51.83** | 41.46 | 36.59 | 40.85 | 34.15 | 22.56 |
143
+ | HumanEval+ | **45.12** | 37.19 | 32.32 | 37.2 | 29.88 | 20.73 |
144
+ | MBPP | 42.59 | 56.08 | 46.83 | **57.67** | 33.6 | 20.63 |
145
+ | MBPP+ | 33.07 | 47.08 | 39.68 | **50.0** | 29.37 | 17.2 |
146
+ | LiveCodeBench | 7.05 | **9.78** | 2.94 | 5.09 | 2.35 | 0.78 |
147
+ | CRUXEval | **25.75** | 23.63 | 14.88 | 12.7 | 0.06 | 15.58 |
148
+ | **Instruction Following** | | | | | |
149
+ | IFEval | **72.07** | 62.16 | 32.11 | 61.48 | 55.34 | 54.26 |
150
+ | Alpaca-Eval | 10.79 | 9.59 | 3.26 | **17.87** | 9.38 | 6.98 |
151
+ | MTBench | **7.06** | 5.75 | 4.71 | 7.03 | 6.37 | 6.03 |
152
+ | LiveBench | 20.8 | **27.78** | 14.27 | 18.79 | 14.97 | 14.1 |
153
+
154
+ You can check more in detail on our [our release blogpost](https://falcon-lm.github.io/blog/falcon-h1/), detailed benchmarks.
155
+
156
+ # Useful links
157
+
158
+ - View [our release blogpost](https://falcon-lm.github.io/blog/falcon-h1/).
159
+ - View [our technical report](https://arxiv.org/abs/2507.22448).
160
+ - Feel free to join [our discord server](https://discord.gg/trwMYP9PYm) if you have any questions or to interact with our researchers and developers.
161
+
162
+ # Citation
163
+
164
+ If the Falcon-H1 family of models were helpful to your work, feel free to give us a cite.
165
+
166
+ ```
167
+ @article{falconh1,
168
+ title={Falcon-H1: A Family of Hybrid-Head Language Models Redefining Efficiency and Performance},
169
+ author={Jingwei Zuo and Maksim Velikanov and Ilyas Chahed and Younes Belkada and Dhia Eddine Rhayem and Guillaume Kunsch and Hakim Hacid and Hamza Yous and Brahim Farhat and Ibrahim Khadraoui and Mugariya Farooq and Giulia Campesan and Ruxandra Cojocaru and Yasser Djilali and Shi Hu and Iheb Chaabane and Puneesh Khanna and Mohamed El Amine Seddik and Ngoc Dung Huynh and Phuc Le Khac and Leen AlQadi and Billel Mokeddem and Mohamed Chami and Abdalgader Abubaker and Mikhail Lubinets and Kacper Piskorski and Slim Frikha},
170
+ journal = {arXiv preprint arXiv:2507.22448},
171
+ year={2025}
172
+ }
173
+ ```