Instructions to use tiiuae/Falcon3-10B-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiiuae/Falcon3-10B-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tiiuae/Falcon3-10B-Base")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tiiuae/Falcon3-10B-Base") model = AutoModelForCausalLM.from_pretrained("tiiuae/Falcon3-10B-Base") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use tiiuae/Falcon3-10B-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tiiuae/Falcon3-10B-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiiuae/Falcon3-10B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tiiuae/Falcon3-10B-Base
- SGLang
How to use tiiuae/Falcon3-10B-Base 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-10B-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiiuae/Falcon3-10B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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-10B-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiiuae/Falcon3-10B-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tiiuae/Falcon3-10B-Base with Docker Model Runner:
docker model run hf.co/tiiuae/Falcon3-10B-Base
Adding Arabic Language Support to Falcon Tokenizer
Hi,
I'm working with the Falcon tokenizer and need to process Arabic text. I'd like to know:
- Does the base Falcon tokenizer already support Arabic characters?
- If not, what would be the best approach to extend it for Arabic language support?
Has anyone successfully implemented this before? Any guidance or references would be appreciated.
Thank you
Hi @adeebDkheel
Thanks for the issue - unfortunately this tokenizer has not been explicitly trained on arabic language, there are multiple viable solutions that could be:
- Train a new tokenizer from scratch on arabic only and initialize the model with new Embedding matrix and Language Model head - then re-train your model on Arabic
- Extend the current tokenizer (not sure how to do that actually) with an arabic tokenizer and retrain the embedding matrix + lm-head
Maybe other team members have better ideas so we can let them chime in the conversation :) - feel free also to join our discord channel and ask this question
Hello ybelkada,
Thank you for the detailed response!
I'd like to explore the second approach you mentioned (Extend the current tokenizer).
Could you or someone from the team help to clarify if a similar approach to
'Extending Llama to a new language' (https://github.com/meta-llama/llama-recipes/tree/main/recipes/use_cases/multilingual)
would work with Falcon3?
I'm particularly interested in understanding if there are any Falcon-specific considerations to keep in mind.
Thanks again and Best Regards,
Hi @adeebDkheel
Thank you !
Falcon3 series model leverages llama architecture so you shouldn't face any issue when trying to use that approach for Falcon 3
Best Regards