Text Generation
Transformers
PyTorch
Core ML
Safetensors
English
falcon
conversational
custom_code
text-generation-inference
Instructions to use tiiuae/falcon-7b-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiiuae/falcon-7b-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tiiuae/falcon-7b-instruct", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-7b-instruct", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-7b-instruct", trust_remote_code=True) 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
- vLLM
How to use tiiuae/falcon-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-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-7b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tiiuae/falcon-7b-instruct
- SGLang
How to use tiiuae/falcon-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-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-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-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-7b-instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use tiiuae/falcon-7b-instruct with Docker Model Runner:
docker model run hf.co/tiiuae/falcon-7b-instruct
Custom 4-bit Finetuning 5-7 times faster inference than QLora
pinned#13 opened almost 3 years ago
by
rmihaylov
Example Use
pinned❤️👍 8
31
#1 opened almost 3 years ago
by
Supreeth
Update README.md
#132 opened 4 months ago
by
cherry0328
Request: DOI
#131 opened 4 months ago
by
ASX12
Request: DOI
#130 opened 4 months ago
by
Dakubhaiii
i want the API for this model to use it on college project but can't find a way to do it
👍 2
1
#128 opened about 1 year ago
by
hamza1rezg1ui
Installation Guide
#127 opened about 1 year ago
by
Malganis
429 Client Error: Too Many Requests for url
1
#123 opened over 1 year ago
by
prasannaJK8
Interview request: genAI evaluation & documentation
#122 opened over 1 year ago
by
evatang
Finetuning with Bengali Dataset Fails : Need Urgent Help ?
#121 opened almost 2 years ago
by
uknowWho42
Vision to text capabilities
#120 opened about 2 years ago
by
kmewhort
ValueError: Error raised by inference API: Cannot override task for LLM models
1
#119 opened about 2 years ago
by
joangonzaleezzz
[AUTOMATED] Model Memory Requirements
#118 opened about 2 years ago
by
model-sizer-bot
[AUTOMATED] Model Memory Requirements
#117 opened about 2 years ago
by
model-sizer-bot
422 Unprocessable Entity when trying to use conversational API
#116 opened about 2 years ago
by
RandomDebugGuy
torch.cuda.OutOfMemoryError: CUDA out of memory.
1
#115 opened over 2 years ago
by
SlyGoblin
Update for langchain
#113 opened over 2 years ago
by
mbinkamran
Update README.md
#112 opened over 2 years ago
by
LauraSophie
Can Falcon have supported UTF-8?
#110 opened over 2 years ago
by
vutruc
No package metadata was found for bitsandbytes
10
#109 opened over 2 years ago
by
Fyutong
Adding Evaluation Results
#108 opened over 2 years ago
by
leaderboard-pr-bot
Compare Multiple Document using this model.
#104 opened over 2 years ago
by
Pitambarmuduli
Upload model
1
#103 opened over 2 years ago
by
dookplaza
Reasearch team in Nile university.
#101 opened over 2 years ago
by
kirollossaleh
This is an instruct model, which may not be ideal for further finetuning.
1
#100 opened over 2 years ago
by
rakeshda
tiiuae/falcon-7b-instruct does not appear to have a file named config.json
#99 opened over 2 years ago
by
robotrage
falcon-7b-instruct responds with weird and short answers ?
#98 opened over 2 years ago
by
olsi8
model not generating text
#97 opened over 2 years ago
by
airedwin
Trying to deploy this using Inference Endpoints
👍 2
1
#96 opened over 2 years ago
by
Kolibri753
Code for using inference api
#94 opened over 2 years ago
by
Karthik2003
Inference Api
1
#93 opened over 2 years ago
by
Karthik2003
The correctness of the result using transformers apply_chat_template
1
#92 opened over 2 years ago
by
Annorita
Request: DOI
#91 opened over 2 years ago
by
binbin888
How is falcon able to generate indic token , when it is not trained on Indic languages. even tokenizer.json doest have any Indic tokens.
#90 opened over 2 years ago
by
Sibadatta
How to solve this issue?
#87 opened over 2 years ago
by
Xiaogeng-Liu
Update generation_config.json
1
#86 opened over 2 years ago
by
nkasmanoff
Adding `safetensors` variant of this model
#84 opened over 2 years ago
by
bharathrajcl
Hardware requirements on falcon models: 7B, 40B, 180B
2
#83 opened over 2 years ago
by
its-eric-liu
Switching Falcon to other language
#82 opened over 2 years ago
by
wokalove
Update config.json
#81 opened over 2 years ago
by
frdmlvr
'num_return_sequences' & 'num_beams' can't be changed in inference API calls
#80 opened over 2 years ago
by
mrscoopers
Adding `safetensors` variant of this model
#79 opened over 2 years ago
by
bikalnetomi
Facing Issues with Model Output and Inference Times
👍 1
1
#78 opened over 2 years ago
by
ankity09
License file
#77 opened over 2 years ago
by
jsaurabh
Share your recommended configurations for speed.
#76 opened over 2 years ago
by
archonlith
Adding `safetensors` variant of this model
#75 opened over 2 years ago
by
Shridharalve
Use input attention mask instead of casual mask in attention
#74 opened almost 3 years ago
by
CyberZHG
Merge SentenceTransformer with Falcon-7b-instruct
#73 opened almost 3 years ago
by
Alkahwaji
integration issue with Langchain csv agent
3
#71 opened almost 3 years ago
by
DanCher
Issue with Falcon LLM while trying to use it on AWS EC2 Inferentia 2.8xlarge Instance
#70 opened almost 3 years ago
by
AmlanSamanta