Downloads · 30 days
13
13% of all-time downloads
OzzyGT/gemma_4_E4B_it_sdnq_dynamic_8bit
gemma_4_E4B_it_sdnq_dynamic_8bit is a any-to-any model from OzzyGT. Use it for the any-to-any task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
This is an int8 quantized version of google/gemma-4-E4B-it using SDNQ (SD.Next Quantization) with the dynamic option, Hadamard Rotation and quantized embeddings.
Downloads · 30 days
13
13% of all-time downloads
All-time downloads
103
Public
Parameters
7.9B
8.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8.7 GB · 100%
How the weights are stored.
I87.2B · 91%
From the Hugging Face model README
This is an int8 quantized version of google/gemma-4-E4B-it using SDNQ (SD.Next Quantization) with the dynamic option, Hadamard Rotation and quantized embeddings.
Note: You need SDNQ v0.2.1 or superior (the quantized embeddings + Hadamard path requires the nn.Embedding fix that landed in 0.2.1).
Load it with transformers like the original model. You need to import sdnq first so it registers into the transformers quantizer registry — without it, loading fails with a size-mismatch error:
import sdnq # registers the SDNQ quantizer into transformers
import torch
from transformers import AutoModelForImageTextToText, AutoProcessor
model_id = "OzzyGT/gemma_4_E4B_it_sdnq_dynamic_8bit"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(model_id, dtype=torch.bfloat16, device_map="cuda")
messages = [{"role": "user", "content": [{"type": "text", "text": "Explain quantization in one sentence."}]}]
inputs = processor.apply_chat_template(
messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt"
).to(model.device)
out = model.generate(**inputs, max_new_tokens=256)
print(processor.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))