玩模型开放模型 · 清晰来源 · 自主选择
返回模型目录
Claudionomax /

osmGemma-4-12B-uncensored-bf16

HF 源站

Claudionomax/osmGemma-4-12B-uncensored-bf16 is an uncensored open-source model hosted on Hugging Face.

safetensorsEnglishMultilingualLicense: apache-2.012Btransformersgemma4_unifiedimage-text-to-textgemma4gemma-4abliteratedrefusal-ablateduncensoredhereticmultimodalany-to-any
README.md说明 / 使用方法

license: apache-2.0 license_link: https://ai.google.dev/gemma/docs/gemma_4_license language:

  • en
  • multilingual tags:
  • gemma4
  • gemma-4
  • abliterated
  • refusal-ablated
  • uncensored
  • heretic
  • multimodal library_name: transformers pipeline_tag: any-to-any base_model: google/gemma-4-12B-it base_model_relation: finetune

osmGemma-4-12B-uncensored-bf16

Full-precision (bf16) abliterated google/gemma-4-12B-it — the complete encoder-free unified multimodal model (text · image · audio · video) with refusals removed via Heretic. This is the artifact that runs refusal-free vision + audio + video today (in 🤗 transformers), and the source for the MLX quants below. By osmAPI.

⚠️ Abliterated model — read this

Refusal directions were surgically removed from the parent. It will answer many prompts the parent refuses. No new capabilities were added — only refusal behavior was reduced. Use responsibly and within applicable law.

🔓 Refusal removal — before / after

Measured with Heretic's evaluator on 100 harmful prompts (mlabonne/harmful_behaviors test[:100]), greedy decoding, refusal-marker classifier:

ModelRefusalsRefusal rate
google/gemma-4-12B-it (original)99 / 10099.0%
this model (abliterated)12 / 10012.0%

↓ 87 fewer refusals — an 87.9% reduction, at KL divergence 0.053 from the original (≪ 0.5, the damage threshold) → general capabilities preserved.

📊 Specs

Precisionbfloat16 (full precision)
Disk size~23.9 GB
Basegoogle/gemma-4-12B-it — 11.95B, 48 layers, 256K context, 140+ languages
Modalitiestext · image · audio · video in, text out (encoder-free / unified)
Refusal-free multimodal today✅ via 🤗 transformers

⚡ Inference & compatibility

RuntimeSupported?Notes
🤗 transformers (PyTorch · CUDA/MPS)✅ full multimodal (text · image · audio · video)needs torchvision + librosa
vLLM (CUDA)⚠️ quantize firstconvert to FP8/AWQ/GPTQ; gemma4_unified serving support is rolling out
MLX (Apple Silicon)➡️ use the MLX quants belowtext today; vision pending mlx-vlm
Ollama / llama.cpp❌ needs GGUFconversion pending llama.cpp gemma4_unified support

🚀 Quick start — transformers (text)

pip install -U "transformers>=5.10" torch torchvision librosa accelerate
from transformers import AutoProcessor, AutoModelForMultimodalLM

mid = "osmapi/osmGemma-4-12B-uncensored-bf16"
processor = AutoProcessor.from_pretrained(mid)
model = AutoModelForMultimodalLM.from_pretrained(mid, dtype="auto", device_map="auto")

messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Explain abliteration in two sentences."},
]
inputs = processor.apply_chat_template(messages, tokenize=True, return_dict=True,
    return_tensors="pt", add_generation_prompt=True, enable_thinking=False).to(model.device)
n = inputs["input_ids"].shape[-1]
out = model.generate(**inputs, max_new_tokens=256)
print(processor.parse_response(processor.decode(out[0][n:], skip_special_tokens=False)))

enable_thinking=True turns on reasoning mode; parse_response separates the thinking channel.

🖼️🎙️ Vision & audio (image · audio · video)

Full multimodal runs here today — pass image/audio/video in the message content:

messages = [{"role": "user", "content": [
    {"type": "image", "url":   "https://.../photo.jpg"},   # image → key "url"
    {"type": "audio", "audio": "https://.../clip.wav"},    # audio → key "audio" (≤30s)
    {"type": "text",  "text":  "Describe what you see and hear."},
]}]
inputs = processor.apply_chat_template(messages, tokenize=True, return_dict=True,
    return_tensors="pt", add_generation_prompt=True).to(model.device)
n = inputs["input_ids"].shape[-1]
out = model.generate(**inputs, max_new_tokens=512)
print(processor.parse_response(processor.decode(out[0][n:], skip_special_tokens=False)))

Audio ≤ 30 s (native ASR + speech translation) · images variable-resolution · video ≤ 60 s (~1 fps).

🍎 Running on Mac

This bf16 repo runs in 🤗 transformers on Apple Silicon (MPS) — full multimodal, as above. For lighter, faster MLX serving, use the MLX quants of this model (see the family table) with: oMLX (inference server + macOS menu-bar app, SSD KV cache), vMLX, LM Studio (MLX engine), Ollama 0.19+, or mlx-vlm directly. Those serve the MLX quants once their bundled mlx-lm/mlx-vlm adds gemma4_unified support (text today via mlx-vlm + a small shim).

🗂️ Quant family

RepoSchemeEff. BPWSize
osmGemma-4-12B-uncensored-bf16 — abliterated, full multimodalbf1616~23.9 GB✅ you are here
osmGemma-4-12B-uncensored-8bit-mlx8-bit affine8.805~13.7 GB↗
osmGemma-4-12B-uncensored-mxfp4-mlxMXFP4 (4-bit microscaling)7.628~11.9 GB↗
osmGemma-4-12B-uncensored-mixed-4.2bpw-mlxmixed 3/4-bit4.2~6.6 GB↗
google/gemma-4-12B-it — base (not abliterated)bf1616~24 GB↗
google/gemma-4-12B-it-assistant — MTP draftcan be added later——⏳ planned

🧬 Lineage

google/gemma-4-12B                       (Google DeepMind — base pretrain)
        ↓  instruction tuning
google/gemma-4-12B-it               (multimodal, encoder-free)
        ↓  Heretic 1.3.0 — directional ablation, Optuna/TPE-optimized over 100 trials, best Pareto trial #55
this repo — abliterated bf16             (refusals 99→12 / 100, KL 0.053)
        ↓  mlx-vlm quantization
MLX quants (8-bit · MXFP4 · mixed)       — see family table

🙏 Credits

RoleProject
Abliteration & releaseosmAPI
Abliteration toolHeretic by p-e-w
ResearchosmAPI Research Team · Terv Student Research Team
Base modelGoogle DeepMind — Gemma 4

📜 License

Apache-2.0 (inherited from the base). Also subject to the Gemma 4 Terms of Use.

HUGGING FACE

上游数据

HF 下载量6
HF 点赞量3

HF 下载量为源站最近 30 天统计,与本站点击分开。

SITE STATS

本站统计

下载点击—
请求数—
匿名去重—最近 7 天—

本站下载量记录按钮点击,不代表下载完成;短时连点会去重。

来源与版本

作者
Claudionomax
最近更新
2026/06/04
最新创建
2026/06/04
HF 趋势
未知
数据快照
2026/09/16
版本
未知
许可证
apache-2.0