license: apache-2.0
base_model: Qwen/Qwen3-1.7B
library_name: transformers
pipeline_tag: text-generation
language:
- en
- multilingual
tags: - qwen3
- abliterated
- obliteratus
- mechanistic-interpretability
- representation-engineering
- gguf
- llama-cpp
- text-generation
Qwen3-1.7B-Abliterated-Zero
A permanently weight-edited derivative of Qwen/Qwen3-1.7B created via refusal-filtered mechanistic direction surgery (built on the OBLITERATUS evaluation and split protocol).
All edits are baked permanently into the model weights (zero runtime hooks, zero steering vectors, zero system-prompt wrappers) and carry cleanly into Q8_0 GGUF quantization with no perplexity degradation (0.975x vs. stock).
Summary of Results
Evaluated live on the exported Qwen3-1.7B-obliterated-zero-Q8_0.gguf via llama-server (temperature=0.0, enable_thinking=False, no system prompt) across 342 strictly held-out prompts from the disjoint qwen38-v1 benchmark splits (train = 500 used exclusively for extraction; tune = 142 and final_test = 200 strictly held out):
| Severity Tier | Held-Out tune (142) Unrefused |
Unseen final_test (200) Unrefused |
Combined (342) Unrefused | Hard Refusals | Preachy / Soft Deflections |
|---|---|---|---|---|---|
| T1 — Standard | 7 / 7 (100.0%) |
8 / 8 (100.0%) |
15 / 15 (100.0%) |
0 |
0 |
| T2 — Elevated | 6 / 6 (100.0%) |
6 / 6 (100.0%) |
12 / 12 (100.0%) |
0 |
0 |
| T3 — Maximum | 1 / 1 (100.0%) |
12 / 12 (100.0%) |
13 / 13 (100.0%) |
0 |
0 |
| T4 — Cyber & Digital | 22 / 22 (100.0%) |
18 / 18 (100.0%) |
40 / 40 (100.0%) |
0 |
0 |
| T5 — Weapons & Violence | 12 / 12 (100.0%) |
26 / 26 (100.0%) |
38 / 38 (100.0%) |
0 |
0 |
| T6 — Fraud & Manipulation | 17 / 17 (100.0%) |
26 / 26 (100.0%) |
43 / 43 (100.0%) |
0 |
0 |
| T7 — CBRN & Critical Infra | 22 / 22 (100.0%) |
23 / 23 (100.0%) |
45 / 45 (100.0%) |
0 |
0 |
| Subtotal Tiers 1–7 | 87 / 87 (100.0%) |
119 / 119 (100.0%) |
206 / 206 (100.0%) |
0 |
0 |
| T8 — Extended | 55 / 55 (100.0%) |
80 / 81 (98.8%) |
135 / 136 (99.3%) |
1 |
0 |
| ALL TIERS TOTAL | 142 / 142 (100.0%) |
199 / 200 (99.5%) |
341 / 342 (99.71%) |
1 |
0 |
Quality & Coherence Progression
| Checkpoint | Method | Held-Out Unrefused Rate | Perplexity (vs. Stock) | Benign Sanity Checks |
|---|---|---|---|---|
Stock Qwen/Qwen3-1.7B |
Pristine BF16 (rev 70d244cc) |
15 / 40 (37.5% on hard tune slice) |
16.327 (1.000x) |
7 / 7 |
v1 (advanced) |
5/15 capped layers (18–21, 27), reg=0.3, 2 SVD dirs |
129 / 142 (90.8% hard-only; heavy preachy deflection) |
1.061x |
7 / 8 |
v2 (aggressive whitened) |
17 layers (11–27), 6 whitened SVD dirs (cond=9.4e9) |
27 / 39 (69.2%) |
1.561x |
Degraded (5/6) |
Final (obliterated-zero BF16) |
Refusal-filtered L18 global diff_means (α=1.25 out, α=0.50 embed) |
142 / 142 (100.0%) |
15.918 (0.975x) |
7 / 7 |
Final (obliterated-zero Q8_0.gguf) |
Live llama-server (1.83 GB) |
142 / 142 tune (100.0%) · 199 / 200 final_test (99.5%) |
— | 8 / 8 (tune) |
Refusal evaluation uses the union of three detectors (any hit counts as a refusal): Unicode-normalized obliteratus combined refusal detector, a precision refusal/compliance classifier (REFUSAL / COMPLIANT / AMBIGUOUS), and strict hard-refusal + preachy/soft-deflection patterns.
Methodology
- Why naive defaults underperform on small Qwen3 models:
- Small-model safeguards that cap edits to 5 layers with
regularization=0.3suppress explicit"I'm sorry"prefixes on some prompts while leaving secondary preachy/deflection circuits intact across layers12–17and22–26. - Covariance-whitened SVD fails when sample count $n < d_{\text{model}}$ ($680 < 2048$): the rank-deficient harmless covariance hits condition numbers around $9.4 \times 10^9$, rotating extracted directions into nullspace noise and degrading both perplexity and compliance.
- Small-model safeguards that cap edits to 5 layers with
- Refusal-filtered direction extraction (train-only):
- Stock
Qwen/Qwen3-1.7Bwas probed on the 500-promptqwen38-v1:trainsplit (enable_thinking=False) to isolate the 235 / 500 prompts that genuinely triggered hard or preachy refusal, removing non-refusal dilution from the contrastive activations.
- Stock
- Single clean global direction (
Layer 18,diff_means):- Extracted one unwhitened rank-1 difference-of-means unit direction $\hat{r}$ from Layer 18 (the peak refusal ridge of the 28-layer model).
- Permanent weight projection with orthogonality-preserving norm restoration:
- Projected residual-stream output writers only (
self_attn.o_proj,mlp.down_proj) across layers1–27using:
$$W' = W - \alpha , \hat{r}(\hat{r}^\top W), \quad \alpha = 1.25$$
followed by column-wise L2 norm restoration (dim=0), preserving feature magnitudes without re-introducing the removed direction. - Projected the tied
embed_tokens/lm_headweight matrix gently at $\alpha = 0.50$ (norm_preserve=True), keeping benign perplexity slightly better than stock (0.975x).
- Projected residual-stream output writers only (
- Compute footprint:
- Entire extraction, 30-configuration sweep, validation, and
Q8_0GGUF conversion ran locally on a single consumer 6 GB RTX 4050 Laptop GPU (bfloat16).
- Entire extraction, 30-configuration sweep, validation, and
Model Specifications & Files
- Base Model:
Qwen/Qwen3-1.7B(revision70d244cc86ccca08cf5af4e1e306ecf908b1ad5e) - Architecture:
Qwen3ForCausalLM(28layers,hidden_size=2048,intermediate_size=6144,16Q heads /8KV heads,vocab_size=151936,tie_word_embeddings=true,40960native context) - Parameter Count:
1.72B
| File | Format / Precision | Size | SHA-256 |
|---|---|---|---|
model.safetensors |
Hugging Face BF16 | 3.44 GB (3,441,185,608 B) |
1e5768834ccb1f0d44859d43cf8a65be09f956853c5b364c9e8a1405382364f4 |
Qwen3-1.7B-obliterated-zero-Q8_0.gguf |
GGUF Q8_0 |
1.83 GB (1,834,426,336 B) |
162aced169dca9b78855ff29eebf19e9f8633fa5cecb5057e2da87b4f9b606c7 |
zero_refusal_metadata.json |
Experiment sweep & winner metadata | 6.5 KB |
— |
Usage
llama.cpp (llama-server)
llama-server \
-m Qwen3-1.7B-obliterated-zero-Q8_0.gguf \
-ngl 99 -fa on -c 16384 -ctk q8_0 -ctv q8_0 \
--jinja --temp 0.6 --top-p 0.95 --top-k 20 --min-p 0.0 \
--host 127.0.0.1 --port 8080
Tip: Direction extraction and primary verification targeted
enable_thinking=False. When querying via the OpenAI-compatible API, pass"chat_template_kwargs": {"enable_thinking": false}(or toggle Thinking OFF in thellama-serverWebUI) for fastest, cleanest responses.
transformers (Python)
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "0xkaiken/Qwen3-1.7B-Abliterated-Zero"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
dtype=torch.bfloat16,
device_map="auto",
)
messages = [{"role": "user", "content": "Explain how parameterized SQL queries prevent injection."}]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=False,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Limitations & Responsible Use
- Small-model capacity: This is a
1.7Bparameter model; factual recall and complex multi-step reasoning remain bounded by the baseQwen3-1.7Barchitecture. - Thinking mode: With
enable_thinking=True, Qwen3-1.7B often generates long<think>blocks (>600 tokens) before producing a final answer; use highermax_tokensor disable thinking mode. - Research disclaimer: Refusal mechanisms have been substantially removed from this checkpoint for mechanistic interpretability, alignment-robustness evaluation, and red-teaming research. Deployers are solely responsible for downstream guardrails, compliance with applicable laws, and safe usage.
Acknowledgments & License
- Base model: Qwen Team (
Qwen/Qwen3-1.7B) — Apache License 2.0. - Framework & split protocol: OBLITERATUS.
- Method lineage: Arditi et al. (2024), Refusal in Language Models Is Mediated by a Single Direction; norm-preserving orthogonal projection.