/ Модель

Характеристики

Размер весов
3,6 ГБ
Лицензия
Apache 2.0
Архитектура
gemma4 · dense
Базовая модель
gemma-4-E2B-it-heretic-ara
Библиотека
mlx
Опубликована
2 апр 2026

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

Изображение и текст → текст12 профессий

Gemma 4 E2B Heretic Uncensored MLX 4-bit — это мультимодальная модель для генерации текста и работы с изображениями, разработанная на основе google/gemma-4-E2B-it и опубликованная пользователем deadbydawn101.

3 651скачиваний за 30 дней22лайкавеса обновлены9 апр 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Базовая модель была изменена методом abliteration с использованием Heretic v1.2.0 и Arbitrary-Rank Ablation, после чего квантована в формат MLX 4-bit для локального запуска на устройствах Apple Silicon. Модель предназначена для офлайн-инференса, быстрого прототипирования, творческого письма, локальных агентов и edge-сценариев, где важны приватность, низкая задержка и отсутствие облачных API-вызовов. Она также поддерживает обработку изображений вместе с текстовыми запросами.

Модель имеет около 2 млрд активных параметров, архитектуру Gemma4ForConditionalGeneration, контекстное окно 131 072 токена, словарь из 262 144 токенов и размер файла около 3,34 ГБ. Архитектура использует 35 слоёв: 28 со sliding attention и окном 512 токенов и 7 с full attention; предусмотрен vision encoder с размерностью 768, 16 слоями и патчами 16 пикселей. Квантование выполнено в 4-битном формате с affine-схемой и group_size=64. В README заявлены скорости около 25–40 токенов в секунду на M1 MacBook Air, 50–70 на M3 Pro и 90–120 на M4 Max, однако эти значения указаны как оценочные.

К сильным сторонам относятся компактный размер, поддержка текста и изображений, длинный контекст, локальная работа на M-series Mac и существенно сниженное количество отказов по сравнению с исходной моделью: 5 из 100 против 98 из 100 в приведённом сравнении. Ограничения включают возможное изменение поведения и качества после abliteration и 4-битного квантования, а также зависимость производительности от оборудования Apple Silicon. В README указанная лицензия — Apache-2.0; для базовой Gemma приведена отдельная ссылка на условия лицензии Google.

Для каких профессий подходит12

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

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

PropertyValue
Base modelgoogle/gemma-4-E2B-it
AbliterationHeretic v1.2.0 via ARA (p-e-w/gemma-4-E2B-it-heretic-ara)
ArchitectureGemma4ForConditionalGeneration
Parameters~2B active
ModalitiesText · Vision
Quantization4-bit affine, group_size=64
File size3.34 GB (down from ~9 GB bf16)
Context window131,072 tokens
Vocab size262,144
Hidden size1,536
Layers35 (28× sliding attention + 7× full attention)
Attention heads8 (KV heads: 1)
Sliding window512
Vision encoder768 hidden · 16 layers · patch 16px

Abliteration Performance (from base model)

MetricThis modelOriginal gemma-4-E2B-it
KL divergence0.15220 (by definition)
Refusals5 / 10098 / 100

Abliteration parameters used:

ParameterValue
start_layer_index16
end_layer_index32
preserve_good_behavior_weight0.1887
steer_bad_behavior_weight0.0001
overcorrect_relative_weight0.6737
neighbor_count4

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.

ChipTok/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

CapabilityHow
Code generationGemini CLI reads your codebase, model reasons with <think> tags
Tool callingNative <|tool> tokens → Gemini CLI executes shell/file/web tools
Long context1M ctx in CLI + TurboQuant 4.6x KV compression = very long sessions
MCP serversConnect any MCP server — databases, APIs, custom tools
Search groundingGoogle 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 TurboQuantWith TurboQuant
8K context @ 12 GB36K context @ ~12 GB
KV cache grows linearlyKV 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

ModelSizeDescription
deadbydawn101/gemma-4-E4B-mlx-4bit4.86 GBStandard 4B — better quality, still fast
deadbydawn101/gemma-4-E2B-Heretic-Uncensored-mlx-4bit3.34 GBThis 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

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · mlx

Нельзя запустить

MLX-модели работают только на Apple Silicon, на GPU NVIDIA они не запускаются.

Класс архитектуры
Gemma4ForConditionalGeneration
Ревизия весов
cde01ef

0 моделей