ybelkada commited on
Commit
b880961
·
verified ·
1 Parent(s): a766072

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +137 -0
README.md ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-3B | Qwen3-4B | Qwen2.5-3B | Gemma3-4B | Llama3.2-3B | Falcon3-3B |
87
+ | --- | --- | --- | --- | --- | --- | --- |
88
+ | **General** | | | | | |
89
+ | BBH | **53.69** | 51.07 | 46.55 | 50.01 | 41.47 | 45.02 |
90
+ | ARC-C | **49.57** | 37.71 | 43.77 | 44.88 | 44.88 | 48.21 |
91
+ | TruthfulQA | 53.19 | 51.75 | **58.11** | 51.68 | 50.27 | 50.06 |
92
+ | HellaSwag | **69.85** | 55.31 | 64.21 | 47.68 | 63.74 | 64.24 |
93
+ | MMLU | **68.3** | 67.01 | 65.09 | 59.53 | 61.74 | 56.76 |
94
+ | **Math** | | | | | |
95
+ | GSM8k | **84.76** | 80.44 | 57.54 | 77.41 | 77.26 | 74.68 |
96
+ | MATH-500 | 74.2 | **85.0** | 64.2 | 76.4 | 41.2 | 54.2 |
97
+ | AMC-23 | 55.63 | **66.88** | 39.84 | 48.12 | 22.66 | 29.69 |
98
+ | AIME-24 | 11.88 | **22.29** | 6.25 | 6.67 | 11.67 | 3.96 |
99
+ | AIME-25 | 13.33 | **18.96** | 3.96 | 13.33 | 0.21 | 2.29 |
100
+ | **Science** | | | | | |
101
+ | GPQA | **33.89** | 28.02 | 28.69 | 29.19 | 28.94 | 28.69 |
102
+ | GPQA_Diamond | 38.72 | **40.74** | 35.69 | 28.62 | 29.97 | 29.29 |
103
+ | MMLU-Pro | **43.69** | 29.75 | 32.76 | 29.71 | 27.44 | 29.71 |
104
+ | MMLU-stem | **69.93** | 67.46 | 59.78 | 52.17 | 51.92 | 56.11 |
105
+ | **Code** | | | | | |
106
+ | HumanEval | 76.83 | **84.15** | 73.78 | 67.07 | 54.27 | 52.44 |
107
+ | HumanEval+ | 70.73 | **76.83** | 68.29 | 61.59 | 50.0 | 45.73 |
108
+ | MBPP | **79.63** | 68.78 | 72.75 | 77.78 | 62.17 | 61.9 |
109
+ | MBPP+ | **67.46** | 59.79 | 60.85 | 66.93 | 50.53 | 55.29 |
110
+ | LiveCodeBench | 26.81 | **39.92** | 11.74 | 21.14 | 2.74 | 3.13 |
111
+ | CRUXEval | 56.25 | **69.63** | 43.26 | 52.13 | 17.75 | 44.38 |
112
+ | **Instruction Following** | | | | | |
113
+ | IFEval | **85.05** | 84.01 | 64.26 | 77.01 | 74.0 | 69.1 |
114
+ | Alpaca-Eval | 31.09 | 36.51 | 17.37 | **39.64** | 19.69 | 14.82 |
115
+ | MTBench | **8.72** | 8.45 | 7.79 | 8.24 | 7.96 | 7.79 |
116
+ | LiveBench | 36.86 | **51.34** | 27.32 | 36.7 | 26.37 | 26.01 |
117
+
118
+ You can check more in detail on our [our release blogpost](https://falcon-lm.github.io/blog/falcon-h1/), detailed benchmarks.
119
+
120
+ # Useful links
121
+
122
+ - View [our release blogpost](https://falcon-lm.github.io/blog/falcon-h1/).
123
+ - Feel free to join [our discord server](https://discord.gg/fwXpMyGc) if you have any questions or to interact with our researchers and developers.
124
+
125
+ # Citation
126
+
127
+ If the Falcon-H1 family of models were helpful to your work, feel free to give us a cite.
128
+
129
+ ```
130
+ @misc{tiifalconh1,
131
+ title = {Falcon-H1: A Family of Hybrid-Head Language Models Redefining Efficiency and Performance},
132
+ url = {https://falcon-lm.github.io/blog/falcon-h1},
133
+ author = {Falcon-LLM Team},
134
+ month = {May},
135
+ year = {2025}
136
+ }
137
+ ```