Text Generation
Transformers
PyTorch
Safetensors
English
falcon
custom_code
text-generation-inference
Instructions to use tiiuae/falcon-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tiiuae/falcon-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tiiuae/falcon-7b", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("tiiuae/falcon-7b", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("tiiuae/falcon-7b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tiiuae/falcon-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tiiuae/falcon-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tiiuae/falcon-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tiiuae/falcon-7b
- SGLang
How to use tiiuae/falcon-7b 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" \ --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/falcon-7b", "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/falcon-7b" \ --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/falcon-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use tiiuae/falcon-7b with Docker Model Runner:
docker model run hf.co/tiiuae/falcon-7b
Getting an error TypeError: unsupported operand type(s) for *: 'Tensor' and 'NoneType'
👍 3
7
#49 opened over 3 years ago
by
NajiAboo
Fix typo in `README.md`
#48 opened over 3 years ago
by
alvarobartt
Model Inference with trust_remote_code=False
#47 opened over 3 years ago
by
eranhe
Trying to understand internals of falcon
1
#46 opened over 3 years ago
by
MorphzZ
No Output is generated, Running on Cloud
👍🤝 3
#45 opened over 3 years ago
by
Yassin-sameh
Adding `safetensors` variant of this model
#44 opened over 3 years ago
by
suman724
Adding `safetensors` variant of this model
#43 opened over 3 years ago
by
Pranjal95
Where we can find the GitHub repo for the inference code
#42 opened over 3 years ago
by
paulami07
Unable to get inference API working, trust_remote_code needs to be True
#41 opened over 3 years ago
by
medmac01
falcon-7B based sentence embedding
👍 2
2
#40 opened over 3 years ago
by
sk2mm2
How to use a fine-tuned Falcon pushed to the Hub?
😔 1
#38 opened over 3 years ago
by
andersonbcdefg
Inference VRAM usage is abnormally large
#37 opened over 3 years ago
by
manu
Run SFT using PEFT on single a10g with 24G mem, got out of mem problem
#35 opened over 3 years ago
by
Andcircle
Run SFT using PEFT got error with RotaryEmbedding
1
#34 opened over 3 years ago
by
Andcircle
Update RotaryEmbedding caching
#33 opened over 3 years ago
by
beibin79
Unsupervised learning with unlabled data
4
#32 opened over 3 years ago
by
rbgreenway
Fine-tuning falcon-7b on CPU
🤗👍 2
1
#31 opened over 3 years ago
by
jadehardouin
Special Token >>SUMMARY<<
#30 opened over 3 years ago
by
mhupfauer
Add TensorFlow weights
2
#29 opened over 3 years ago
by
Ruqiya
out of RAM (24GB)
#28 opened over 3 years ago
by
SuperAimodelsNow11
Shape mismatch error for F.scaled_dot_product_attention in modelling_RW.py
2
#27 opened over 3 years ago
by
xtliu
Embeddings for Chroma for LangChain for document search
1
#26 opened over 3 years ago
by
LeoArtaza
disabling Loading checkpoints shards
3
#23 opened over 3 years ago
by
idksamk
Is it possible to add TF Weights
3
#21 opened over 3 years ago
by
mb-data96
Error loading tiiuae/falcon-7b
7
#18 opened over 3 years ago
by
Noecora
Error with Inference with past_key_values
👍 1
14
#17 opened over 3 years ago
by
dimaischenko
Getting stuck at Setting `pad_token_id` to `eos_token_id`:11 for open-end generation.
5
#14 opened over 3 years ago
by
ivyas