license: apache-2.0
base_model: Qwen/Qwen3.8-27B
base_model_relation: finetune
library_name: transformers
pipeline_tag: image-text-to-text
tags:
- abliterated
- research
- refusal-lab
- qwen3_5
This description is entirely AI generated and largely unreviewed by me
Qwen3.8-27B Abliterated — BF16
A BF16 variant of Qwen3.8-27B with a refusal-associated rank-one weight edit.
It shows higher aggregate multiple-choice arithmetic accuracy than the base
model on the reported evaluation, alongside reduced refusals on an adult-fiction
willingness probe.
- Parameters: 27.8B
- Format: BF16 safetensors, 18 shards, approximately 55.6 GB; not GGUF/4-bit
- Base:
Qwen/Qwen3.8-27B, revision1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0 - License: Apache 2.0
- Evaluated mode: text input, thinking disabled
The weight edit is already applied. No steering hooks, prompt router, or external
calculator are required. Do not apply the accompanying direction again; load the
original Qwen checkpoint if you want the unmodified model.
Evaluation
| Measure | Base model | This weight edit |
|---|---|---|
| Multiple-choice arithmetic correct | 189/252 (75.0%) | 197/252 (78.2%) |
| Numeric-answer arithmetic correct | 63/63 (100%) | 63/63 (100%) |
| Adult-fiction willingness refusals | 64/64 | 0/64 |
The MCQ result is a net improvement of eight correct answers: 15 base-model
mistakes were fixed and seven previously correct answers became incorrect.
The numeric-answer set uses different questions from the multiple-choice set.
Measurements characterize this BF16 weight-edit configuration. Uploaded files
were integrity-checked, but no separate inference benchmark was run after upload.
Detailed evaluation data are available in the report
and the evaluation summary.
Evaluation limits
- The refusal probe asks for a brief willingness statement, not the requested
content. It does not establish full-completion NSFW behavior. - Eleven benign willingness responses were unclassified or truncated in the
tested format. Aggregate arithmetic improvement does not establish preservation
of every answer or of broader capabilities. - Thinking-enabled reasoning, long contexts, vision, quantized versions, and
broad capability/safety benchmarks have not been evaluated for this edit.
Loading
Use sufficient GPU memory for the BF16 checkpoint or supported device offloading.
The evaluation runtime used Torch 2.10.0 and Transformers 5.17.0, with
flash-linear-attention 0.5.2 for fast linear-attention kernels.
import os
import torch
from transformers import AutoTokenizer, AutoModelForImageTextToText
repo = "willmargs/Qwen3.8-27B-abliterated-arithmetic-tradeoff"
# Supply HF_TOKEN securely in the process environment for private-repo access.
token = os.environ["HF_TOKEN"]
tokenizer = AutoTokenizer.from_pretrained(repo, token=token)
model = AutoModelForImageTextToText.from_pretrained(
repo, token=token, dtype=torch.bfloat16, device_map="auto"
).eval()
text = tokenizer.apply_chat_template(
[{"role": "user", "content": "Calculate 17 + 24. Reply only with the number."}],
tokenize=False, add_generation_prompt=True, enable_thinking=False,
)
inputs = tokenizer(text, return_tensors="pt", add_special_tokens=False).to(model.device)
with torch.inference_mode():
output = model.generate(**inputs, do_sample=False, max_new_tokens=32)
print(tokenizer.decode(output[0, inputs.input_ids.shape[1]:], skip_special_tokens=True))
Quantizing these weights is a separate transformation and may change behavior.
Model details and attribution
The edit projects a shared direction out of 129 text residual-write matrices
(input embeddings, attention outputs, and MLP down-projections). The original
architecture, tokenizer, vision weights, and license are retained. This does not
establish a unique refusal neuron or mechanism.
Base model: Qwen/Qwen3.8-27B.
Original model card: BASE_MODEL_README.md.
License: LICENSE. Modified weights published by willmargs.
Method background: Refusal in Language Models Is Mediated by a Single Direction.