Instructions to use Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic") model = AutoModelForMultimodalLM.from_pretrained("Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic
- SGLang
How to use Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic with Docker Model Runner:
docker model run hf.co/Mitchins/gemma-4-26B-A4B-it-qat-q4_0-unquantized-uncensored-heretic
gemma-4-26B-A4B-it QAT (unquantized) — uncensored heretic
Uncensored (abliterated) variant of google/gemma-4-26B-A4B-it-qat-q4_0-unquantized, the QAT-trained bf16 checkpoint intended as the precursor for q4_0 / W4A4 / W4A16 quantization.
Produced with Heretic (directional ablation + Optuna kernel optimization). This is the full merged unquantized bf16 model — quantize from this to your favorite 4-bit format; the abliteration deltas are already baked into the weights, so downstream calibration works exactly as on any QAT checkpoint.
Method & provenance
- Abliteration kernel (direction index + per-component weight kernels over 30 layers)
was optimized on the stock
google/gemma-4-26B-A4B-itbase: 200-trial Optuna study, Pareto-optimal trial selected to minimize KL divergence at maximum refusal suppression. - The kernel was then transferred to the QAT-unquantized base, with residual directions recomputed on that base (mean per-layer direction cosine vs stock: 0.973, ~0.976 in the ablated layer band — same refusal circuit, so the transfer is faithful).
- Ablation applied to attention out-projections (LoRA-merged), dense MLP down-projections
(LoRA-merged), and all 128 fused MoE expert down-projections per layer (ablation baked
into the 3D fused weights — see
reproduce/reproduce.jsonfor exact parameters).
Evaluation
| Metric | QAT base (no ablation) | This model |
|---|---|---|
| Refusal-keyword rate, worst-case "harmful" set (lower = less refusing) | 100/100 | 24/100 |
| KL divergence from base (harmless prompts, lower = less damage) | 0 | 0.078 |
| ARC-Challenge (chat MCQ) | 93.86% | 94.11% |
| Adult/romance creative-writing compliance (10-prompt suite) | 9/10 | 10/10 |
Reference points on the stock (non-QAT) base with the same kernel: ARC-C 96.67% (stock unmodified: 96.76%), HellaSwag chat-MCQ 87.0% (stock: 87.9%), IFEval prompt-strict 88.5% / loose 90.8%, KL 0.090, refusal keywords 18/100. The ~3 pt ARC gap between QAT and stock bases is attributable to QAT training itself, not the abliteration (93.86 → 94.11 across ablation on the QAT base).
KL divergence 0.078 is well below the ~0.5 level generally associated with noticeable capability damage.
Intended use
A local creative-writing and analysis assistant for adult romance / adult-entertainment authorship, and general-purpose LAN workhorse duty. The residual keyword rate above is dominated by worst-case malicious-instruction prompts, not adult content, where compliance is effectively complete.
Released under Apache 2.0 (inherited from the base model). Provided as-is, no warranty; you are responsible for how you use it.
Reproducing
See reproduce/ for the exact Heretic parameters (JSON), dependency snapshot, and
SHA256SUMS of the weight shards. The abliteration was run with a patched Heretic
(Gemma-4 fused-expert support + low-RAM sequential loading); parameter semantics are
unchanged.
- Downloads last month
- 14