Downloads · 30 days
16
3% of all-time downloads
daedalus314/Griffin-3B-GPTQ
Griffin-3B-GPTQ is a text generation model from daedalus314. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a quantized version of Griffin-3B, using GPTQ. The quantization has been done following the sample notebook provided by Hugging Face.
Downloads · 30 days
16
3% of all-time downloads
All-time downloads
523
Public
Parameters
3.4B
4.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.bin2.3 GB · 50%
How the weights are stored.
I323.2B · 94%
From the Hugging Face model README
This model is a quantized version of Griffin-3B, using GPTQ. The quantization has been done following the sample notebook provided by Hugging Face.
The model has been quantized as part of the project GPTStonks. It works with transformers>=4.33.0 and it can run on a consumer GPU, with less than 3GB of GPU RAM. The libraries optimum, auto-gptq, peft and accelerate should also be installed.
Here is a sample code to load the model and run inference with it using sampling as decoding strategy:
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "daedalus314/Griffin-3B-GPTQ"
tokenizer = AutoTokenizer.from_pretrained(model_id)
quant_model = AutoModelForCausalLM.from_pretrained(model_id, device_map='auto')
text = """### HUMAN:
What is artifical intelligence?
### RESPONSE:
"""
inputs = tokenizer(text, return_tensors="pt").to(0)
out = quant_model.generate(
**inputs,
do_sample=True,
top_p=0.9,
temperature=0.9,
max_length=1024,
)
print(tokenizer.decode(out[0], skip_special_tokens=True))
And a sample output:
### HUMAN:
What is artifical intelligence?
### RESPONSE:
Artificial intelligence, or AI, refers to the ability of computers to perform tasks that typically require human intelligence, such as decision making, problem solving, and language understanding. AI has been used in various fields, including healthcare, manufacturing, and finance, among others.
Please refer to the original model Griffin-3B.