Instructions to use TheBloke/LLaMa-7B-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/LLaMa-7B-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/LLaMa-7B-GPTQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/LLaMa-7B-GPTQ") model = AutoModelForCausalLM.from_pretrained("TheBloke/LLaMa-7B-GPTQ") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/LLaMa-7B-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/LLaMa-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/LLaMa-7B-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/LLaMa-7B-GPTQ
- SGLang
How to use TheBloke/LLaMa-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/LLaMa-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/LLaMa-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/LLaMa-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/LLaMa-7B-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/LLaMa-7B-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/LLaMa-7B-GPTQ
Upload README.md
Browse files
README.md
CHANGED
|
@@ -58,15 +58,8 @@ Multiple GPTQ parameter permutations are provided; see Provided Files below for
|
|
| 58 |
```
|
| 59 |
|
| 60 |
<!-- prompt-template end -->
|
| 61 |
-
<!-- licensing start -->
|
| 62 |
-
## Licensing
|
| 63 |
|
| 64 |
-
The creator of the source model has listed its license as `other`, and this quantization has therefore used that same license.
|
| 65 |
|
| 66 |
-
As this model is based on Llama 2, it is also subject to the Meta Llama 2 license terms, and the license files for that are additionally included. It should therefore be considered as being claimed to be licensed under both licenses. I contacted Hugging Face for clarification on dual licensing but they do not yet have an official position. Should this change, or should Meta provide any feedback on this situation, I will update this section accordingly.
|
| 67 |
-
|
| 68 |
-
In the meantime, any questions regarding licensing, and in particular how these two licenses might interact, should be directed to the original model repository: [Meta's LLaMA 7b](https://ai.meta.com/blog/large-language-model-llama-meta-ai).
|
| 69 |
-
<!-- licensing end -->
|
| 70 |
<!-- README_GPTQ.md-provided-files start -->
|
| 71 |
## Provided files and GPTQ parameters
|
| 72 |
|
|
|
|
| 58 |
```
|
| 59 |
|
| 60 |
<!-- prompt-template end -->
|
|
|
|
|
|
|
| 61 |
|
|
|
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
<!-- README_GPTQ.md-provided-files start -->
|
| 64 |
## Provided files and GPTQ parameters
|
| 65 |
|