Downloads · 30 days
24
2% of all-time downloads
seonglae/llama-2-7b-chat-hf-gptq
llama-2-7b-chat-hf-gptq is a text generation model from seonglae. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
This model should use AutoGPTQ so you need to use auto-gptq - no-act-order model - 4bit model quantization
Downloads · 30 days
24
2% of all-time downloads
All-time downloads
1.5K
Public
Repo size
15.6 GB
Likes
0
Public
Click a slice to open those files.
.bin3.9 GB · 50%
From the Hugging Face model README
This model should use AutoGPTQ so you need to use auto-gptq
no-act-order modelfrom transformers import AutoTokenizer, pipeline, LlamaForCausalLM, LlamaTokenizer
from auto_gptq import AutoGPTQForCausalLM
model_id = 'seonglae/llama-2-7b-chat-hf-gptq'
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=True)
model = AutoGPTQForCausalLM.from_quantized(
model_id,
model_basename=model_basename,
trust_remote_code=True,
device='cuda:0',
use_triton=False,
use_safetensors=True,
)
pipe = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
temperature=0.5,
top_p=0.95,
max_new_tokens=100,
repetition_penalty=1.15,
)
prompt = "USER: Are you AI?\nASSISTANT:"
pipe(prompt)