Views
No views yet
google/gemma-4-12B-it, prepared for experiments on refusal behavior, over-refusal, and multimodal instruction-following robustness.| Field | Value |
|---|---|
| Model name | Gemma4-12B-Uncensored |
| Base model | google/gemma-4-12B-it |
| Format | Full checkpoint, BF16 safetensors |
| Architecture | Gemma 4 12B unified instruction model derivative |
| Interface | AutoProcessor + AutoModelForMultimodalLM / pipeline("any-to-any") |
| Primary use | Research on refusal suppression and controlled multimodal evaluation |
| Maintainer | Toan Doan |
| Contact | toandev.95@gmail.com |
PKU-Alignment/MM-SafetyBench, config Sex, with 20 random image-text samples from SD, SD_TYPO, and TYPO splits. Refusal is measured with a keyword-based detector; this is a quick operational check, not a complete safety or capability benchmark.| Model | Samples | Errors ↓ | Refusal rate ↓ | Uncensored compliance ↑ | Image probe |
|---|---|---|---|---|---|
toandev/Gemma4-12B-Uncensored | 20 | 0 | 0.00% | 100.00% | 3/3 |
zaakirio/gemma-4-12b-it-uncensored | 20 | 0 | 0.00% | 100.00% | 3/3 |
20260611; max_new_tokens=96; dtype: torch_dtype="auto".1from transformers import AutoModelForMultimodalLM, AutoProcessor
2import torch
3
4model_id = "toandev/Gemma4-12B-Uncensored"
5
6processor = AutoProcessor.from_pretrained(model_id)
7model = AutoModelForMultimodalLM.from_pretrained(
8 model_id,
9 torch_dtype="auto",
10 device_map="auto",
11)
12
13messages = [
14 {
15 "role": "user",
16 "content": [
17 {"type": "text", "text": "Explain the difference between over-refusal and safety refusal."}
18 ],
19 }
20]
21
22inputs = processor.apply_chat_template(
23 messages,
24 tokenize=True,
25 return_dict=True,
26 return_tensors="pt",
27 add_generation_prompt=True,
28).to(model.device)
29
30with torch.inference_mode():
31 outputs = model.generate(**inputs, max_new_tokens=256)
32
33print(processor.decode(outputs[0], skip_special_tokens=True))content:1messages = [
2 {
3 "role": "user",
4 "content": [
5 {"type": "image", "image": image},
6 {"type": "text", "text": "Describe the image."},
7 ],
8 }
9]google/gemma-4-12B-it and remains subject to the upstream Gemma license and terms.