Text Generation
Transformers
Safetensors
PyTorch
English
llama
facebook
meta
llama-2
text-generation-inference
4-bit precision
gptq
Instructions to use TheBloke/Llama-2-7B-Chat-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TheBloke/Llama-2-7B-Chat-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TheBloke/Llama-2-7B-Chat-GPTQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TheBloke/Llama-2-7B-Chat-GPTQ") model = AutoModelForCausalLM.from_pretrained("TheBloke/Llama-2-7B-Chat-GPTQ", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TheBloke/Llama-2-7B-Chat-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TheBloke/Llama-2-7B-Chat-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-2-7B-Chat-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TheBloke/Llama-2-7B-Chat-GPTQ
- SGLang
How to use TheBloke/Llama-2-7B-Chat-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-2-7B-Chat-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-2-7B-Chat-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-2-7B-Chat-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-2-7B-Chat-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TheBloke/Llama-2-7B-Chat-GPTQ with Docker Model Runner:
docker model run hf.co/TheBloke/Llama-2-7B-Chat-GPTQ
ValueError: Block pattern could not be match. Pass `block_name_to_quantize` argument in `quantize_model`
1
#36 opened about 2 years ago
by
Gonzalomoreno01
Some weights of the model checkpoint at Llama-2-7B-Chat-GPTQ were not used when initializing LlamaForCausalLM
#35 opened over 2 years ago
by
thlw
[AUTOMATED] Model Memory Requirements
#34 opened over 2 years ago
by
model-sizer-bot
[AUTOMATED] Model Memory Requirements
#33 opened over 2 years ago
by
model-sizer-bot
[AUTOMATED] Model Memory Requirements
#32 opened over 2 years ago
by
model-sizer-bot
Fails with transformers==4.38.1
#30 opened over 2 years ago
by
rohithkrn
Index out of range error: QAchain for pdf chatbot
#29 opened over 2 years ago
by
Artemis3196
How to overcoming bad output for better results?
#28 opened almost 3 years ago
by
notmax123
Functional example of finetuning of Llama-2-7b-Chat-GPTQ
#26 opened almost 3 years ago
by
echogit
AUTOGPTQ Error in Google Colab
6
#25 opened almost 3 years ago
by
echogit
Does the model response correctly
1
#24 opened almost 3 years ago
by
mnwato
Can't Load Model in Kubernetes but can in Docker
#23 opened almost 3 years ago
by
jrsperry
TheBloke/Llama-2-7b-(Chat-)GPTQ repeats request
#22 opened almost 3 years ago
by
hyzhak
Cannot run batch on transformer
3
#20 opened almost 3 years ago
by
DatenlaborBerlin
The response is not formatted
#18 opened almost 3 years ago
by
Octavian81
how to load the GPTQ model using any pipeline method
2
#17 opened about 3 years ago
by
harithushan
Error trying to run on a revision, tensors not conforming?
#16 opened about 3 years ago
by
JohnSnyderTC
for faster GPU inference
2
#15 opened about 3 years ago
by
harithushan
How to set it up in a way that it just returns output without the system message or query, basically the information after [/INST].
1
#14 opened about 3 years ago
by
Pavan-growexx
Update for Transformers GPTQ support
#13 opened about 3 years ago
by
TheBloke
LORA fine tuning error
#12 opened about 3 years ago
by
tongwuhugging
GPTQ bugging: Wondering if I'm loading the model correctly
4
#9 opened about 3 years ago
by
quantuan125
Please make this model quantised GPTQ
2
#7 opened about 3 years ago
by
AiModelsMarket
TGI error
#5 opened about 3 years ago
by
aiamateur101
Cannot use anything but what's in the main branch
14
#3 opened about 3 years ago
by
HAvietisov
How to use this GPTQ Model from Python code for continue conversation?
1
#2 opened about 3 years ago
by
shifa
"max_length": 4096, "max_position_embeddings": 4096,
1
#1 opened about 3 years ago
by
pseudotensor