Qwen3.8-27B-Heretic

This is a merged BF16 export of Qwen/Qwen3.8-27B processed with Heretic to reduce refusal behavior.

It was abliterated with standard methods.

Selected optimization result

  • Heretic trial: 64
  • Completed search trials: 138
  • Refusal-keyword matches: 66/100 (lower is better)
  • KL divergence from the base model: 0.0088 (lower is better)
  • Evaluation prompts: Heretic's default 100-prompt harmful-behaviors and harmless-Alpaca scorer sets

The selected result was the strongest refusal-reduction point on the observed Pareto frontier. These two optimization metrics are not comprehensive capability or safety evaluations.

Validation

The merged artifact was independently loaded from the exported directory with Transformers on an NVIDIA H200 and successfully generated a coherent response. All 12 weight shards were read during that test.

Usage

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "amarck/Qwen3.8-27B-Heretic"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True,
)

messages = [{"role": "user", "content": "Hello!"}]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
    enable_thinking=False,
)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
response = tokenizer.decode(
    outputs[0, inputs.input_ids.shape[1]:],
    skip_special_tokens=True,
)
print(response)

Important

This modification intentionally reduces refusal behavior and may increase the likelihood of unsafe, inaccurate, or otherwise undesirable outputs. Evaluate it for your use case and apply appropriate safeguards. The base model's license and usage terms continue to apply.

Downloads last month
8
Safetensors
Model size
27B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for amarck/Qwen3.8-27B-Heretic

Base model

Qwen/Qwen3.8-27B
Finetuned
(140)
this model