Downloads · 30 days
5
3% of all-time downloads
suitch/gemma-4-31B-it-4bit
gemma-4-31B-it-4bit is a image-text-to-text model from suitch. Use it for the image-text-to-text task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
4-bit NF4 quantized version of google/gemma-4-31b-it using bitsandbytes with double quantization.
Downloads · 30 days
5
3% of all-time downloads
All-time downloads
178
Public
Parameters
32.2B
18.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors18.3 GB · 100%
How the weights are stored.
U830.8B · 96%
From the Hugging Face model README
4-bit NF4 quantized version of google/gemma-4-31b-it using bitsandbytes with double quantization.
import torch
from transformers import AutoProcessor, AutoModelForCausalLM, BitsAndBytesConfig
model_id = "suitch/gemma-4-31B-it-4bit"
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
trust_remote_code=True,
)
# Video inference
messages = [
{"role": "user", "content": [
{"type": "video", "video": "path/to/video.mp4"},
{"type": "text", "text": "Describe what you see in this video."}
]}
]
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = processor(text=text, videos=["path/to/video.mp4"], return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=False)
print(processor.parse_response(response))