Downloads · 30 days
10
8% of all-time downloads
WaveCut/gemma-3-1b-it-qat-int4-bnb-nf4
gemma-3-1b-it-qat-int4-bnb-nf4 is a text generation model from WaveCut. 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 google/gemma-3-1b-it-qat-int4-unquantized using BitsAndBytesConfig with NF4 quantization.
Downloads · 30 days
10
8% of all-time downloads
All-time downloads
122
Public
Parameters
1B
998 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors965 MB · 97%
How the weights are stored.
U8720M · 70%
From the Hugging Face model README
This model is a quantized version of google/gemma-3-1b-it-qat-int4-unquantized using BitsAndBytesConfig with NF4 quantization.
from transformers import BitsAndBytesConfig
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_use_double_quant=True,
bnb_4bit_compute_dtype=torch.bfloat16,
bnb_4bit_quant_storage=torch.uint8
)
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load the quantized model
model = AutoModelForCausalLM.from_pretrained(
"WaveCut/gemma-3-1b-it-qat-int4-bnb-nf4",
device_map="auto",
torch_dtype=torch.bfloat16,
trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained("WaveCut/gemma-3-1b-it-qat-int4-bnb-nf4")
# Generate text
inputs = tokenizer("Hello, how are you?", return_tensors="pt")
outputs = model.generate(**inputs, max_length=100)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
This model uses BitsAndBytesConfig for 4-bit quantization:
This model inherits the Apache 2.0 license from the base model.