Downloads · 30 days
32
1% of all-time downloads
ModelCloud/Meta-Llama-3.1-8B-gptq-4bit
Meta-Llama-3.1-8B-gptq-4bit is a text generation model from ModelCloud. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as llama3.1.
This model has been quantized using GPTQModel.
Downloads · 30 days
32
1% of all-time downloads
All-time downloads
2.3K
Public
Parameters
8B
5.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.7 GB · 100%
How the weights are stored.
I327B · 87%
From the Hugging Face model README
This model has been quantized using GPTQModel.
Here is an example:
import torch
from transformers import AutoTokenizer
from gptqmodel import GPTQModel
device = torch.device("cuda:0")
model_name = "ModelCloud/Meta-Llama-3.1-8B-gptq-4bit"
prompt = "I am in Shanghai, preparing to visit the natural history museum. Can you tell me the best way to"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = GPTQModel.from_quantized(model_name)
inputs = tokenizer(prompt, return_tensors="pt").to(device)
res = model.generate(**inputs, num_beams=1, min_new_tokens=1, max_new_tokens=512)
print(tokenizer.decode(res[0]))