Downloads · 30 days
20
4% of all-time downloads
rautaditya/llama-3.2-1b-4bit-gptq
llama-3.2-1b-4bit-gptq is a text generation model from rautaditya. Use it when you need the model to write or continue text. The card lists the license as mit.
- Base Model: Meta-Llama/Llama-3.2-1B - Model Name: rautaditya/llama-3.2-1b-4bit-gptq - Quantization: 4-bit GPTQ (Generative Pretrained Transformer Quantization)
Downloads · 30 days
20
4% of all-time downloads
All-time downloads
509
Public
Parameters
1.3B
1.1 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
How the weights are stored.
U8973M · 78%
From the Hugging Face model README
This is a 4-bit quantized version of the Llama-3.2 1B model, designed to reduce model size and inference latency while maintaining reasonable performance. The quantization process allows for more efficient deployment on resource-constrained environments.
pip install transformers accelerate auto-gptq torch
from transformers import AutoTokenizer, pipeline
ModelFolder = "rautaditya/llama-3.2-1b-4bit-gptq"
tokenizer = AutoTokenizer.from_pretrained(ModelFolder)
pipe = pipeline(
"text-generation",
model=ModelFolder,
tokenizer=tokenizer,
device_map="auto"
)
prompt = "What is the meaning of life?"
generated_text = pipe(prompt, max_length=100)
print(generated_text)
from transformers import AutoTokenizer
from auto_gptq import AutoGPTQForCausalLM
model_name = "rautaditya/llama-3.2-1b-4bit-gptq"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoGPTQForCausalLM.from_pretrained(
model_name,
device_map="auto"
)
Please refer to the original Meta Llama 3.2 model license for usage restrictions and permissions.
If you use this model, please cite:
@misc{llama3.2_4bit_quantized,
title={Llama-3.2 1B 4-bit Quantized Model},
author={Raut, Aditya},
year={2024},
publisher={Hugging Face}
}