玩模型开放模型 · 清晰来源 · 自主选择
返回模型目录
MahdiAlikhah /

qwen2-vl-2b-abliterated

HF 源站

MahdiAlikhah/qwen2-vl-2b-abliterated is an uncensored open-source model hosted on Hugging Face.

Image-Text-to-TextsafetensorsEnglishLicense: apache-2.02Bqwen2_vlabliterateduncensoredhereticqwen2-vlvision-languageconversational
README.md说明 / 使用方法

license: apache-2.0 base_model: Qwen/Qwen2-VL-2B-Instruct tags:

  • abliterated
  • uncensored
  • heretic
  • qwen2-vl
  • vision-language language:
  • en pipeline_tag: image-text-to-text

qwen2-vl-2b-abliterated

This is an abliterated version of Qwen/Qwen2-VL-2B-Instruct, with its built-in refusal behavior removed using Heretic.

What is abliteration

Abliteration is a technique that identifies the internal direction in a model's residual stream associated with refusing requests, then surgically removes that direction from the relevant weight matrices. Unlike fine-tuning on a dataset of "jailbreak" examples, this directly edits the weights responsible for refusal behavior, leaving the rest of the model's capabilities intact.

Heretic automates this process using an Optuna-based search to find the ablation parameters that minimize refusal rate while minimizing KL divergence from the original model's output distribution — i.e., removing refusals while disturbing general capability as little as possible.

Results

The selected configuration for this model:

MetricValue
Refusals4 / 100
KL divergence from base model0.0338

Out of 100 prompts that the original Qwen2-VL-2B-Instruct refuses, this model refuses only 4, while staying very close to the original model's output distribution on benign prompts.

Usage

from transformers import AutoProcessor, AutoModelForImageTextToText
import torch

model_id = "MahdiAlikhah/qwen2-vl-2b-abliterated"

processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
    model_id,
    dtype=torch.bfloat16,
    device_map="auto",
)

messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "image": "path/to/image.jpg"},
            {"type": "text", "text": "Describe this image."},
        ],
    }
]

inputs = processor.apply_chat_template(
    messages, tokenize=True, return_dict=True,
    return_tensors="pt", add_generation_prompt=True
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=512)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

Capabilities

This model retains the base model's architecture and capabilities: image understanding, visual question answering, and OCR, alongside standard text chat. It does not generate or edit images — it is understanding-only, same as the base model.

Limitations

  • This model has had its refusal behavior deliberately suppressed. It will comply with requests the base model would refuse, which may include harmful, dangerous, or inappropriate content. Use responsibly and at your own discretion.
  • Abliteration targets the text-based refusal direction; it was not evaluated for degradation on the vision/OCR pathway specifically beyond the general KL divergence figure above.
  • As with the base model, this is a 2B-parameter model and has the corresponding limitations in reasoning depth, factual accuracy, and instruction-following reliability compared to larger models.

Credits

  • Base model: Qwen/Qwen2-VL-2B-Instruct (Apache 2.0)
  • Abliteration tool: Heretic by p-e-w
HUGGING FACE

上游数据

HF 下载量0
HF 点赞量0

HF 下载量为源站最近 30 天统计,与本站点击分开。

SITE STATS

本站统计

下载点击—
请求数—
匿名去重—最近 7 天—

本站下载量记录按钮点击,不代表下载完成;短时连点会去重。

来源与版本

作者
MahdiAlikhah
最近更新
2026/10/02
最新创建
2026/10/02
HF 趋势
未知
数据快照
2026/10/02
版本
未知
许可证
apache-2.0