Skip to content
Computer vision

qwen2.5-vl-7b-instruct_w_halluvl_dpo

борьба с галлюцинациями в мультимодальных моделях

2 min readupdated

Эта модель представляет собой дообученную версию Qwen2.5-VL-7B-Instruct, созданную для уменьшения так называемых prompt-induced hallucinations (галлюцинаций, вызванных подсказками пользователя, когда модель слепо следует тексту в ущерб реальному изображению). Авторы применили метод взвешенного DPO (Direct Preference Optimization — прямой оптимизации предпочтений) на основе исследования с конференции NeurIPS 2026. Веса LoRA (небольшой надстройки над базовой моделью) уже интегрированы в итоговые веса, что упрощает запуск. Модель пригодится разработчикам и исследователям, которым важно повысить точность ответов мультимодальных систем при анализе картинок.

Ключевые особенности

  • Основана на Qwen2.5-VL-7B-Instruct с использованием около 20 тысяч пар предпочтений
  • Применен взвешенный DPO с учетом информативности ответов
  • Фокус на снижении влияния противоречивых текстовых промптов на зрительное восприятие
  • Полностью объединенные веса (merged weights) для прямого использования через стандартную библиотеку transformers

Что можно сделать

  • Проверить устойчивость модели к сложным или провокационным вопросам по изображениям
  • Интегрировать модель в пайплайны компьютерного зрения для более надежного визуального QA
  • Сравнить качество ответов с базовой версией Qwen2.5-VL на спорных примерах

Пример

from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
from qwen_vl_utils import process_vision_info

model_id = "PekhPekhPekh/qwen2.5-vl-7b-instruct_w_halluvl_dpo"
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
processor = AutoProcessor.from_pretrained(model_id)

messages = [{
    "role": "user",
    "content": [
        {"type": "image", "image": "path/to/image.jpg"},
        {"type": "text", "text": "What color is the chair?"},
    ]
}]
text = processor.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
images, videos = process_vision_info(messages)
inputs = processor(text=[text], images=images, videos=videos, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(processor.batch_decode(out[:, inputs.input_ids.shape[1]:], skip_special_tokens=True)[0])
Подробнее• Базовая модель: Qwen/Qwen2.5-VL-7B-Instruct (8.29 млрд параметров)
• Метод обучения: DPO (β = 0.1) с LoRA (rank 64, alpha 128, batch size 16, lr 2e-6, 1 эпоха)
• Датасет: 20 тысяч пар предпочтений, сгенерированных с помощью Qwen2-VL-7B-Instruct
• Научная база: статья с NeurIPS 2026 «When Prompts Override Vision: Prompt-Induced Hallucinations in LVLMs»
Discuss Telegram 0

Will it run?

Runs in BF16

Fits without quantisation.

  • BF16weights 15 GB · ready files17 GB
  • FP8 / INT8recommendedweights 7.7 GB9.0 GB
  • 4-bitweights 4.3 GB5.3 GB

Tip: go 8-bit.FP8 / INT8 is within about a percent of full precision in quality, takes half the memory and runs faster on RTX 40/50 and H100. Full precision only pays off for fine-tuning.

What to get for this model

Massed ComputeOpen Massed Compute

Your own GPU: FP8 / INT8 — from RTX 3080 · BF16 — from RTX 4090

Massed Compute hourly prices, November 2026. The discounted price applies with the coupon at checkout.

Estimate: weights plus working memory. Long videos, high resolutions and long contexts need more.

Run it on Massed Compute

The script downloads the model to the rented machine. How to run it is in the model card.

  1. 1. Rent a machine with a fitting GPU

    Open Massed Compute
  2. 2. Paste the script into the machine's terminal

    Connect over SSH (the Massed Compute panel shows the command) or open a terminal on the machine's desktop.

    HF_TOKEN / CIVITAI_TOKENThe script starts with token lines: paste yours between the quotes. The Hugging Face token is for gated models, the Civitai one for Civitai models.

    # PekhPekhPekh/qwen2.5-vl-7b-instruct_w_halluvl_dpo
    # ===== Tokens: paste yours between the quotes =====
    export HF_TOKEN=""        # huggingface.co/settings/tokens, for gated models
    # ==========================================
    mkdir -p ~/models
    curl -LsSf https://astral.sh/uv/install.sh | sh
    source "$HOME/.local/bin/env"
    uv tool install "huggingface_hub[cli]"
    hf download PekhPekhPekh/qwen2.5-vl-7b-instruct_w_halluvl_dpo --local-dir ~/models/qwen2.5-vl-7b-instruct_w_halluvl_dpo
    # The model is in ~/models. How to run it is in the model card (link above).
  3. 3. Use it

    The model is in ~/models. How to run it is in the model card (link above).

Stop the machine in the panel when you are done: it bills by the minute while it runs.

How to speed it up

Picked for this model type. Choose your hardware above to see what fits you exactly.

  • FlashAttention 44.0.0b42from December 2, 2026new release

    fastest exact attention on B200

    Kernels for Blackwell (beta). Exact attention without quantisation — fine for everything, LLMs included.

    How to enable: pip install flash-attn-4; vLLM and SGLang pick it up themselves.

    Earlier generations (2)
    • FlashAttention 3 — The Hopper (H100/H200) version with FP8.
    • FlashAttention 2 — The standard for RTX 30/40/50 and A100: exact attention without the memory cost of long contexts.
  • torch.compile2.15.0from October 28, 2026

    10–30% for free

    Compiles the model for your GPU. Slower first run, faster afterwards.

    How to enable: model = torch.compile(model); in ComfyUI the TorchCompileModel node.

Model family

New posts about versions of Qwen2.5-VL-7B-Instruct (quants, finetunes, LoRAs) will show up under the bell.

Quantised versions 12All on Hugging Face
Fine-tunes 12All on Hugging Face
LoRAs and adapters 2All on Hugging Face

About the model

PekhPekhPekh/qwen2.5-vl-7b-instruct_w_halluvl_dpo
Author
PekhPekhPekh
Category
Computer vision
Released
Posted

On NeyroLearn

Hugging Face

00

Ask AI about this model

Answered by Gemini 4 · the chat is kept only in this tab

Comments

Computer vision

ActiveMoMa-8B

ActiveMoMa-8B
Language models

BAL Coder 7B

BAL Coder 7B