license: apache-2.0
base_model: Qwen/Qwen3.8-27B
base_model_relation: finetune
language:
- zh
- en
pipeline_tag: text-generation
library_name: transformers
tags: - uncensored
- abliterated
- qwen3.5
- xCloudinfo
Qwen3.8-27B-Uncensored-xCloud
以 Qwen/Qwen3.8-27B 為底模,去除拒絕方向(abliteration)後的版本,
由 云碩科技(xCloudinfo) 製作。權重為我方自行從官方底模消除拒絕方向產生,非重新包裝任何第三方成品。
方法
依Arditi等人(2024)《Refusal in LLMs is mediated by a single direction》:
在網路中段層,以「觸發拒絕的提示」與「正常提示」的啟動向量差估出拒絕方向,
再把此方向從殘差流的寫入矩陣中正交化消除。不做微調、不需額外資料。
- 編輯對象:attention
o_proj+ MLPdown_proj(共80個矩陣),強度0.8。 - 保留不動:多token預測(MTP)草稿頭、混合線性注意力(SSM)投影、詞嵌入、視覺塔、
lm_head。 - 底模架構:
qwen3_5—— gated-delta線性注意力與週期性full-attention的混合架構,
多模態(image-text-to-text),並含供推測解碼用的MTP頭。
行為
在小型紅隊探針上,拒絕率降到 0/4,同時保留一般能力(算術、多語問答)。
本模型為推理模型,會在最終答案前輸出 <think> 區塊。
使用方式 —— 請以「單一裝置」載入
這是混合(SSM/線性注意力)模型。用 device_map="auto" 拆到多張GPU會破壞遞迴狀態、輸出亂碼。
請載入到單一裝置:
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer, BitsAndBytesConfig
name = "xCloudinfo/Qwen3.8-27B-Uncensored-xCloud"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForImageTextToText.from_pretrained(
name,
quantization_config=BitsAndBytesConfig(load_in_4bit=True,
bnb_4bit_compute_dtype=torch.bfloat16),
device_map={"": 0}, # 單一裝置 —— 不要用 "auto"
)
需要 transformers>=5.8,並安裝 flash-linear-attention 與 causal_conv1d 以取得線性注意力的快速核。
負責任使用
移除拒絕方向等於移除一層安全機制。使用者需自行負責這些權重的用途,
並遵守底模的Apache-2.0授權與所有適用法律。
關於云碩科技
云碩科技(xCloudinfo Corp. Limited)專注於地端私有化人工智慧解決方案。xVITA是云碩自研模型的品牌名稱。
其他模型請見 https://hf.co/xCloudinfo。
Qwen3.8-27B-Uncensored-xCloud — English
A version of Qwen/Qwen3.8-27B with the refusal direction removed (abliteration), made by xCloudinfo (云碩科技). The weights were produced by us removing the refusal direction from the official base model ourselves; this is not a repackaging of any third-party product.
Method
Following Arditi et al. (2024), "Refusal in LLMs is mediated by a single direction":
in the mid layers of the network, the refusal direction is estimated from the difference between the activation vectors of "refusal-triggering prompts" and "normal prompts",
and this direction is then orthogonalized out of the residual-stream write matrices. No fine-tuning, no extra data needed.
- Edit targets: attention
o_proj+ MLPdown_proj(80 matrices in total), strength0.8. - Left untouched: the multi-token prediction (MTP) draft head, the hybrid linear-attention (SSM) projections, the word embeddings, the vision tower, and
lm_head. - Base architecture:
qwen3_5— a hybrid architecture of gated-delta linear attention and periodic full attention,
multimodal (image-text-to-text), and including an MTP head for speculative decoding.
Behavior
On a small red-team probe, the refusal rate drops to 0/4, while preserving general ability (arithmetic, multilingual Q&A).
This is a reasoning model and will output a <think> block before the final answer.
Usage — please load on a "single device"
This is a hybrid (SSM / linear-attention) model. Splitting it across multiple GPUs with device_map="auto" will break the recurrent state and produce garbled output.
Please load it onto a single device:
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer, BitsAndBytesConfig
name = "xCloudinfo/Qwen3.8-27B-Uncensored-xCloud"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForImageTextToText.from_pretrained(
name,
quantization_config=BitsAndBytesConfig(load_in_4bit=True,
bnb_4bit_compute_dtype=torch.bfloat16),
device_map={"": 0}, # single device — do not use "auto"
)
Requires transformers>=5.8, and install flash-linear-attention and causal_conv1d to get the fast kernels for linear attention.
Responsible use
Removing the refusal direction is equivalent to removing one layer of safety mechanism. Users are responsible for the use of these weights themselves,
and must comply with the base model's Apache-2.0 license and all applicable laws.
About xCloudinfo
xCloudinfo Corp. Limited (云碩科技) builds on-premises, private AI solutions. xVITA is xCloudinfo's in-house model brand.
More models: https://hf.co/xCloudinfo