Instructions to use TheBloke/gorilla-7B-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/gorilla-7B-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/gorilla-7B-GPTQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/gorilla-7B-GPTQ") model = AutoModelForCausalLM.from_pretrained("TheBloke/gorilla-7B-GPTQ", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/gorilla-7B-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/gorilla-7B-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/gorilla-7B-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/gorilla-7B-GPTQ
- SGLang
How to use TheBloke/gorilla-7B-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/gorilla-7B-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/gorilla-7B-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/gorilla-7B-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/gorilla-7B-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/gorilla-7B-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/gorilla-7B-GPTQ
Update README.md
Browse files
README.md
CHANGED
|
@@ -23,12 +23,23 @@ This repo contains a quantised 4-bit GPTQ model for [Gorilla 7B](https://hugging
|
|
| 23 |
|
| 24 |
It is the result of quantising to 4bit using [GPTQ-for-LLaMa](https://github.com/qwopqwop200/GPTQ-for-LLaMa).
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
## Other repositories available
|
| 27 |
|
| 28 |
* [4-bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/gorilla-7B-GPTQ)
|
| 29 |
* [4-bit, 5-bit, and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/gorilla-7B-GGML)
|
| 30 |
* [Merged, unquantised fp16 model in HF format](https://huggingface.co/TheBloke/gorilla-7B-fp16)
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
## How to easily download and use this model in text-generation-webui
|
| 33 |
|
| 34 |
Open the text-generation-webui UI as normal.
|
|
|
|
| 23 |
|
| 24 |
It is the result of quantising to 4bit using [GPTQ-for-LLaMa](https://github.com/qwopqwop200/GPTQ-for-LLaMa).
|
| 25 |
|
| 26 |
+
**NOTE**: This is not a regular LLM. It is designed to allow LLMs to use tools by invoking APIs.
|
| 27 |
+
|
| 28 |
+
"Gorilla enables LLMs to use tools by invoking APIs. Given a natural language query, Gorilla can write a semantically- and syntactically- correct API to invoke. With Gorilla, we are the first to demonstrate how to use LLMs to invoke 1,600+ (and growing) API calls accurately while reducing hallucination. "
|
| 29 |
+
|
| 30 |
## Other repositories available
|
| 31 |
|
| 32 |
* [4-bit GPTQ models for GPU inference](https://huggingface.co/TheBloke/gorilla-7B-GPTQ)
|
| 33 |
* [4-bit, 5-bit, and 8-bit GGML models for CPU+GPU inference](https://huggingface.co/TheBloke/gorilla-7B-GGML)
|
| 34 |
* [Merged, unquantised fp16 model in HF format](https://huggingface.co/TheBloke/gorilla-7B-fp16)
|
| 35 |
|
| 36 |
+
## Prompt template
|
| 37 |
+
|
| 38 |
+
```
|
| 39 |
+
###USER: find me an API to generate cute cat images
|
| 40 |
+
###ASSISTANT:
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
## How to easily download and use this model in text-generation-webui
|
| 44 |
|
| 45 |
Open the text-generation-webui UI as normal.
|