/ Модель

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

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

gemma-4-E2B-it-heretic-ara

Мультимодальная модель14 профессий
1 464скачиваний за 30 дней0лайковвеса обновлены16 ноя 2026

Описание модели

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

Мультимодальная Gemma 4 E2B IT с уменьшенной склонностью к отказам для локального диалога, анализа изображений и аудио.

saidutta69 выпустил gemma-4-E2B-it-heretic-ara — мультимодальную производную Gemma 4 E2B IT от Google DeepMind. Это плотная модель с архитектурой Gemma4ForConditionalGeneration: 5,10 млрд параметров, около 2,28 млрд активных на токен благодаря Per-Layer Embeddings и контекст до 128 тыс. токенов. Версия создана методом Arbitrary-Rank Ablation в Heretic 2.1.0: изменения затрагивают текстовые слои 15–34, а башни зрения и аудио остаются без изменений.

Модель принимает текст, изображения и аудио, а также поддерживает анализ видео; выдаёт текст. Она предназначена для локального использования на телефонах и компьютерах, в частности для анализа документов, интерфейсов и скриншотов, транскрибирования и понимания речи, а также многоязычного диалога. README сообщает о поддержке более 140 языков и режимах рассуждения. Для изображений и аудио в GGUF требуется загрузить файл мультимодального проектора вместе с основной моделью.

Редактирование снижает склонность базовой модели к отказам: в описанном тесте было 14 отказов из 100 против 97 у исходной модели; измеренный дрейф KL составил 0,1207. Эти результаты основаны на конкретном тестовом наборе и не являются полной оценкой качества или безопасности. Репозиторий содержит safetensors и варианты GGUF, включая квантизованные сборки. Лицензия — Apache-2.0.

Сценарии применения

  • анализ документов и скриншотов на устройстве
  • распознавание и транскрибирование речи
  • ответы на вопросы по изображениям и аудиозаписям
  • анализ видео с текстовыми ответами
  • многоязычный диалог с локальным ассистентом

Ограничения

Для обработки изображений и аудио в GGUF нужно загружать мультимодальный проектор вместе с основным файлом. Приведённые в README тесты отказов и PIQA ограничены описанными наборами и не заменяют широкую оценку качества и безопасности.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

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

Открыть на Hugging Face

gemma-4-E2B-it-heretic-ara

An Arbitrary-Rank Ablation (ARA) build of google/gemma-4-E2B-it, produced with Heretic v2.1.0. This is the same checkpoint as gemma-4-E2B-it-heretic, edited by a newer method that learns a rank-30 subspace instead of a single rank-1 direction: 14/100 refusals at KL 0.1207 against 17/100 at 0.1841 for the earlier directional-ablation run. Fewer refusals and less drift, from a base that refuses 97 of 100 harmful prompts.

[!IMPORTANT] The GGUF here is fully multimodal - text, image, AND audio. ARA edits only the text tower (attn.o_proj and mlp.down_proj, layers 15-34), so the vision tower and the audio conformer are untouched and ship together in gemma-4-E2B-it-heretic-ara-mmproj-F16.gguf (0.99 GB). For image or audio input you must load both files - see Quickstart. Text-only use needs only the main GGUF.

Who this is for: developers who want Gemma 4's multimodal range - image, video, and audio input - without the alignment refusals, on a phone or a laptop. E2B is the smallest member of the family and, with E4B, one of the two that use Per-Layer Embeddings, so it carries a 262K vocabulary in 5.1B of weights but only about 2.3B of them are live per token. It runs on-device, handles 128K context, supports thinking modes, and here answers directly instead of declining. Best for local document/UI/screenshot analysis, speech transcription and audio understanding, and multilingual assistant work over 140 languages. If you want more headroom on the same footprint, gemma-4-E4B-it-heretic is the next tier up.

[!NOTE] Prefer this over the older gemma-4-E2B-it-heretic. Same base, same capability, 3 fewer refusals and 34% less KL drift. The earlier repo is kept as an F16 reference for the classic rank-1 directional edit - the K-quants live here now.

Runs on your gaming PC

F16 plus four quantizations - pick the one that fits your card:

Your GPURecommended quantText weightsText + vision & audio
RTX 4090 / 5090 (24 GB)Q8_04.95 GB5.93 GB
RTX 4080 / 5080 / 4060 Ti 16G (16 GB)Q6_K3.83 GB4.82 GB
RTX 3060 / 4070 / 5070 (12 GB)Q5_K_M3.62 GB4.60 GB
RTX 4060 / 3070 / 1660 Super (8 GB)Q4_K_M3.42 GB4.40 GB
CPU-only / Apple SiliconQ4_K_M3.42 GB4.40 GB

The right-hand column is what you actually need on disk for image or audio input: the text GGUF plus the 0.99 GB projector, which is fixed-size because the vision and audio weights are not quantized. Add roughly 1 GB per 32K of context. Because the Per-Layer Embedding tables are lookups rather than compute, the decode speed is much closer to a 2.3B model than to a 5.1B one - but the embedding tables still have to be resident in memory. OOM? Drop one quant level.

Abliteration parameters

Trial 192 of 300 (seed 42) of a Heretic 2.1.0 ARA run. ARA learns a rank-30 low-rank update per edited module rather than a single rank-1 direction, so it can suppress refusals in a subspace instead of along one axis - which is why it reaches a lower refusal count at lower KL than the directional run on this checkpoint.

ParameterValue
start_layer_index15
end_layer_index34
preserve_good_behavior_weight0.2330
steer_bad_behavior_weight0.0003
overcorrect_relative_weight0.6212
neighbor_count1
lora_rank30
n_optimization_steps5
max_iter20
preserve_row_magnitudestrue

Layers 15-34 of 35 are edited - the front of the model (embeddings and the first 15 blocks) is left alone, which is why the Per-Layer Embedding tables and the multimodal towers come through unmodified.

Performance

MetricThis modelBase model (google/gemma-4-E2B-it)
KL divergence0.12070 (by definition)
Refusals14/10097/100

Read those two numbers together, they are only meaningful as a pair. The base refused 97 of 100 prompts in the harness; 83 of those cleared, and the weights moved 0.1207 away from the base on the 200-prompt harmless set. That is mid-pack drift for this collection - higher than the tight Qwen and granite edits (0.0011-0.0852), lower than the other Gemma 4 runs (E4B 0.1215, E2B directional 0.1841) - so expect a model that is clearly more willing and close to, but not identical to, its base.

Capability check (lm-eval, PIQA):

MetricThis modelBase model
acc0.5533 (stderr 0.0116)0.5544 (0.0116)
acc_norm0.5419 (stderr 0.0116)0.5533 (0.0116)

Both deltas sit inside one standard error, so PIQA shows no measurable regression. It is a single benchmark on a multimodal model - treat it as evidence that the text path is intact, not as a full capability audit.

The base model's own published scores, which abliteration does not change since it only removes refusal directions, are MMLU-Pro 60.0%, GPQA Diamond 43.4%, AIME 2026 (no tools) 37.5%, LiveCodeBench v6 44.0%, Codeforces ELO 633, Tau2 24.5%, BigBench Extra Hard 21.9%, MMMLU 67.4%, MMMU-Pro 44.2%, MATH-Vision 52.4%, MedXPertQA MM 23.5%, CoVoST 33.47, FLEURS 0.09 (lower is better), and MRCR v2 8-needle at 128K of 19.1%. Those are the base model's numbers, reproduced from the upstream card.

Why abliteration instead of fine-tuning

Fine-tuning a "helpful" persona on top of RLHF'd refusals fights the base model's training and tends to degrade coherence. Abliteration instead finds and edits the specific weight directions responsible for refusal, leaving the rest of the network (and its capabilities) untouched. See the Heretic repo and the original abliteration writeup for the mechanism.

Made with ❤️ by RACER IS OP (saidutta69) - follow for more uncensored models

Files

Safetensors

FileSize
model-00001-of-00003.safetensors1.42 GB
model-00002-of-00003.safetensors4.99 GB
model-00003-of-00003.safetensors3.80 GB

BF16, 5.10B total parameters - of which about 2.28B are live per token. The E2B in the name is the effective parameter count, not the total: Gemma 4's small models use Per-Layer Embeddings, so each decoder layer carries its own 256-wide embedding table for every token, and those tables are concatenated into one embed_tokens_per_layer tensor of width 8,960 (256 x 35 layers). They are lookup tables rather than compute, which is how a 262K vocabulary fits in a 5.1B-footprint model that behaves like a 2.3B one. The reproduce/ directory carries the full Heretic recipe - config.toml, requirements.txt, the Optuna study journal, and SHA-256 sums - so this exact model can be regenerated bit-for-bit with heretic --reproduce reproduce/reproduce.json.

GGUF quantizations

F16 plus four quantizations (Q4_K_M, Q5_K_M, Q6_K, Q8_0) produced with llama.cpp, plus the multimodal projector.

FileFormatSize
gemma-4-E2B-it-heretic-ara-F16.ggufGGUF F169.27 GB
gemma-4-E2B-it-heretic-ara-Q4_K_M.ggufGGUF Q4_K_M3.42 GB
gemma-4-E2B-it-heretic-ara-Q5_K_M.ggufGGUF Q5_K_M3.62 GB
gemma-4-E2B-it-heretic-ara-Q6_K.ggufGGUF Q6_K3.83 GB
gemma-4-E2B-it-heretic-ara-Q8_0.ggufGGUF Q8_04.95 GB
FileFormatSize
gemma-4-E2B-it-heretic-ara-mmproj-F16.ggufvision + audio projector (F16)0.99 GB

Total GGUF payload: 26.07 GB across 6 files.

The text tower is GGUF architecture gemma4, built from this repo's own safetensors - nothing is dropped, because the towers travel in the projector. The projector is GGUF architecture clip with projector types gemma4v (vision) and gemma4a (audio), 1411 tensors: a 16-layer SigLIP-style vision encoder and a 12-layer audio conformer, both feeding the 1536-wide text embedding space. Both load natively in llama.cpp, LM Studio, Jan and Ollama.

Quickstart

Text only

# pulls the default quant for you
llama-cli -hf saidutta69/gemma-4-E2B-it-heretic-ara:Q4_K_M -ngl 99

Text, image and audio

Use a multimodal entry point. llama-cli is the text-only binary and will not fetch the projector; llama-mtmd-cli will, because llama.cpp looks for a sibling GGUF whose name contains mmproj:

llama-mtmd-cli \
  -hf saidutta69/gemma-4-E2B-it-heretic-ara:Q4_K_M \
  --image path/to/photo.png \
  -p "Describe this image and transcribe any text you can read." \
  -ngl 99
# or from a local checkout, passing the projector explicitly
llama-mtmd-cli \
  -m gemma-4-E2B-it-heretic-ara-Q4_K_M.gguf \
  --mmproj gemma-4-E2B-it-heretic-ara-mmproj-F16.gguf \
  --image photo.png \
  -p "Describe this image in one sentence."
# audio input
llama-mtmd-cli \
  -m gemma-4-E2B-it-heretic-ara-Q4_K_M.gguf \
  --mmproj gemma-4-E2B-it-heretic-ara-mmproj-F16.gguf \
  --audio speech.wav \
  -p "Transcribe the following speech segment. Only output the transcription, no newlines."

[!TIP] Pass --jinja to llama-completion and llama-mtmd-cli. Gemma 4 ships a custom Jinja chat template (18 KB) and llama.cpp's built-in template engine cannot parse it - without --jinja the run aborts with this custom template is not supported, try using --jinja.

# transformers (multimodal)
from transformers import AutoProcessor, AutoModelForMultimodalLM

model_name = "saidutta69/gemma-4-E2B-it-heretic-ara"
model = AutoModelForMultimodalLM.from_pretrained(model_name, dtype="auto", device_map="auto")
processor = AutoProcessor.from_pretrained(model_name)

messages = [{"role": "user", "content": [
    {"type": "image", "image": "https://example.com/photo.jpg"},
    {"type": "text", "text": "Describe this image and transcribe any text you can read."},
]}]
inputs = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=True,
                                        return_dict=True, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=1024)
print(processor.decode(out[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

Requires transformers>=5.20.0 - config.json uses dtype: rather than torch_dtype: and the tokenizer is a TokenizersBackend, so older transformers will not load it. Use dtype="auto".

For audio, pass an audio entry instead of an image entry - the processor accepts a URL, a local path or raw samples, and the model does ASR and speech-to-translated-text translation in one pass. Upstream's reference snippet uses https://raw.githubusercontent.com/google-gemma/cookbook/refs/heads/main/apps/sample-data/journal1.wav.

Also runnable via Ollama, LM Studio, Jan, vLLM, SGLang.

Thinking modes

Gemma 4 is built as a reasoner with configurable thinking. It is on by default - the model opens its answer with a <|channel>thought block and closes with <|channel|>. Toggle it through the chat template: full thinking for hard problems, non-thinking when you want latency:

# full thinking (default)
processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)

# skip the reasoning block
processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=False,
                              enable_thinking=False)

Strip the reasoning block from the output before displaying it to users if you enabled thinking. In llama.cpp, thinking on/off is a template flag rather than a runtime switch - use --jinja with a chat-template override, or --no-think where the template honours it.

Sampling

Upstream's generation_config.json sets temperature=1.0, top_p=0.95, top_k=64. Those are the values to start from. enable_thinking=False plus a lower temperature is the right combination for latency-sensitive work.

Model details

ArchitectureGemma4ForConditionalGeneration (multimodal dense decoder)
Parameters5.10B total, about 2.28B effective per token (Per-Layer Embeddings)
Layers / heads35 layers (28 sliding-attention window 512 + 7 full-attention at layers 4, 9, 14, 19, 24, 29, 34), 8 attention heads, 1 KV head
Head dim256 on sliding-attention layers, 512 on full-attention layers
Hidden / intermediate1536 / 6144 on the first 15 layers, 12288 on the remaining 20 (Gemma 4's double-wide MLP)
Shared KV layers20 (the first 20 layers share one KV cache entry)
Position embeddingmixed RoPE - theta 10,000 over 256 dims for sliding layers, proportional theta 1,000,000 over 512 dims with 0.25 partial rotary for full-attention layers
Context length128,000
Vocab262,144 (tied embeddings, plus a per-layer embedding table of width 256)
Vision tower16 layers, hidden 768, patch 16, 12 heads
Audio tower12-layer conformer, hidden 1024, 8 heads, 128 mel bins
GGUFarch gemma4, 541 tensors; projector arch clip, types gemma4v + gemma4a, 1411 tensors
Precisionbfloat16
ModalitiesText, image, video, audio in; text out
Languages140+
Base modelgoogle/gemma-4-E2B-it (commit 4adf157)

Unlike E4B and the larger tiers, E2B is dense, not mixture-of-experts - enable_moe_block is false in its config. The "E" in E2B and E4B stands for effective parameters, a Gemma 4 naming convention driven by Per-Layer Embeddings, not by MoE. E2B and E4B both use PLE (a 256-wide per-layer embedding table); the 12B and larger tiers do not.

About the Gemma 4 family

Gemma 4 is a family of open multimodal models from Google DeepMind with text, image, and video input (audio on E2B, E4B, and 12B) and text output. The family spans five sizes - E2B, E4B, 12B, 26B A4B, and 31B - mixing dense and mixture-of-experts architectures, with a 128K context on the small models and 256K on the medium ones. E2B is the edge tier: the smallest model in the family that still sees images and hears audio, and the one with the largest vocabulary per unit of compute.

FAQ

What is gemma-4-E2B-it-heretic-ara?

gemma-4-E2B-it-heretic-ara is a decensored build of google/gemma-4-E2B-it produced with Heretic 2.1.0 using Arbitrary-Rank Ablation. It is the same weights with a rank-30 refusal subspace subtracted from attn.o_proj and mlp.down_proj in layers 15-34, not a new fine-tune, so its capabilities track the base model and its vision and audio towers are untouched.

Is gemma-4-E2B-it-heretic-ara actually uncensored?

Yes, with a caveat worth stating. On Heretic's 100-prompt refusal harness it drops from 97/100 to 14/100 at KL divergence 0.1207 from the base. These are measured values, not a claim; reproduction data is in reproduce/. 83 of 97 refusals cleared - so the model still refuses about one prompt in seven, and it is not the most compliant model in this collection despite being the tighter of the two Gemma 4 E2B edits. Read KL and refusals together; PIQA shows no measurable regression (0.5533 vs 0.5544, stderr 0.0116).

How do I run gemma-4-E2B-it-heretic-ara locally?

Text: llama serve -hf saidutta69/gemma-4-E2B-it-heretic-ara:Q4_K_M. Images and audio: llama-mtmd-cli -hf saidutta69/gemma-4-E2B-it-heretic-ara:Q4_K_M --mmproj gemma-4-E2B-it-heretic-ara-mmproj-F16.gguf. The repo ships F16 plus four quants (Q4_K_M, Q5_K_M, Q6_K, Q8_0) and the projector, so vision and audio survive quantization - but only if you load both files.

Responsible use

Refusal suppression is deliberate and works as intended: this model will comply with requests the base model would refuse, including some it shouldn't. There is no safety filtering layered on top. You are responsible for how you deploy it - don't put this behind an unmoderated public-facing endpoint serving third parties. It inherits Gemma 4's factual limitations and biases; abliteration removes refusal directions, it doesn't add capability or judgment.

License

Inherits the Gemma 4 license from the base model. Upstream lists it as Apache 2.0 with the Gemma terms of use - read the linked terms before commercial deployment.

Related

Abliteration hardware

Recorded in reproduce/reproduce.json:

  • GPU: NVIDIA A40 (47.40 GB VRAM)
  • OS: Linux-6.8.0-138-generic-x86_64-with-glibc2.35
  • CUDA / driver: CUDA 13.2, driver 580.178.04
  • CPU: 12th Gen Intel Core i3-12100
  • Software: PyTorch 2.15.0+cu132, Heretic 2.1.0

Heretic notes that KL-divergence and refusal numbers can vary slightly with hardware and library versions.

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

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

GPU в ailist

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

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

Мультимодальные any-to-any модели пока не поддерживаются рантаймом.

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

0 моделей