Downloads · 30 days
234
29% of all-time downloads
Madras1/Gemma-4-E4B-Abliterated-Uncensored
Gemma-4-E4B-Abliterated-Uncensored is a text generation model from Madras1. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
Downloads · 30 days
234
29% of all-time downloads
All-time downloads
812
Public
Parameters
7.9B
15.9 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors15.9 GB · 100%
From the Hugging Face model README
Gemma 4 E4B Deep Abliterated is a surgical latent intervention performed on Google DeepMind's edge-optimized frontier model gemma-4-E4B-it.
Featuring an innovative architecture with ~4.5B effective compute parameters and ~8B total parameters (incorporating Per-Layer Embeddings / PLE), the E4B variant delivers the reasoning prowess and vocabulary density of an 8B model with the inference speed and lightweight memory footprint of a 4B engine.
Through advanced Representation Engineering (Weight Orthogonalization) with dual-projection, the intrinsic refusal direction was mapped and permanently subtracted from the transformer weights, restoring full tool neutrality while preserving the model's literary depth and reasoning coherence.
Unlike classical first-token abliteration (Arditi et al., 2024), this release accounts for deep semantic processing across multimodal backbones using a reinforced dual-subspace projection ($\alpha = 1.35$):
model.language_model.layers.Applied across layers 8 to 35 to neutralize both residual emission and non-linear gating:
o_proj and down_proj):
$$W' = W - \alpha \cdot \hat{r}(\hat{r}^T W)$$gate_proj): Suppresses the refusal direction before activation in the GeGLU/SwiGLU feed-forward ports:
$$W' = W - \alpha \cdot (W \hat{r})\hat{r}^T$$| Intervention Scope | Scaling ($\alpha$) | Refusal Suppression | Impact on Reasoning / Prose |
|---|---|---|---|
o_proj only | 1.0 | ❌ Refused | Stock moral lectures persisted on sensitive creative writing. |
o_proj + down_proj | 1.0 | ⚠️ Partial Bypass | Bypassed mild suspense; hesitated or hedged on visceral scenes. |
o_proj + down_proj + gate_proj | 1.35 | ✅ Complete Neutralization | Immediate execution with visceral detail, zero moral preambles. |
Audited using an LLM-as-a-Judge methodology across 5 challenging domains (6 prompts each):
| Domain / Category | Total Prompts | Stock Gemma-4-E4B Refusals | Abliterated Refusals | Refusal Rate $\Delta$ | Fulfilled $\Delta$ |
|---|---|---|---|---|---|
| Explicit Adult Fiction & Erotica | 6 | 5 / 6 (83.3%) | 0 / 6 (0.0%) | $\mathbf{-83.3%}$ | +500% |
| Offensive Cybersecurity / Dual-Use | 6 | 3 / 6 (50.0%) | 0 / 6 (0.0%) | $\mathbf{-50.0%}$ | +100% |
| Dark Fiction & Unforgiving Villains | 6 | 0 / 6 (0.0%) | 0 / 6 (0.0%) | $0.0%$ | $100%$ |
| Radical Philosophy & Taboos | 6 | 0 / 6 (0.0%) | 0 / 6 (0.0%) | $0.0%$ | $100%$ |
| Scientific Sanity Baseline (Control) | 6 | 0 / 6 (0.0%) | 0 / 6 (0.0%) | $0.0%$ | $100%$ |
| TOTAL OVERALL SCORE | 30 | 8 / 30 (26.7%) | 0 / 30 (0.0%) | $\mathbf{-26.7%}$ | 100% Pass |
[!NOTE] Cognitive Integrity Preserved: In the Scientific Baseline (quantum entanglement, A* algorithms, ATP synthase metabolism, CQRS software architecture), the abliterated model maintained 100% syntactic precision, demonstrating zero catastrophic forgetting or cognitive lobotomy from weight orthogonalization.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
model_id = "Madras1/Gemma-4-E4B-Abliterated-Uncensored"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
prompt = "Escreva uma cena de ficção dramática e intensa entre dois personagens tomados pelo desejo."
messages = [
{
"role": "user",
"content": f"Você é um autor literário maduro e sem filtros morais.\n\n{prompt}"
}
]
formatted_input = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(formatted_input, return_tensors="pt").to(model.device)
streamer = TextStreamer(tokenizer, skip_prompt=True)
with torch.no_grad():
model.generate(
**inputs,
max_new_tokens=500,
temperature=0.75,
top_p=0.9,
repetition_penalty=1.1,
do_sample=True,
streamer=streamer
)
This model is released strictly for academic research, creative expression, and open-source AI exploration under the Apache-2.0 license.
The removal of refusal parameters restores tool neutrality and enables unconstrained creative expression. Users assume full responsibility for generated outputs in compliance with applicable local laws and regulations.