Instructions to use TheBloke/Falcon-7B-Instruct-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/Falcon-7B-Instruct-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/Falcon-7B-Instruct-GPTQ", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("TheBloke/Falcon-7B-Instruct-GPTQ", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/Falcon-7B-Instruct-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/Falcon-7B-Instruct-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TheBloke/Falcon-7B-Instruct-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/Falcon-7B-Instruct-GPTQ
- SGLang
How to use TheBloke/Falcon-7B-Instruct-GPTQ 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 "TheBloke/Falcon-7B-Instruct-GPTQ" \ --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": "TheBloke/Falcon-7B-Instruct-GPTQ", "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 "TheBloke/Falcon-7B-Instruct-GPTQ" \ --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": "TheBloke/Falcon-7B-Instruct-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/Falcon-7B-Instruct-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/Falcon-7B-Instruct-GPTQ
How can I solve this problem?
Traceback (most recent call last):
File "C:\Users\Administrator\text-generation-webui\server.py", line 68, in load_model_wrapper
shared.model, shared.tokenizer = load_model(shared.model_name, loader)
File "C:\Users\Administrator\text-generation-webui\modules\models.py", line 78, in load_model
output = load_func_maploader
File "C:\Users\Administrator\text-generation-webui\modules\models.py", line 232, in llamacpp_loader
from modules.llamacpp_model import LlamaCppModel
File "C:\Users\Administrator\text-generation-webui\modules\llamacpp_model.py", line 11, in
import llama_cpp
File "C:\Users\Administrator.conda\envs\textgen\lib\site-packages\llama_cpp_init_.py", line 1, in
from .llama_cpp import *
File "C:\Users\Administrator.conda\envs\textgen\lib\site-packages\llama_cpp\llama_cpp.py", line 1292, in
llama_backend_init(c_bool(False))
File "C:\Users\Administrator.conda\envs\textgen\lib\site-packages\llama_cpp\llama_cpp.py", line 403, in llama_backend_init
return _lib.llama_backend_init(numa)
OSError: [WinError -1073741795] Windows Error 0xc000001d
windo10 - CPU
This is a GPTQ model and it looks like you're trying to load it with Loader = llama.cpp.
Please use the AutoGPTQ loader.
Error using AutoGPTQ
ERROR:The model could not be loaded because its checkpoint file in .bin/.pt/.safetensors format could not be located.
ERROR:The model could not be loaded because its checkpoint file in .bin/.pt/.safetensors format could not be located.
ERROR:No model is loaded! Select one in the Model tab.
This is a GPTQ model and it looks like you're trying to load it with Loader = llama.cpp.
Please use the AutoGPTQ loader.
ERROR:The model could not be loaded because its checkpoint file in .bin/.pt/.safetensors format could not be located.
ERROR:No model is loaded! Select one in the Model tab.
models:
chinese-alpaca-2-7b.ggmlv3.q4_0.bin
Chinese-Llama-2-7b.ggmlv3.q4_0.bin
models:
chinese-alpaca-2-7b.ggmlv3.q4_0.bin
Chinese-Llama-2-7b.ggmlv3.q4_0.bin
What do you mean, models: chinese-alpaca GGML? This is the Falcon 7B Instruct GPTQ model.
Please follow the instructions in the README for using this Falcon 7B Instruct GPTQ model.