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", device_map="auto") 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
Improve model card: Add pipeline tag, enrich tags, update license, and add top-level links
#3
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
language:
|
| 4 |
- ar
|
| 5 |
- cs
|
|
@@ -19,18 +19,25 @@ language:
|
|
| 19 |
- sv
|
| 20 |
- ur
|
| 21 |
- zh
|
|
|
|
|
|
|
| 22 |
tags:
|
| 23 |
- falcon-h1
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
| 28 |
inference: true
|
|
|
|
| 29 |
---
|
| 30 |
|
|
|
|
|
|
|
| 31 |
<img src="https://huggingface.co/datasets/tiiuae/documentation-images/resolve/main/falcon_mamba/falcon-h1-logo.png" alt="drawing" width="800"/>
|
| 32 |
|
| 33 |
-
#
|
| 34 |
|
| 35 |
0. [TL;DR](#TL;DR)
|
| 36 |
1. [Model Details](#model-details)
|
|
@@ -40,6 +47,7 @@ inference: true
|
|
| 40 |
5. [Citation](#citation)
|
| 41 |
|
| 42 |
# TL;DR
|
|
|
|
| 43 |
|
| 44 |
# Model Details
|
| 45 |
|
|
@@ -49,7 +57,7 @@ inference: true
|
|
| 49 |
- **Model type:** Causal decoder-only
|
| 50 |
- **Architecture:** Hybrid Transformers + Mamba architecture
|
| 51 |
- **Language(s) (NLP):** English, Multilingual
|
| 52 |
-
- **License:**
|
| 53 |
|
| 54 |
# Training details
|
| 55 |
|
|
@@ -147,6 +155,7 @@ You can check more in detail on our [our release blogpost](https://falcon-lm.git
|
|
| 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
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model: tiiuae/Falcon-H1-7B-Base
|
| 3 |
language:
|
| 4 |
- ar
|
| 5 |
- cs
|
|
|
|
| 19 |
- sv
|
| 20 |
- ur
|
| 21 |
- zh
|
| 22 |
+
library_name: transformers
|
| 23 |
+
license: apache-2.0
|
| 24 |
tags:
|
| 25 |
- falcon-h1
|
| 26 |
+
- multilingual
|
| 27 |
+
- code-generation
|
| 28 |
+
- math
|
| 29 |
+
- reasoning
|
| 30 |
+
- instruction-tuned
|
| 31 |
+
- science
|
| 32 |
inference: true
|
| 33 |
+
pipeline_tag: text-generation
|
| 34 |
---
|
| 35 |
|
| 36 |
+
[\ud83d\udcc4 Paper](https://huggingface.co/papers/2507.22448) | [\ud83d\udcbb Code](https://github.com/tiiuae/Falcon-H1) | [\ud83c\udfe0 Project Page](https://tiiuae.github.io/Falcon-H1/)
|
| 37 |
+
|
| 38 |
<img src="https://huggingface.co/datasets/tiiuae/documentation-images/resolve/main/falcon_mamba/falcon-h1-logo.png" alt="drawing" width="800"/>
|
| 39 |
|
| 40 |
+
# Table of Contents
|
| 41 |
|
| 42 |
0. [TL;DR](#TL;DR)
|
| 43 |
1. [Model Details](#model-details)
|
|
|
|
| 47 |
5. [Citation](#citation)
|
| 48 |
|
| 49 |
# TL;DR
|
| 50 |
+
Falcon-H1 is a new family of hybrid-head Large Language Models (LLMs) ranging from 0.5B to 34B parameters. They combine Transformer-based attention with State Space Models (SSMs) for superior long-context memory and computational efficiency. These models achieve state-of-the-art performance across reasoning, mathematics, multilingual tasks, instruction following, and scientific knowledge, outperforming larger models in efficiency and performance. They support up to 256K context tokens and 18 languages, and are released under a permissive open-source license.
|
| 51 |
|
| 52 |
# Model Details
|
| 53 |
|
|
|
|
| 57 |
- **Model type:** Causal decoder-only
|
| 58 |
- **Architecture:** Hybrid Transformers + Mamba architecture
|
| 59 |
- **Language(s) (NLP):** English, Multilingual
|
| 60 |
+
- **License:** Apache 2.0
|
| 61 |
|
| 62 |
# Training details
|
| 63 |
|
|
|
|
| 155 |
|
| 156 |
- View [our release blogpost](https://falcon-lm.github.io/blog/falcon-h1/).
|
| 157 |
- View [our technical report](https://arxiv.org/abs/2507.22448).
|
| 158 |
+
- View [our official documentation](https://tiiuae.github.io/Falcon-H1/).
|
| 159 |
- Feel free to join [our discord server](https://discord.gg/trwMYP9PYm) if you have any questions or to interact with our researchers and developers.
|
| 160 |
|
| 161 |
# Citation
|