Downloads · 30 days
9
1% of all-time downloads
irlab-udc/Llama-3.1-8B-Instruct-Galician-GPTQ-Int4
Llama-3.1-8B-Instruct-Galician-GPTQ-Int4 is a text generation model from irlab-udc. 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.
4-bit quantized version of irlab-udc/Llama-3.1-8B-Instruct-Galician.
Downloads · 30 days
9
1% of all-time downloads
All-time downloads
1.4K
Public
Parameters
8B
5.7 GB on disk
Likes
1
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
4-bit quantized version of irlab-udc/Llama-3.1-8B-Instruct-Galician.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "irlab-udc/Llama-3.1-8B-Instruct-Galician-GPTQ-Int4"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
low_cpu_mem_usage=True,
device_map="auto"
)
messages = [
{"role": "system", "content": "You are a conversational AI that responds in Galician."},
{"role": "user", "content": "Cal é a principal vantaxe de Scrum?"},
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
).to("cuda")
outputs = model.generate(**inputs, do_sample=True, max_new_tokens=512)
print(tokenizer.batch_decode(outputs, skip_special_tokens=True))