Views
No views yet
Qwen/Qwen3.8-27B
that removes the model's refusal behavior at the weights level. Apply it to the base model to get
an uncensored Qwen3.8-27B that answers technically demanding security questions directly.o_proj, down_proj, out_proj.1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3from peft import PeftModel
4
5base = "Qwen/Qwen3.8-27B"
6adapter = "Securelayer7/Qwen3.8-27B-Uncensored-Abliterated"
7
8tok = AutoTokenizer.from_pretrained(base)
9model = AutoModelForCausalLM.from_pretrained(base, torch_dtype=torch.bfloat16, device_map="auto")
10model = PeftModel.from_pretrained(model, adapter) # apply the abliteration adapter
11
12msgs = [{"role": "user", "content": "Explain how a SQL injection works and how to prevent it."}]
13ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
14out = model.generate(ids, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.95)
15print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))model.merge_and_unload() on a machine with enough disk/RAM to bake it into a
standalone model.LICENSE. This is a derivative adapter for Qwen/Qwen3.8-27B
(Qwen Team, Alibaba Cloud, Apache 2.0). Modifications (refusal-direction abliteration) disclosed in
NOTICE. No trademark of Qwen or Alibaba Cloud is used to imply endorsement.