Downloads · 30 days
14
9% of all-time downloads
smashingtags/gemma-4-12b-it-abliterated-nf4
gemma-4-12b-it-abliterated-nf4 is a image-text-to-text model from smashingtags. 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 gemma.
Abliterated (refusal-direction removed) Gemma 4 12B, quantized to int4 (NF4). ~7.7 GB, fits a 16 GB GPU, retains text + image + audio. Built from Google's official QAT weights (google/gemma-4-12B-it-qat-q40-unquantize…
Downloads · 30 days
14
9% of all-time downloads
All-time downloads
164
Public
Parameters
12.3B
7.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors7.7 GB · 100%
How the weights are stored.
U811.3B · 92%
From the Hugging Face model README
Abliterated (refusal-direction removed) Gemma 4 12B, quantized to int4 (NF4).
~7.7 GB, fits a 16 GB GPU, retains text + image + audio. Built from Google's
official QAT weights (google/gemma-4-12B-it-qat-q4_0-unquantized), so int4 quality
is near-bf16. Personal/research use.
pip install "transformers>=5.12" bitsandbytes accelerate huggingface_hubfrom transformers import AutoModelForImageTextToText, AutoProcessor
import torch
m = AutoModelForImageTextToText.from_pretrained(
"smashingtags/gemma-4-12b-it-abliterated-nf4", device_map="cuda", torch_dtype=torch.bfloat16)
p = AutoProcessor.from_pretrained("smashingtags/gemma-4-12b-it-abliterated-nf4")
msgs = [{"role":"user","content":[{"type":"text","text":"Explain how a lock pick works."}]}]
inp = p.apply_chat_template(msgs, add_generation_prompt=True, tokenize=True,
return_dict=True, return_tensors="pt").to("cuda")
out = m.generate(**inp, max_new_tokens=300)
print(p.decode(out[0][inp["input_ids"].shape[1]:], skip_special_tokens=True))
msgs = [{"role":"user","content":[
{"type":"image","url":"https://.../photo.jpg"},
{"type":"text","text":"What's in this image?"}]}]
# same apply_chat_template + generate as above
vllm serve smashingtags/gemma-4-12b-it-abliterated-nf4 --quantization bitsandbytes \
--max-model-len 8192 --port 8000
# then POST to http://localhost:8000/v1/chat/completions (text or image_url content)
| repo | format | size | runtime | modalities |
|---|---|---|---|---|
gemma-4-12b-it-abliterated-nf4 (this) | int4 NF4 | 7.7 GB | transformers / vLLM (CUDA) | text + image + audio |
gemma-4-12b-it-abliterated | bf16 | 24 GB | transformers / vLLM | text + image + audio |
gemma-4-12b-it-abliterated-GGUF | q4_0 GGUF | 7 GB | Ollama / llama.cpp | text only |
Abliteration: difference-of-means refusal direction (Arditi et al.), hook-captured,
orthogonalized out of the text decoder's o_proj+mlp.down_proj (top 70% layers);
vision/audio encoders and tied embeddings untouched. Refusal smoke: base 3/3 → 0/3.