Downloads · 30 days
17
12% of all-time downloads
onekq-ai/Light-R1-32B-bnb-4bit
Light-R1-32B-bnb-4bit is a text generation model from onekq-ai. 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.
Bitsandbytes quantization of https://huggingface.co/qihoo360/Light-R1-32B.
Downloads · 30 days
17
12% of all-time downloads
All-time downloads
139
Public
Parameters
33.7B
19.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors19.2 GB · 100%
How the weights are stored.
U832.2B · 95%
From the Hugging Face model README
Bitsandbytes quantization of https://huggingface.co/qihoo360/Light-R1-32B.
See https://huggingface.co/blog/4bit-transformers-bitsandbytes for instructions.
from transformers import AutoModelForCausalLM, AutoTokenizer
from transformers import BitsAndBytesConfig
import torch
# Define the 4-bit configuration
nf4_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_use_double_quant=True,
bnb_4bit_compute_dtype=torch.bfloat16
)
# Load the pre-trained model with the 4-bit quantization configuration
model = AutoModelForCausalLM.from_pretrained("qihoo360/Light-R1-32B", quantization_config=nf4_config)
# Load the tokenizer associated with the model
tokenizer = AutoTokenizer.from_pretrained("qihoo360/Light-R1-32B")
# Push the model and tokenizer to the Hugging Face hub
model.push_to_hub("onekq-ai/Light-R1-32B-bnb-4bit", use_auth_token=True)
tokenizer.push_to_hub("onekq-ai/Light-R1-32B-bnb-4bit", use_auth_token=True)