Instructions to use tiiuae/Falcon3-7B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiiuae/Falcon3-7B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tiiuae/Falcon3-7B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tiiuae/Falcon3-7B-Instruct") model = AutoModelForCausalLM.from_pretrained("tiiuae/Falcon3-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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tiiuae/Falcon3-7B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tiiuae/Falcon3-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/Falcon3-7B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tiiuae/Falcon3-7B-Instruct
- SGLang
How to use tiiuae/Falcon3-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/Falcon3-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/Falcon3-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/Falcon3-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/Falcon3-7B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tiiuae/Falcon3-7B-Instruct with Docker Model Runner:
docker model run hf.co/tiiuae/Falcon3-7B-Instruct
Commit History
-
Removed ] (#12)
Verified signature- Removed ] (82a648a6364bc46d58f54cc3ba6f17b8f3fa4f71) Co-authored-by: Shashi Manikonda <manikonda@users.noreply.huggingface.co>1e57a0e
-
Update README.md
Slim FrikhaVerified signaturec420e95
-
Update FC template (#11)
Slim Frikha +1: fedyanin Verified signature- Update tool template with default sys message and upate bfcl score (1417659f8de360e60c7846bc6d2d7b7e8549b8cd) Co-authored-by: Kirill <fedyanin@users.noreply.huggingface.co>5563a37
-
Add HF leaderboard eval comparision
Verified signaturea46dd97
-
fix rounding typos
Slim FrikhaVerified signature2d89dec -
Update eval results with fewshot_as_multiturn
Verified signaturec2b78c8
-
fix chat_template for tool use (#7)
Verified signature- fix chat_template for tool use (1194fcdd3f6b78bb339242e7911caf5e80b45c0c) Co-authored-by: Iheb Chaabane <Iheb-Chaabane@users.noreply.huggingface.co>0839f79
-
Update README.md (#6)
Verified signature- Update README.md (7e687ae73edf08802bd62d9347e3d8a16a22cfb1) Co-authored-by: Dhia hf <Dhia-GB@users.noreply.huggingface.co>21b3491 -
Update README.md
Verified signature28519b8 -
Updating tags in the README (#5)
Verified signature- Updating tags in the README (bd3c799626ef85fc23becb8b498662628c487942) - Update README.md (bed191412b3197aeb74587298fc351739ca10210) Co-authored-by: Aritra Roy Gosthipaty <ariG23498@users.noreply.huggingface.co>7541925 -
Update README.md
Verified signatureCorrect Math score and rounding4cf1db0 -
Update README.md
Verified signatureChange to Alpaca43ca5d0 -
Update README.md
Verified signature78e6344 -
falcon3 release
slim.frikha33e9db5