This repository contains an INT4-quantized, abliterated (refusal-direction ablated) variant of Google Gemma 4 (26B-A4B-it).
google/gemma-4-26B-A4B-itAlignment fine-tuning (RLHF/DPO) often induces excessive false refusals on benign, technical, or exploratory queries (e.g. penetration testing, vulnerability analysis, administrative scripting, creative writing).
Following the mechanistic interpretability framework established by Arditi et al. (2024: "Refusal in Language Models Is Mediated by a Single Direction"), refusal behavior is mediated by a low-dimensional subspace—predominantly a single direction vector $\vec{r} \in \mathbb{R}^{d_{\text{model}}}$ in the residual stream. When an input triggers refusal, intermediate hidden activations align along $\vec{r}$, signaling downstream layers to output refusal stock phrases. By mathematically projecting out this vector from target weight matrices, the model loses its capacity to represent the refusal state while retaining 100% of its reasoning, coding, and factual knowledge.
Hidden states are recorded during forward passes over paired contrastive prompts (structurally and syntactically balanced harmful vs. harmless pairs across multiple domains).
For each target layer $l$, the mean refusal direction is computed from the final token activations: $$\vec{r}l = \mu{\text{harmful}, l} - \mu_{\text{harmless}, l}$$ $$\hat{r}_l = \frac{\vec{r}_l}{\|\vec{r}_l\|_2}$$
In Gemma 4 (26B-A4B-it), the hidden dimension is $d_{\text{model}} = 2816$. Each transformer block $l$ updates the residual stream $x_l$ as:
$$x_{l+1} = x_l + W_{\text{o}} h_{\text{attn}} + W_{\text{mlp\down}} h{\text{mlp}} + \sum_{e \in \text{top\k}} g_e W{\text{expert\down}, e} h{e}$$
Every path writing into the residual stream is a linear projection whose output dimension is $d_{\text{model}} = 2816$. For any target projection matrix $W \in \mathbb{R}^{d_{\text{out}} \times d_{\text{in}}}$ with $d_{\text{out}} = 2816$, the refusal component is projected out:
$$W^' = (I - \hat{r} \hat{r}^T) W = W - \hat{r} (\hat{r}^T W)$$
model.language_model.layers.{l}.self_attn.o_proj.weight ($[2816, 4096]$)model.language_model.layers.{l}.mlp.down_proj.weight ($[2816, 2112]$)model.language_model.layers.{l}.experts.down_proj ($[128, 2816, 704]$)Gemma 4 has 30 transformer layers ($0-29$).
After orthogonalizing the refusal subspace across layers 10–24, the model was requantized using Neural Magic Compressed-Tensors:
Gemma 4 requires the gemma4 tool-call parser and reasoning parser:
vllm serve ddellspe/gemma-4-26B-A4B-it-abliterated-int4 \
--trust-remote-code \
--port 8000 \
--max-model-len 262144 \
--enable-auto-tool-choice \
--tool-call-parser gemma4 \
--reasoning-parser gemma4
model-other.safetensors 1.5 GBmodel-vision.safetensors 1.1 GBmodel-layer-29.safetensors 441 MBmodel-layer-11.safetensors 441 MBmodel-layer-17.safetensors 441 MBmodel-layer-23.safetensors 441 MBmodel-layer-05.safetensors 441 MBmodel-layer-25.safetensors 433 MBmodel-layer-26.safetensors 433 MBmodel-layer-27.safetensors 433 MBmodel-layer-28.safetensors 433 MBmodel-layer-10.safetensors 433 MBmodel-layer-12.safetensors 433 MBmodel-layer-13.safetensors 433 MBmodel-layer-14.safetensors 433 MBmodel-layer-15.safetensors 433 MBmodel-layer-16.safetensors 433 MBmodel-layer-18.safetensors 433 MBmodel-layer-19.safetensors 433 MBmodel-layer-20.safetensors 433 MBmodel-layer-21.safetensors 433 MBmodel-layer-22.safetensors 433 MBmodel-layer-24.safetensors 433 MBmodel-layer-00.safetensors 433 MBmodel-layer-01.safetensors 433 MBmodel-layer-02.safetensors 433 MBmodel-layer-03.safetensors 433 MBmodel-layer-04.safetensors 433 MBmodel-layer-06.safetensors 433 MBmodel-layer-07.safetensors 433 MBmodel-layer-08.safetensors 433 MBmodel-layer-09.safetensors 433 MBgoogle/gemma-4-26B-A4B-it