danielhanchen commited on
Commit
b557e5d
·
verified ·
1 Parent(s): 265e8f5

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-1.5B-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>=0.9.0
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 compatible with `llama.cpp` 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-1.5B | Qwen3-1.7B | Qwen2.5-1.5B | Gemma3-1B | Llama3.2-1B | Falcon3-1B |
117
+ | --- | --- | --- | --- | --- | --- | --- |
118
+ | **General** | | | | | |
119
+ | BBH | **46.47** | 35.18 | 42.41 | 35.86 | 33.21 | 34.47 |
120
+ | ARC-C | 42.06 | 34.81 | 40.53 | 34.13 | 34.64 | **43.09** |
121
+ | TruthfulQA | 45.98 | **49.39** | 47.05 | 42.17 | 42.08 | 42.31 |
122
+ | HellaSwag | **63.33** | 49.27 | 62.23 | 42.24 | 55.3 | 58.53 |
123
+ | MMLU | **62.03** | 57.04 | 59.76 | 40.87 | 45.93 | 46.1 |
124
+ | **Math** | | | | | |
125
+ | GSM8k | **74.98** | 69.83 | 57.47 | 42.38 | 44.28 | 44.05 |
126
+ | MATH-500 | **74.0** | 73.0 | 48.4 | 45.4 | 13.2 | 19.8 |
127
+ | AMC-23 | 43.59 | **46.09** | 24.06 | 19.22 | 7.19 | 6.87 |
128
+ | AIME-24 | 11.25 | **12.5** | 2.29 | 0.42 | 1.46 | 0.41 |
129
+ | AIME-25 | **9.58** | 8.12 | 1.25 | 1.25 | 0.0 | 0.21 |
130
+ | **Science** | | | | | |
131
+ | GPQA | 26.34 | 27.68 | 26.26 | **28.19** | 26.59 | 26.76 |
132
+ | GPQA_Diamond | **35.19** | 33.33 | 25.59 | 21.55 | 25.08 | 31.31 |
133
+ | MMLU-Pro | **37.8** | 23.54 | 28.35 | 14.46 | 16.2 | 18.49 |
134
+ | MMLU-stem | **64.13** | 54.3 | 54.04 | 35.39 | 39.16 | 39.64 |
135
+ | **Code** | | | | | |
136
+ | HumanEval | **68.29** | 67.68 | 56.1 | 40.85 | 34.15 | 22.56 |
137
+ | HumanEval+ | **61.59** | 60.96 | 50.61 | 37.2 | 29.88 | 20.73 |
138
+ | MBPP | **64.81** | 58.73 | **64.81** | 57.67 | 33.6 | 20.63 |
139
+ | MBPP+ | **56.35** | 49.74 | 56.08 | 50.0 | 29.37 | 17.2 |
140
+ | LiveCodeBench | **17.61** | 14.87 | 12.52 | 5.09 | 2.35 | 0.78 |
141
+ | CRUXEval | **39.57** | 18.88 | 34.76 | 12.7 | 0.06 | 15.58 |
142
+ | **Instruction Following** | | | | | |
143
+ | IFEval | **80.66** | 70.77 | 45.33 | 61.48 | 55.34 | 54.26 |
144
+ | Alpaca-Eval | **28.18** | 21.89 | 9.54 | 17.87 | 9.38 | 6.98 |
145
+ | MTBench | **8.46** | 7.61 | 7.1 | 7.03 | 6.37 | 6.03 |
146
+ | LiveBench | 34.13 | **40.73** | 21.65 | 18.79 | 14.97 | 14.1 |
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
+ ```