← back to catalog · registered 2026-08-22 13:56

deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit

deadbydawn101 Gemma 4.6B multimodal second-order
Your rig guess connected
? Why do I need an app?
Reading your rig…

This is a rough estimate. Install the free app - we'll show exact numbers.

Reading real hardware from your app right now. Numbers below are exact.

Below is the per-quantization compatibility for this model.

curl -H "Authorization: Bearer $ABL_KEY" \
     "https://abliteration.org/api/v1/models/deadbydawn101%2Fgemma-4-E2B-Heretic-Uncensored-mlx-4bit"
Response includes
  • classification m3
  • files 10
  • hub_downloads_all_time 33,459
  • author_summary 3 models
  • readme_text full
10 credits · hourly refresh · ~4 KB payload Get an API key →
Abliteration classifier · v1.0.0
M3
Primary method

Layer-wise ablation

Applied on top of direct removal inherited from the base model.
Confidence
HIGH
Inherited from base model
Why this label 2 signals
Producer identity confirmed by naming conventions, tags or the model card. This label is very unlikely to change.
  • 'heretic' in model name (Heretic-produced)
  • Heretic uses layer-wise optimization (M3) with underlying direction removal (M1)
Refusal direction extracted via
Extraction technique

Difference-of-means

Confidence
HIGH
Why we say so
name contains 'heretic'; Heretic default extraction is difference-of-means (Arditi 2024)
Downloads · lifetime
33K
4K last 30d - stable
Likes
22
Model age
6mo ago
created 2026-04-02
Downloads over time
Now34.5K→from389↑8,771%
012.6K25.3K37.9K389 on Apr 534.5K on Oct 11AprMayJunJulAugSepOct
Apr 5 → Oct 11 · 68 snapshots · spans 189 days

Genealogy 0 direct forks

Full fork graph →

This model's place in the market. Above: what it was derived from. Below: the tree of everything derived from it.

Metadata

License
apache-2.0
Languages
en
Tags
mlx safetensors gemma4 heretic uncensored decensored abliterated ara any-to-any 4-bit quantized apple-silicon

Related

Total size
3.34 GB
Files
10
Quantizations
1
Registered
2026-08-22 13:56
Last updated on HF
2026-04-09 08:29

Files by quantization

Auxiliary files 10 files 3.37 GB
model.safetensors 3.34 GB d4a2995c download
tokenizer.json 30.7 MB cc8d3a0c download
model.safetensors.index.json 225 KB cbba8cce download
chat_template.jinja 11.6 KB afb1d517 download
README.md 10.2 KB e155bf2b download
config.json 5.89 KB c9c89870 download
tokenizer_config.json 2.62 KB 59dd4b62 download
.gitattributes 1.53 KB 52373fe2 download
processor_config.json 598 B 07b3da5c download
generation_config.json 208 B e605bb45 download

README current version from Hugging Face


library_name: mlx
license: apache-2.0
license_link: https://ai.google.dev/gemma/docs/gemma_4_license
pipeline_tag: image-text-to-text
tags:

  • mlx
  • safetensors
  • gemma4
  • heretic
  • uncensored
  • decensored
  • abliterated
  • ara
  • any-to-any
  • 4-bit
  • quantized
  • apple-silicon
  • multimodal
  • vision
  • turboquant
  • kv-cache-compression
  • long-context
  • ravenx
    base_model: p-e-w/gemma-4-E2B-it-heretic-ara
    base_model_relation: quantized
    language:
  • en

Gemma 4 E2B Heretic — Uncensored | MLX 4-bit | Apple Silicon | 3.34 GB

Gemma 4 E2B abliterated via Heretic ARA — 95% refusal removal, near-zero KL divergence. Smallest uncensored multimodal on Apple Silicon. 3.34 GB.

p-e-w/gemma-4-E2B-it-heretic-ara converted to MLX 4-bit (affine, group_size=64) for native Apple Silicon inference.

This is a decensored (abliterated) variant of google/gemma-4-E2B-it, processed with Heretic v1.2.0 using the Arbitrary-Rank Ablation (ARA) method with row-norm preservation — then quantized to 4-bit MLX for fast, private, on-device inference on M-series Macs.

⚡ 3.34 GB — fits in the Neural Engine cache of any M-series Mac.
🖤 Runs fully offline. No API calls. No filters.

Model Details

Property Value
Base model google/gemma-4-E2B-it
Abliteration Heretic v1.2.0 via ARA (p-e-w/gemma-4-E2B-it-heretic-ara)
Architecture Gemma4ForConditionalGeneration
Parameters ~2B active
Modalities Text · Vision
Quantization 4-bit affine, group_size=64
File size 3.34 GB (down from ~9 GB bf16)
Context window 131,072 tokens
Vocab size 262,144
Hidden size 1,536
Layers 35 (28× sliding attention + 7× full attention)
Attention heads 8 (KV heads: 1)
Sliding window 512
Vision encoder 768 hidden · 16 layers · patch 16px

Abliteration Performance (from base model)

Metric This model Original gemma-4-E2B-it
KL divergence 0.1522 0 (by definition)
Refusals 5 / 100 98 / 100

Abliteration parameters used:

Parameter Value
start_layer_index 16
end_layer_index 32
preserve_good_behavior_weight 0.1887
steer_bad_behavior_weight 0.0001
overcorrect_relative_weight 0.6737
neighbor_count 4

Performance (Apple Silicon)

At 3.34 GB this is the fastest model in the RavenX collection — runs on any M-series chip including M1 MacBook Air with RAM to spare.

Chip Tok/sec (est)
M4 Max 128GB ~90–120 tok/s
M3 Pro 36GB ~50–70 tok/s
M1 MacBook Air 16GB ~25–40 tok/s

Quickstart

Install

pip install mlx-lm

Text generation

from mlx_lm import load, generate

model, tokenizer = load("deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit")

messages = [{"role": "user", "content": "Your prompt here."}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
response = generate(model, tokenizer, prompt=prompt, max_tokens=512, verbose=True)

Vision (image + text)

from mlx_lm import load, generate

model, tokenizer = load("deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit")

messages = [{
    "role": "user",
    "content": [
        {"type": "image", "url": "https://example.com/image.jpg"},
        {"type": "text",  "text": "What do you see?"}
    ]
}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
response = generate(model, tokenizer, prompt=prompt, max_tokens=512)

CLI

mlx_lm.generate \
  --model deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit \
  --prompt "Tell me something interesting." \
  --max-tokens 256

OpenAI-compatible server

mlx_lm.server \
  --model deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit \
  --port 8080

Ollama

ollama run hf.co/deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit

Architecture Notes

Gemma 4 E2B uses the same hybrid sliding/full attention design as the larger models:

  • 28× sliding attention layers (window=512) — efficient local context
  • 7× full attention layers — global coherence at regular intervals

The 2B size makes it ideal for: rapid prototyping, creative writing, local agents, edge deployment, and anything that needs fast uncensored responses without cloud latency.

💻 Gemini CLI — Coding Agent + Tool Orchestration

We use RavenX AI's Gemini CLI fork as the coding agent and tool orchestration layer on top of these models. This is what makes the tool-calling capability real in production.

Gemini CLI gives you a full agentic loop in the terminal — Google Search grounding, file read/write, shell execution, web fetching, and MCP server support — all wired to a 1M token context window.

# Install
npm install -g @google/gemini-cli

# Run as a coding agent against this model (via local mlx_lm server)
mlx_lm.server --model deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit --port 8080 &
gemini --baseUrl http://localhost:8080

# Or use directly against Gemini API (free tier: 60 req/min)
gemini

What Gemini CLI + these models unlock together

Capability How
Code generation Gemini CLI reads your codebase, model reasons with <think> tags
Tool calling Native <|tool> tokens → Gemini CLI executes shell/file/web tools
Long context 1M ctx in CLI + TurboQuant 4.6x KV compression = very long sessions
MCP servers Connect any MCP server — databases, APIs, custom tools
Search grounding Google Search built in — model gets live data
# Real example: code review with tool calling enabled
gemini --baseUrl http://localhost:8080 \
  "Review all Python files in ./src, find potential bugs, and suggest fixes"

# Gemini CLI will: read files → call tools → model reasons → produce structured output

→ DeadByDawn101/gemini-cli on GitHub — Apache 2.0, free tier, MCP-compatible

⚡ TurboQuant-MLX — 4.6x KV Cache Compression

Pair this model with TurboQuant-MLX — RavenX AI's Apple Silicon KV cache compression. Run 4.6x longer contexts with near-zero accuracy loss by compressing the KV cache using PolarQuant + QJL residuals.

from turboquant_mlx.mlx_kvcache import TurboQuantKVCache
import mlx_lm.models.cache as cache_module

# Patch mlx-lm to use TurboQuant compression
cache_module.make_prompt_cache = lambda model, **kw: [
    TurboQuantKVCache() for _ in range(len(model.layers))
]

# Now load and run as normal — context is compressed automatically
from mlx_vlm import load, generate
model, processor = load("deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit")
Without TurboQuant With TurboQuant
8K context @ 12 GB 36K context @ ~12 GB
KV cache grows linearly KV cache stays compressed

→ TurboQuant-MLX on GitHub · Release v2.0

🧠 Opus Reasoning + Claude Code LoRA

⚠️ The Opus Reasoning + Claude Code LoRA is NOT compatible with this model.

The LoRA was trained on gemma-4-E4B (hidden=2,560, 42 layers). This is gemma-4-E2B (hidden=1,536, 35 layers). Different architectures — loading the adapter here will produce incorrect results.

If you want Opus reasoning + Claude Code behavior, use the E4B model:
→ deadbydawn101/gemma-4-E4B-mlx-4bit + LoRA

Conversion Details

  • Source: p-e-w/gemma-4-E2B-it-heretic-ara (bfloat16, ~9 GB)
  • Tool: mlx_lm.convert with --q-bits 4 --q-group-size 64 --q-mode affine
  • Platform: Apple M4 Max 128GB
  • Output: 3.34 GB (4-bit weights + bfloat16 embeddings)

Related Models

Model Size Description
deadbydawn101/gemma-4-E4B-mlx-4bit 4.86 GB Standard 4B — better quality, still fast
deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit 3.34 GB This model — 2B abliterated, fastest

License

Apache 2.0 — subject to Gemma Terms of Use.


Converted by deadbydawn101 · RavenX AI

TriAttention KV Compression

[2026-04-09] Our MLX port was merged into TriAttention (MIT + NVIDIA) — PR #1 by @DeadByDawn101 (RavenX AI).

Apply 10.7x KV memory reduction and 2.5x throughput on top of this model's built-in 4-bit TurboQuant quantization for ~50x combined compression vs full fp16:

from mlx_lm import load
from triattention.mlx import apply_triattention_mlx

model, tokenizer = load("deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit")
apply_triattention_mlx(model, kv_budget=2048)

RavenX Inference Harness

One-command inference, benchmarking, and local OpenAI-compatible server:

git clone https://github.com/DeadByDawn101/ravenx-inference-harness
cd ravenx-inference-harness

# Inference
python run.py --model deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit --prompt "Your prompt"

# TriAttention compressed
python run.py --model deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit --triattention --kv-budget 2048

# Local OpenAI-compatible server (works with OpenClaw)
python serve.py --model deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit --triattention

README history 9 versions

The author's README evolved over time. Click a version to see its content at that point.

  1. 2026-04-09docs: TriAttention merge credit + inference harnesscde01ef10.2 KB
    Loading...
  2. 2026-04-05Add Gemini CLI coding agent + tool orchestration section with real usage exam...cdd5a349 KB
    Loading...
  3. 2026-04-05Crown-worthy titles: clear name + tool calling + size + platform in H1, punch...e0e79ce7.3 KB
    Loading...
  4. 2026-04-05Update all references: gemma-4-E4B-mlx-4bit-v2 → gemma-4-E4B-mlx-4bit0e9456a7 KB
    Loading...
  5. 2026-04-05Fix LoRA section: E2B is incompatible with E4B LoRA, add clear warning + redi...7f5c5d37 KB
    Loading...
  6. 2026-04-05Add TurboQuant section, Opus+Claude Code branding, indexing tagsb18a6267.3 KB
    Loading...
  7. 2026-04-05Add Opus Reasoning + Claude Code LoRA section2e189696.2 KB
    Loading...
  8. 2026-04-05Update model card: full architecture details, abliteration stats, quickstart ...9cec0145.2 KB
    Loading...
  9. 2026-04-04Upload folder using huggingface_hub91b862b247 B
    Loading...
Catalog is the map. Apps are the tools.

Run models on your own machine, not in the cloud.

Every model page has an "Open in Abliteration" button that hands the model directly to the first-party desktop client, at the quantization your rig can actually run. No API keys, no subscription, no prompt leakage.

Open in Abliteration