Text Generation
Transformers
Safetensors
falcon_h1
falcon-h1
ybelkada commited on
Commit
ce6edad
·
verified ·
1 Parent(s): 4d45236

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +126 -0
README.md ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ tags:
4
+ - falcon-h1
5
+ license: other
6
+ license_name: falcon-llm-license
7
+ license_link: https://falconllm.tii.ae/falcon-terms-and-conditions.html
8
+ ---
9
+
10
+ # Table of Contents
11
+
12
+ 0. [TL;DR](#TL;DR)
13
+ 1. [Model Details](#model-details)
14
+ 2. [Training Details](#training-details)
15
+ 3. [Usage](#usage)
16
+ 4. [Evaluation](#evaluation)
17
+ 5. [Citation](#citation)
18
+
19
+ # TL;DR
20
+
21
+ # Model Details
22
+
23
+ ## Model Description
24
+
25
+ - **Developed by:** [https://www.tii.ae](https://www.tii.ae)
26
+ - **Model type:** Causal decoder-only
27
+ - **Architecture:** Hybrid Transformers + Mamba architecture
28
+ - **Language(s) (NLP):** English, Multilingual
29
+ - **License:** Falcon-LLM License
30
+
31
+ # Training details
32
+
33
+ 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/).
34
+
35
+ # Usage
36
+
37
+ Currently to use this model you can either rely on Hugging Face `transformers`, `vLLM` or our custom fork of `llama.cpp` library.
38
+
39
+ ## Inference
40
+
41
+ Make sure to install the latest version of `transformers` or `vllm`, eventually install these packages from source:
42
+
43
+ ```bash
44
+ pip install git+https://github.com/huggingface/transformers.git
45
+ ```
46
+
47
+ Refer to [the official vLLM documentation for more details on building vLLM from source](https://docs.vllm.ai/en/latest/getting_started/installation/gpu.html#build-wheel-from-source).
48
+
49
+ ### 🤗 transformers
50
+
51
+ Refer to the snippet below to run H1 models using 🤗 transformers:
52
+
53
+ ```python
54
+ import torch
55
+ from transformers import AutoModelForCausalLM, AutoTokenizer
56
+
57
+ model_id = "tiiuae/Falcon-H1-1B-Base"
58
+
59
+ model = AutoModelForCausalLM.from_pretrained(
60
+ model_id,
61
+ torch_dtype=torch.bfloat16,
62
+ device_map="auto"
63
+ )
64
+
65
+ # Perform text generation
66
+ ```
67
+
68
+ ### vLLM
69
+
70
+ For vLLM, simply start a server by executing the command below:
71
+
72
+ ```
73
+ # pip install vllm
74
+ vllm serve tiiuae/Falcon-H1-1B-Instruct --tensor-parallel-size 2 --data-parallel-size 1
75
+ ```
76
+
77
+ ### `llama.cpp`
78
+
79
+ While we are working on integrating our architecture directly into `llama.cpp` library, you can install our fork of the library and use it directly: https://github.com/tiiuae/llama.cpp-Falcon-H1
80
+ Use the same installing guidelines as `llama.cpp`.
81
+
82
+ # Evaluation
83
+
84
+ Falcon-H1 series perform very well on a variety of tasks, including reasoning tasks.
85
+
86
+ | Tasks | Falcon-H1-34B | Qwen2.5-72B | Qwen2.5-32B | Gemma3-27B | Llama3.1-70B | Llama4-scout |
87
+ | --- | --- | --- | --- | --- | --- | --- |
88
+ | **General** | | | | | |
89
+ | BBH | **69.36** | 67.77 | 67.45 | 61.6 | 62.78 | 61.71 |
90
+ | MMLU | 83.46 | **85.96** | 83.18 | 78.32 | 78.49 | 77.98 |
91
+ | ARC-C | 71.25 | **72.44** | 70.48 | 70.31 | 69.2 | 62.97 |
92
+ | HellaSwag | 85.68 | 87.57 | 85.13 | 86.19 | **87.78** | 84.01 |
93
+ | Winogrande | 82.72 | 83.74 | 82.32 | 82.4 | **85.32** | 78.93 |
94
+ | **Math** | | | | | |
95
+ | GSM8k | 76.5 | 89.76 | **90.14** | 81.35 | 80.52 | 83.24 |
96
+ | MATH lvl5 | **40.71** | 38.14 | 36.4 | 25.38 | 18.81 | 27.19 |
97
+ | **Science** | | | | | |
98
+ | GPQA | **42.7** | 42.28 | 39.68 | 35.82 | 36.49 | 35.99 |
99
+ | MMLU-Pro | 57.18 | **60.22** | 58.05 | 49.64 | 47.07 | 50.16 |
100
+ | MMLU-stem | 83.82 | **84.81** | 82.81 | 76.59 | 70.35 | 72.57 |
101
+ | **Code** | | | | | |
102
+ | HumanEval | **70.12** | 59.15 | 59.76 | 48.78 | 57.32 | 57.32 |
103
+ | HumanEval+ | **64.63** | 51.22 | 51.83 | 40.85 | 50.61 | 48.78 |
104
+ | MBPP | 83.33 | **87.04** | 83.07 | 76.19 | 78.84 | 77.78 |
105
+ | MBPP+ | 70.37 | **70.63** | 68.78 | 61.64 | 66.67 | 64.29 |
106
+
107
+ You can check more in detail on our [our release blogpost](https://falcon-lm.github.io/blog/falcon-h1/), detailed benchmarks.
108
+
109
+ # Useful links
110
+
111
+ - View [our release blogpost](https://falcon-lm.github.io/blog/falcon-h1/).
112
+ - Feel free to join [our discord server](https://discord.gg/fwXpMyGc) if you have any questions or to interact with our researchers and developers.
113
+
114
+ # Citation
115
+
116
+ If the Falcon-H1 family of models were helpful to your work, feel free to give us a cite.
117
+
118
+ ```
119
+ @misc{tiifalconh1,
120
+ title = {Falcon-H1: A Family of Hybrid-Head Language Models Redefining Efficiency and Performance},
121
+ url = {https://falcon-lm.github.io/blog/falcon-h1},
122
+ author = {Falcon-LLM Team},
123
+ month = {May},
124
+ year = {2025}
125
+ }
126
+ ```