Views
No views yet

transformers, vLLM or SGLang library.transformers or vLLM or SGLang.1pip install transformers
2pip install mamba-ssm[causal-conv1d]vllm=0.11.0:pip install "vllm>=0.11.0"<think>...</think> block, followed by the final response.1from transformers import AutoTokenizer, AutoModelForCausalLM
2model_id = "tiiuae/Falcon-H1R-7B"
3tokenizer = AutoTokenizer.from_pretrained(model_id)
4model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", dtype="auto")
5
6messages = [
7 {"role": "user", "content": "What is the derivative of x^2?"},
8]
9inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")
10
11outputs = model.generate(
12 inputs.to(model.device),
13 max_new_tokens=65536,
14 temperature=0.6,
15 top_p=0.95,
16 do_sample=True,
17)
18print(tokenizer.decode(outputs[0]))1vllm serve tiiuae/Falcon-H1R-7B \
2 --tensor-parallel-size 1 \
3 --data-parallel-size 1 \
4 --reasoning-parser deepseek_r1--max-model-len to preserve memory. Default value is 262144 which is quite large but not necessary for most scenarios.--enable-auto-tool-choice and --tool-call-parser hermes to the vllm serve command.1from openai import OpenAI
2import json
3
4client = OpenAI(
5 base_url="http://localhost:8000/v1",
6 api_key="EMPTY",
7)
8
9completion = client.chat.completions.create(
10 model="tiiuae/Falcon-H1R-7B",
11 messages=[
12 {"role": "user", "content": "If the product of two numbers is 360 and their GCD is 6, what is their LCM?"},
13 ],
14 temperature=0.6,
15 top_p=0.95,
16 max_tokens=65536
17)
18
19msg = completion.choices[0].message
20
21print(json.dumps({
22 "reasoning": msg.reasoning_content,
23 "answer": msg.content
24}, indent=2))1python -m sglang.launch_server \
2 --model tiiuae/Falcon-H1R-7B \
3 --tensor-parallel-size 1 \
4 --reasoning-parser deepseek-r11from openai import OpenAI
2import json
3
4client = OpenAI(
5 base_url="http://localhost:30000/v1",
6 api_key="EMPTY",
7)
8
9completion = client.chat.completions.create(
10 model="tiiuae/Falcon-H1R-7B",
11 messages=[
12 {"role": "user", "content": "How many solutions in integers satisfy ∣x∣+∣y∣=20?"},
13 ],
14 max_tokens=65536,
15 temperature=0.6,
16 top_p=0.95,
17)
18
19msg = completion.choices[0].message
20
21print(json.dumps({
22 "reasoning": msg.reasoning_content,
23 "answer": msg.content
24}, indent=2))| Category | Benchmark | Falcon-H1R-7B | Qwen3-8B | DeepSeek-R1-0528-Qwen3-8B | Phi-4-Reasoning-Plus-14B | Apriel-1.5-15b-Thinker | GPT-OSS-20B | Qwen3-32B | Nemotron-H-47B-Reasoning |
|---|---|---|---|---|---|---|---|---|---|
| MATH | AIME24 | 88.1 | 77.9 | 83.3 | 77.2 | 86.2 | 83.3 | 79.4 | 64.6 |
| AIME25 | 83.1 | 65.8 | 75.8 | 71.2 | 80.0 | 84.4 | 71.0 | 51.4 | |
| HMMT25 | 64.9 | 41.0 | 54.3 | 47.7 | 61.0 | 64.8 | 49.8 | 34.2 | |
| AMO-BENCH | 36.3 | 14.1 | 23.3 | 15.0 | 22.2 | 26.0 | 21.3 | 7.0 | |
| MATH500 | 97.4 | 97.4 | 96.8 | 95.4 | 97.2 | 94.8 | 96.8 | 91.4 | |
| Code | LCBv5-v6 | 68.6 | 53.0 | 57.2 | 53.1 | 53.0 | 72.0 | 61.0 | 47.4 |
| SciCode (sub/main) | 28.3 / 3.9 | 28.3 / 6.7 | 22.2 / 2.6 | 29.8 / 7.2 | 31.9 / 8.2 | 34.9 / 6.2 | 36.4 / 9.2 | 26.1 / 4.6 | |
| General | GPQA-D | 61.3 | 61.2 | 61.4 | 67.9 | 68.2 | 61.2 | 67.3 | 56.8 |
| MMLU-Pro | 72.1 | 63.5 | 69.1 | 79.2 | 76.5 | 75.6 | 73.9 | 78.6 | |
| HLE | 11.1 | 4.2 | 5.6 | 5.9 | 12.0 | 9.8 | 8.3 | 4.4 | |
| IFBench | 53.4 | 35.3 | 29.2 | 51.7 | 55.8 | 69.4 | 35.4 | 34.3 | |
| Agentic Workflows | 𝜏²-Bench Telecom | 25.4 | 27.8 | 68.4 | 60.2 | 29.8 | 11.4 | ||
| Terminal-Bench Hard | 4.9 | 2.1 | 1.4 | 2.1 | 9.9 | 9.9 | 2.8 | 1.4 |
| Benchmark | Falcon-H1R-7B | Qwen3-8B | DeepSeek-R1-0528-Qwen3-8B | Nemotron-H-8B | Phi-4-Reasoning-Plus-14B | Qwen3-32B |
|---|---|---|---|---|---|---|
| AIME24 | 96.7 | 80.0 | 90.0 | 53.3 | 86.7 | 86.7 |
| AIME25 | 96.7 | 80.0 | 82.8 | 43.3 | 83.3 | 86.7 |
| GPQA-D | 70.2 | 60.9 | 59.9 | 61.1 | 73.2 | 70.1 |
| AMO-Bench* | 35.9 | 15.4 | 25.6 | 7.7 | 20.5 | 28.2 |
@misc{falcon-h1r,
title={Falcon-H1R: Pushing the Reasoning Frontiers with a Hybrid Model for Efficient Test-Time Scaling},
author={Falcon LLM Team and Iheb Chaabane and Puneesh Khanna and Suhail Mohmad and Slim Frikha and Shi Hu and Abdalgader Abubaker and Reda Alami and Mikhail Lubinets and Mohamed El Amine Seddik and Hakim Hacid},
year={2026},
eprint={2601.02346},
archivePrefix={arXiv},
primaryClass={cs.AI},
url={https://arxiv.org/abs/2601.02346},
}