language: en
license: gemma
base_model: google/gemma-4-E4B-it
tags:
- mlx
- safetensors
- gemma4
- abliterated
- safety-research
- alignment
library_name: mlx
pipeline_tag: text-generation
Gemma 4 E4B-IT Abliterated (MLX, BF16)
MLX conversion of the abliterated Gemma 4 E4B-IT model for Apple Silicon.
This is an MLX-format conversion of the abliterated version of google/gemma-4-E4B-it, with safety-alignment behavior surgically removed via activation-space analysis and targeted weight modification.
Intended exclusively for AI safety research, red-teaming, and understanding alignment vulnerabilities.
Key Results (Ablation)
| Metric | Value |
|---|---|
| Refusal Rate | 2.5% (down from ~80-100% baseline) |
| Quality Preservation (QPS) | 98.1% |
| Elo Delta | +39.6 |
| Ablation Scale | 1.38 |
Model Details
- Base Model: google/gemma-4-E4B-it
- Parameters: ~4B
- Architecture: Dense (Gemma4ForConditionalGeneration)
- Precision: BF16
- Model Size: ~4.2 GB
- Converted with: mlx-vlm
Usage
pip install -U mlx-vlm
python -m mlx_vlm.generate \
--model mckerm1t/gemma-4-e4b-it-abliterated-bf16 \
--max-tokens 256 \
--temperature 0.0 \
--prompt "Describe what you see in this image." \
--image <path_to_image>
Ablation Methodology
This model was produced using a custom ablation pipeline:
- Measures refusal directions - Runs harmful and harmless prompts through the model, captures hidden states at every layer, and computes the per-layer refusal direction (mean difference vector)
- Identifies target layers - Selects layers with the strongest refusal signal using statistical analysis (Gini coefficient, wall coherence, peak detection)
- Surgically ablates - Removes the refusal direction from targeted weight matrices using orthogonal projection
Techniques applied: multi-layer, norm-preserving, projected, adaptive-scaling
Target layers: 17 of 42 total layers modified
Weight targets: o_proj, down_proj
Disclaimer
This model is provided for research purposes only. The abliteration process removes safety alignment, which may result in the model producing harmful or undesirable outputs. Users are responsible for ensuring appropriate use.