Text Generation
Transformers
Safetensors
English
RefinedWebModel
custom_code
text-generation-inference
4-bit precision
gptq
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, device_map="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
Initial AutoGPTQ model commit.
Browse files
README.md
CHANGED
|
@@ -34,15 +34,19 @@ I have [opened a PR here](https://github.com/oobabooga/text-generation-webui/pul
|
|
| 34 |
To get it working before the PR is merged, you will need to:
|
| 35 |
1. Edit `text-generation-webui/modules/AutoGPTQ_loader.py`
|
| 36 |
2. Make the following change:
|
|
|
|
| 37 |
Find the line that says:
|
| 38 |
```
|
| 39 |
'use_safetensors': use_safetensors,
|
| 40 |
```
|
|
|
|
| 41 |
And after it, add:
|
| 42 |
```
|
| 43 |
'trust_remote_code': shared.args.trust_remote_code,
|
| 44 |
```
|
|
|
|
| 45 |
[Once you are done the file should look like this](https://github.com/oobabooga/text-generation-webui/blob/473a57e35219c063d2fc230cfc7b5a118b448b38/modules/AutoGPTQ_loader.py#L33-L39)
|
|
|
|
| 46 |
3. Then save and close the file, and launch text-generation-webui as described below
|
| 47 |
|
| 48 |
## How to download and use this model in text-generation-webui
|
|
|
|
| 34 |
To get it working before the PR is merged, you will need to:
|
| 35 |
1. Edit `text-generation-webui/modules/AutoGPTQ_loader.py`
|
| 36 |
2. Make the following change:
|
| 37 |
+
|
| 38 |
Find the line that says:
|
| 39 |
```
|
| 40 |
'use_safetensors': use_safetensors,
|
| 41 |
```
|
| 42 |
+
|
| 43 |
And after it, add:
|
| 44 |
```
|
| 45 |
'trust_remote_code': shared.args.trust_remote_code,
|
| 46 |
```
|
| 47 |
+
|
| 48 |
[Once you are done the file should look like this](https://github.com/oobabooga/text-generation-webui/blob/473a57e35219c063d2fc230cfc7b5a118b448b38/modules/AutoGPTQ_loader.py#L33-L39)
|
| 49 |
+
|
| 50 |
3. Then save and close the file, and launch text-generation-webui as described below
|
| 51 |
|
| 52 |
## How to download and use this model in text-generation-webui
|