Instructions to use tiiuae/Falcon-H1-7B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiiuae/Falcon-H1-7B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tiiuae/Falcon-H1-7B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tiiuae/Falcon-H1-7B-Instruct") model = AutoModelForCausalLM.from_pretrained("tiiuae/Falcon-H1-7B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tiiuae/Falcon-H1-7B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tiiuae/Falcon-H1-7B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiiuae/Falcon-H1-7B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tiiuae/Falcon-H1-7B-Instruct
- SGLang
How to use tiiuae/Falcon-H1-7B-Instruct with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "tiiuae/Falcon-H1-7B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiiuae/Falcon-H1-7B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "tiiuae/Falcon-H1-7B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiiuae/Falcon-H1-7B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tiiuae/Falcon-H1-7B-Instruct with Docker Model Runner:
docker model run hf.co/tiiuae/Falcon-H1-7B-Instruct
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
tags:
|
| 4 |
- falcon-h1
|
| 5 |
license: other
|
|
@@ -34,7 +53,7 @@ inference: true
|
|
| 34 |
|
| 35 |
# Training details
|
| 36 |
|
| 37 |
-
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/).
|
| 38 |
|
| 39 |
# Usage
|
| 40 |
|
|
@@ -127,6 +146,7 @@ You can check more in detail on our [our release blogpost](https://falcon-lm.git
|
|
| 127 |
# Useful links
|
| 128 |
|
| 129 |
- View [our release blogpost](https://falcon-lm.github.io/blog/falcon-h1/).
|
|
|
|
| 130 |
- Feel free to join [our discord server](https://discord.gg/trwMYP9PYm) if you have any questions or to interact with our researchers and developers.
|
| 131 |
|
| 132 |
# Citation
|
|
@@ -134,11 +154,10 @@ You can check more in detail on our [our release blogpost](https://falcon-lm.git
|
|
| 134 |
If the Falcon-H1 family of models were helpful to your work, feel free to give us a cite.
|
| 135 |
|
| 136 |
```
|
| 137 |
-
@
|
| 138 |
-
title
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
year = {2025}
|
| 143 |
}
|
| 144 |
```
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
language:
|
| 4 |
+
- ar
|
| 5 |
+
- cs
|
| 6 |
+
- de
|
| 7 |
+
- en
|
| 8 |
+
- es
|
| 9 |
+
- fr
|
| 10 |
+
- hi
|
| 11 |
+
- it
|
| 12 |
+
- ja
|
| 13 |
+
- ko
|
| 14 |
+
- nl
|
| 15 |
+
- pl
|
| 16 |
+
- pt
|
| 17 |
+
- ro
|
| 18 |
+
- ru
|
| 19 |
+
- sv
|
| 20 |
+
- ur
|
| 21 |
+
- zh
|
| 22 |
tags:
|
| 23 |
- falcon-h1
|
| 24 |
license: other
|
|
|
|
| 53 |
|
| 54 |
# Training details
|
| 55 |
|
| 56 |
+
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).
|
| 57 |
|
| 58 |
# Usage
|
| 59 |
|
|
|
|
| 146 |
# Useful links
|
| 147 |
|
| 148 |
- View [our release blogpost](https://falcon-lm.github.io/blog/falcon-h1/).
|
| 149 |
+
- View [our technical report](https://arxiv.org/abs/2507.22448).
|
| 150 |
- Feel free to join [our discord server](https://discord.gg/trwMYP9PYm) if you have any questions or to interact with our researchers and developers.
|
| 151 |
|
| 152 |
# Citation
|
|
|
|
| 154 |
If the Falcon-H1 family of models were helpful to your work, feel free to give us a cite.
|
| 155 |
|
| 156 |
```
|
| 157 |
+
@article{falconh1,
|
| 158 |
+
title={Falcon-H1: A Family of Hybrid-Head Language Models Redefining Efficiency and Performance},
|
| 159 |
+
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},
|
| 160 |
+
journal = {arXiv preprint arXiv:2507.22448},
|
| 161 |
+
year={2025}
|
|
|
|
| 162 |
}
|
| 163 |
```
|