danielhanchen commited on
Commit
b064e2f
·
verified ·
1 Parent(s): d0ee1a4

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +167 -0
README.md ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - falcon-h1
5
+ - unsloth
6
+ license: other
7
+ license_name: falcon-llm-license
8
+ license_link: https://falconllm.tii.ae/falcon-terms-and-conditions.html
9
+ base_model:
10
+ - tiiuae/Falcon-H1-3B-Instruct
11
+ inference: true
12
+ ---
13
+ > [!NOTE]
14
+ > Includes our **chat template fixes**! <br> For `llama.cpp`, use `--jinja`
15
+ >
16
+
17
+ <div>
18
+ <p style="margin-top: 0;margin-bottom: 0;">
19
+ <em><a href="https://docs.unsloth.ai/basics/unsloth-dynamic-v2.0-gguf">Unsloth Dynamic 2.0</a> achieves superior accuracy & outperforms other leading quants.</em>
20
+ </p>
21
+ <div style="display: flex; gap: 5px; align-items: center; ">
22
+ <a href="https://github.com/unslothai/unsloth/">
23
+ <img src="https://github.com/unslothai/unsloth/raw/main/images/unsloth%20new%20logo.png" width="133">
24
+ </a>
25
+ <a href="https://discord.gg/unsloth">
26
+ <img src="https://github.com/unslothai/unsloth/raw/main/images/Discord%20button.png" width="173">
27
+ </a>
28
+ <a href="https://docs.unsloth.ai/">
29
+ <img src="https://raw.githubusercontent.com/unslothai/unsloth/refs/heads/main/images/documentation%20green%20button.png" width="143">
30
+ </a>
31
+ </div>
32
+ </div>
33
+
34
+
35
+ <img src="https://huggingface.co/datasets/tiiuae/documentation-images/resolve/main/falcon_mamba/falcon-h1-logo.png" alt="drawing" width="800"/>
36
+
37
+ # Table of Contents
38
+
39
+ 0. [TL;DR](#TL;DR)
40
+ 1. [Model Details](#model-details)
41
+ 2. [Training Details](#training-details)
42
+ 3. [Usage](#usage)
43
+ 4. [Evaluation](#evaluation)
44
+ 5. [Citation](#citation)
45
+
46
+ # TL;DR
47
+
48
+ # Model Details
49
+
50
+ ## Model Description
51
+
52
+ - **Developed by:** [https://www.tii.ae](https://www.tii.ae)
53
+ - **Model type:** Causal decoder-only
54
+ - **Architecture:** Hybrid Transformers + Mamba architecture
55
+ - **Language(s) (NLP):** English, Multilingual
56
+ - **License:** Falcon-LLM License
57
+
58
+ # Training details
59
+
60
+ 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/).
61
+
62
+ # Usage
63
+
64
+ Currently to use this model you can either rely on Hugging Face `transformers`, `vLLM` or `llama.cpp` library.
65
+
66
+ ## Inference
67
+
68
+ Make sure to install the latest version of `transformers` or `vllm`, eventually install these packages from source:
69
+
70
+ ```bash
71
+ pip install git+https://github.com/huggingface/transformers.git
72
+ ```
73
+
74
+ For vLLM, make sure to install `vllm>=0.9.0`:
75
+
76
+ ```bash
77
+ pip install "vllm>=0.9.0"
78
+ ```
79
+
80
+ ### 🤗 transformers
81
+
82
+ Refer to the snippet below to run H1 models using 🤗 transformers:
83
+
84
+ ```python
85
+ import torch
86
+ from transformers import AutoModelForCausalLM, AutoTokenizer
87
+
88
+ model_id = "tiiuae/Falcon-H1-1B-Base"
89
+
90
+ model = AutoModelForCausalLM.from_pretrained(
91
+ model_id,
92
+ torch_dtype=torch.bfloat16,
93
+ device_map="auto"
94
+ )
95
+
96
+ # Perform text generation
97
+ ```
98
+
99
+ ### vLLM
100
+
101
+ For vLLM, simply start a server by executing the command below:
102
+
103
+ ```
104
+ # pip install vllm
105
+ vllm serve tiiuae/Falcon-H1-1B-Instruct --tensor-parallel-size 2 --data-parallel-size 1
106
+ ```
107
+
108
+ ### `llama.cpp`
109
+
110
+ You can find all GGUF files under [our official collection](https://huggingface.co/collections/tiiuae/falcon-h1-6819f2795bc406da60fab8df)
111
+
112
+ # Evaluation
113
+
114
+ Falcon-H1 series perform very well on a variety of tasks, including reasoning tasks.
115
+
116
+ | Tasks | Falcon-H1-3B | Qwen3-4B | Qwen2.5-3B | Gemma3-4B | Llama3.2-3B | Falcon3-3B |
117
+ | --- | --- | --- | --- | --- | --- | --- |
118
+ | **General** | | | | | |
119
+ | BBH | **53.69** | 51.07 | 46.55 | 50.01 | 41.47 | 45.02 |
120
+ | ARC-C | **49.57** | 37.71 | 43.77 | 44.88 | 44.88 | 48.21 |
121
+ | TruthfulQA | 53.19 | 51.75 | **58.11** | 51.68 | 50.27 | 50.06 |
122
+ | HellaSwag | **69.85** | 55.31 | 64.21 | 47.68 | 63.74 | 64.24 |
123
+ | MMLU | **68.3** | 67.01 | 65.09 | 59.53 | 61.74 | 56.76 |
124
+ | **Math** | | | | | |
125
+ | GSM8k | **84.76** | 80.44 | 57.54 | 77.41 | 77.26 | 74.68 |
126
+ | MATH-500 | 74.2 | **85.0** | 64.2 | 76.4 | 41.2 | 54.2 |
127
+ | AMC-23 | 55.63 | **66.88** | 39.84 | 48.12 | 22.66 | 29.69 |
128
+ | AIME-24 | 11.88 | **22.29** | 6.25 | 6.67 | 11.67 | 3.96 |
129
+ | AIME-25 | 13.33 | **18.96** | 3.96 | 13.33 | 0.21 | 2.29 |
130
+ | **Science** | | | | | |
131
+ | GPQA | **33.89** | 28.02 | 28.69 | 29.19 | 28.94 | 28.69 |
132
+ | GPQA_Diamond | 38.72 | **40.74** | 35.69 | 28.62 | 29.97 | 29.29 |
133
+ | MMLU-Pro | **43.69** | 29.75 | 32.76 | 29.71 | 27.44 | 29.71 |
134
+ | MMLU-stem | **69.93** | 67.46 | 59.78 | 52.17 | 51.92 | 56.11 |
135
+ | **Code** | | | | | |
136
+ | HumanEval | 76.83 | **84.15** | 73.78 | 67.07 | 54.27 | 52.44 |
137
+ | HumanEval+ | 70.73 | **76.83** | 68.29 | 61.59 | 50.0 | 45.73 |
138
+ | MBPP | **79.63** | 68.78 | 72.75 | 77.78 | 62.17 | 61.9 |
139
+ | MBPP+ | **67.46** | 59.79 | 60.85 | 66.93 | 50.53 | 55.29 |
140
+ | LiveCodeBench | 26.81 | **39.92** | 11.74 | 21.14 | 2.74 | 3.13 |
141
+ | CRUXEval | 56.25 | **69.63** | 43.26 | 52.13 | 17.75 | 44.38 |
142
+ | **Instruction Following** | | | | | |
143
+ | IFEval | **85.05** | 84.01 | 64.26 | 77.01 | 74.0 | 69.1 |
144
+ | Alpaca-Eval | 31.09 | 36.51 | 17.37 | **39.64** | 19.69 | 14.82 |
145
+ | MTBench | **8.72** | 8.45 | 7.79 | 8.24 | 7.96 | 7.79 |
146
+ | LiveBench | 36.86 | **51.34** | 27.32 | 36.7 | 26.37 | 26.01 |
147
+
148
+ You can check more in detail on our [our release blogpost](https://falcon-lm.github.io/blog/falcon-h1/), detailed benchmarks.
149
+
150
+ # Useful links
151
+
152
+ - View [our release blogpost](https://falcon-lm.github.io/blog/falcon-h1/).
153
+ - Feel free to join [our discord server](https://discord.gg/trwMYP9PYm) if you have any questions or to interact with our researchers and developers.
154
+
155
+ # Citation
156
+
157
+ If the Falcon-H1 family of models were helpful to your work, feel free to give us a cite.
158
+
159
+ ```
160
+ @misc{tiifalconh1,
161
+ title = {Falcon-H1: A Family of Hybrid-Head Language Models Redefining Efficiency and Performance},
162
+ url = {https://falcon-lm.github.io/blog/falcon-h1},
163
+ author = {Falcon-LLM Team},
164
+ month = {May},
165
+ year = {2025}
166
+ }
167
+ ```