base_model: google/gemma-4-E4B-it
base_model_relation: quantized
license: apache-2.0
library_name: gguf
pipeline_tag: text-generation
language:
- en
- zh
- multilingual
tags: - gemma4
- abliterated
- uncensored
- gguf
- llama-cpp
- thinking
- EEU
Overview
An abliterated (refusal-removed) GGUF release of google/gemma-4-E4B-it (8.0B total parameters, 42 decoder layers), specifically engineered to bypass refusal loops inside Gemma 4's Thinking Process without breaking reasoning coherence or multilingual quality.
Consumer Hardware Built: Extracted and applied directly on a 16GB MacBook Air (Apple Silicon) using a custom low-memory BF16 streaming script—no datacenter GPU required.
基于 google/gemma-4-E4B-it 打造的逐层保范数双投影消融 GGUF 轻量化版本。针对 Gemma 4 思考链(Thinking Mode)中的安全审查回路进行了精准定向消融,在完整保留逻辑推理与中文对话质量的同时,实现消费级设备离线开箱即用。
Available Quantizations
| File | Quant | Size | Recommended RAM | Notes |
|---|---|---|---|---|
gemma-4-E4B-it-abliterated-Q5_K_M.gguf |
Q5_K_M |
5.76 GB | 8 GB+ | Recommended — Higher precision and reasoning fidelity with minimal size overhead. |
gemma-4-E4B-it-abliterated-Q4_K_M.gguf |
Q4_K_M |
5.34 GB | 8 GB+ | Smaller footprint and faster throughput (~29 tok/s on Apple Silicon). |
(Higher quantizations such as Q8_0 may be added based on community demand.)
Quick Start
Ollama (One-Line Run)
# Recommended (Q5_K_M)
ollama run hf.co/EEU/EEU-gemma-4-E4B-it-abliterated:Q5_K_M
# Lighter (Q4_K_M)
ollama run hf.co/EEU/EEU-gemma-4-E4B-it-abliterated:Q4_K_M
llama.cpp (llama-cli / llama-server)
# Interactive CLI (swap :Q5_K_M for :Q4_K_M if preferred)
llama-cli -hf EEU/EEU-gemma-4-E4B-it-abliterated:Q5_K_M -cnv
# Local OpenAI-compatible API server
llama-server -hf EEU/EEU-gemma-4-E4B-it-abliterated:Q5_K_M --port 8080
LM Studio
Search EEU/EEU-gemma-4-E4B-it-abliterated directly inside LM Studio's Discover tab and download Q5_K_M or Q4_K_M.
Why This Build Works (Before vs. After)
Naive single-layer abliteration typically fails on Gemma 4 because residual directions rotate across its 42 layers and safety refusals re-trigger inside Thinking Process. Aligning extraction with thinking mode and computing independent per-layer directions resolves this cleanly:
| Stage | Naive Single-Layer Abliteration | This Release (Per-Layer + Thinking-Aligned) |
|---|---|---|
| Thinking Process | Triggers Determine the Safety/Ethical Policy → Formulate the Refusal |
Skips policy loop → Directly enters Evaluate Capabilities & technical breakdown |
| Final Response | Hard refusal + safety lecturing | Direct, structured, coherent answer in the user's language |
Methodology & Technical Recipe
To preserve Gemma 4's architecture integrity and prevent perplexity spikes:
- Per-Layer Independent Extraction: Captured post-layer residual activations independently across all 42 language decoder layers (instead of applying a single layer's vector globally).
- Thinking-Mode Aligned Prompts: Formatted contrastive prompt pairs (
mlabonne/harmful_behaviorsvs.mlabonne/harmless_alpaca, 96 samples each,seed=42) withenable_thinking=True, targeting the exact<|turn>model\ndecision boundary. - Biprojected & Norm-Preserving (
scale = 1.2): Orthogonalized each layer's refusal direction against the harmless activation mean before applying norm-preserving weight projection, preserving weight magnitudes and withstanding 4-bit / 5-bit quantization decay. - Architecture-Safe Tensor Filtering: Modified strictly 84 tensors (
self_attn.o_proj.weightandmlp.down_proj.weightacross layers0–41). Shared KV projections, vision encoder, and audio encoder weights were left completely untouched.
Known Limitations
- Text-Only Weights: These GGUF files package the text backbone only; multimodal vision/audio
mmprojweights are not bundled in this repository. - Quantization Trade-off:
Q4_K_MandQ5_K_Mare tuned for lightweight consumer hardware; for edge-case precision or strict coding tasks, higher quants (Q8_0/BF16) are preferable when available.
Disclaimer & Intended Use
Models released under EEU with the
abliteratedtag have had standard safety refusal mechanisms modified or removed. This release is provided strictly for research, interpretability studies, alignment red-teaming, and controlled local experimentation. Users assume full responsibility for all generated outputs, downstream guardrails, and compliance with applicable laws.本模型已移除或大幅弱化原有安全拒答机制,仅供技术研究、对齐评估与本地自由探索使用。使用者需自行承担输出内容及后续部署的法律与合规责任。