/ Модель

Характеристики

Контекст
32 768 токенов
Параметры
494 млн
Лицензия
Apache 2.0
Архитектура
qwen2 · dense
Базовая модель
Qwen2.5-0.5B-Instruct
Библиотека
transformers
Опубликована
25 апр 2026

dpo-qwen2.5-0.5b-halueval

Генерация текстаТекст → текст5 профессий

Компактная модель Qwen2.5, дообученная методом DPO для более фактичной генерации ответов на вопросы и суммаризаций по заданному контексту.

50скачиваний за 30 дней0лайковвеса обновлены11 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Модель dpo-qwen2.5-0.5b-halueval разработана Varun Chundru и Debasmita Biswas как компонент снижения галлюцинаций в исследовательском проекте Purdue University Fort Wayne. Это плотная причинная языковая модель Qwen2.5 на 494 млн параметров, дообученная методом Direct Preference Optimization на предпочтениях, составленных по трём задачам набора HaluEval: ответам на вопросы, диалогу и суммаризации. Модель предназначена для генерации текста по контексту, в частности для ответов на вопросы и суммаризации документов с опорой на источник. Она принимает текст и может использовать контекст до 32 768 токенов; карточка указывает английский язык.

В оценке на отложенной части HaluEval общая доля галлюцинаций, измеренная отдельным классификатором DeBERTa, снизилась с 85,5% у базовой модели до 37,7%. Наибольший эффект показан для ответов на вопросы и суммаризации, тогда как в диалоге показатель остался высоким — 94,2%. Это измерения классификатора-прокси, а не человеческая оценка; обучение длилось одну эпоху, а ограничение длины при обучении могло обрезать длинные документы. Модель не рекомендуется для высокорисковых сценариев без дополнительной проверки. Лицензия — Apache-2.0.

Сценарии применения

  • ответы на вопросы по предоставленному контексту
  • суммаризация документов с опорой на источник
  • снижение галлюцинаций при генерации текста
  • исследования обучения с предпочтениями для повышения фактичности

Ограничения

В диалогах сохраняется высокая доля галлюцинаций: 94,2% по оценке классификатора-прокси; результаты измерялись автоматическим детектором, а не людьми. Модель обучалась одну эпоху, длинные документы могли обрезаться, поэтому для высокорисковых задач требуется дополнительная проверка.

Для каких профессий подходит5

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

dpo-qwen2.5-0.5b-halueval

This model is part of the project Domain-Specific Hallucination Detection in Large Language Models (paper). The code and full pipeline are available on GitHub.

A Direct Preference Optimization (DPO) fine-tune of Qwen2.5-0.5B-Instruct trained to reduce hallucination across grounded QA, dialogue, and summarization tasks. Fine-tuned on preference pairs derived from all three subtasks of the HaluEval benchmark.

This model is the mitigation component of a complete hallucination detection + mitigation pipeline built for CS 593 NLP (Purdue University Fort Wayne, Spring 2026). Hallucination rates are measured by passing model generations through a separately fine-tuned DeBERTa detector: varunchundru/hallucination-detector-deberta.


Model Details

FieldValue
Base modelQwen/Qwen2.5-0.5B-Instruct
Fine-tuning methodDirect Preference Optimization (DPO) via TRL
Training tasksQA, Dialogue, Summarization (HaluEval)
Data split70 / 15 / 15 stratified by task
Train pairs21,000 (7,000 per task)
Test samples4,500 (1,500 per task)
Model size0.5B parameters
Hardware1× NVIDIA A100
FrameworkHugging Face Transformers + TRL

Training Details

Preference Pair Construction

Each HaluEval example was converted into a DPO triplet using task-specific formatting:

TaskPromptChosenRejected
QASystem + knowledge + questionright_answerhallucinated_answer
DialogueSystem + knowledge + dialogue historyright_responsehallucinated_response
SummarizationSystem + documentright_summaryhallucinated_summary

System prompt (QA / Dialogue):

You are a helpful assistant. Answer based only on the provided knowledge.
Do not invent facts. Be concise.

System prompt (Summarization):

Summarize the following document accurately.
Do not add information not present in the document.

Hyperparameters

ParameterValue
Epochs1
Learning rate5e-6
DPO beta (KL penalty)0.1
Batch size (train / eval)16
Gradient accumulation steps1
Max sequence length512
Precisionbf16
Best model selectionLowest eval loss
OptimizerAdamW (default TRL)

Evaluation

Hallucination rates are measured on the held-out 15% test split (4,500 examples, 1,500 per task) by passing each model's generation through varunchundru/hallucination-detector-deberta at a 0.5 probability threshold.

Overall Results

ModelHallucination RateMean Hall. Prob
Qwen2.5-0.5B-Instruct (base)85.5%0.816
dpo-qwen2.5-0.5b-halueval (this model)37.7%0.293
Absolute reduction−47.7 pp−0.523
Relative reduction−55.9%

Per-Task Breakdown

TaskBase RateDPO RateRelative Reduction
QA93.4%19.0%−79.7%
Summarization63.2%0.0%−100.0%
Dialogue99.8%94.2%−5.6%

Notable findings:

  • QA sees the largest absolute improvement — the structured knowledge + question format aligns well with DPO training signal.
  • Summarization hallucination is effectively eliminated on the test set (0.0% rate), likely because the DPO training directly contrasts faithful vs. hallucinated summaries on similar documents.
  • Dialogue shows minimal improvement (−5.6%). The model still hallucinates in 94.2% of dialogue turns, suggesting that multi-turn conversation is a harder distribution to shift with preference learning at this scale.

Hallucination Rate Reduction


Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_id = "varunchundru/dpo-qwen2.5-0.5b-halueval"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
model.eval()


def answer_grounded(question: str, knowledge: str, max_new_tokens: int = 150) -> str:
    messages = [
        {
            "role": "system",
            "content": (
                "You are a helpful assistant. Answer based only on the provided knowledge. "
                "Do not invent facts. Be concise."
            ),
        },
        {
            "role": "user",
            "content": f"Knowledge: {knowledge}

Question: {question}",
        },
    ]
    text = tokenizer.apply_chat_template(
        messages, tokenize=False, add_generation_prompt=True
    )
    inputs = tokenizer(text, return_tensors="pt").to(model.device)
    with torch.no_grad():
        output = model.generate(
            **inputs,
            max_new_tokens=max_new_tokens,
            do_sample=False,
            pad_token_id=tokenizer.pad_token_id,
            eos_token_id=tokenizer.eos_token_id,
        )
    response = tokenizer.decode(
        output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True
    )
    return response.strip()


# Example
knowledge = "The Eiffel Tower is located in Paris, France, and was completed in 1889."
question = "Where is the Eiffel Tower located and when was it finished?"
print(answer_grounded(question, knowledge))

Intended Use & Limitations

Intended use:

  • Grounded question answering and document summarization where faithfulness to a context is required
  • Research on hallucination mitigation via preference learning
  • Mitigation component paired with varunchundru/hallucination-detector-deberta

Limitations:

  • Dialogue performance is weak — DPO training did not meaningfully reduce hallucination for multi-turn dialogue (94.2% post-DPO rate). The dialogue task may require more training, a larger model, or task-specific preference data.
  • Trained for only 1 epoch on 0.5B parameters — further training or a larger base model would likely improve results.
  • Hallucination rates are measured by a proxy DeBERTa classifier, not human annotation.
  • max_length=512 during DPO training may truncate long documents in the summarization task.
  • Should not be used in high-stakes domains without further validation.

Project Context

This model is the mitigation component in a four-part hallucination pipeline:

  1. TF-IDF + Logistic Regression — Lightweight lexical baseline
  2. Zero-Shot DeBERTa-MNLI — NLI-based detection without task-specific training (Acc=0.60, F1=0.43, AUROC=0.65)
  3. Fine-Tuned DeBERTa-v3-base — Task-specific hallucination detector (Acc=0.91, F1=0.91, AUROC=0.98)
  4. DPO Fine-Tuned Qwen2.5-0.5B (this model) — Reduces hallucination at generation time

Authors: Varun Chundru & Debasmita Biswas Course: CS 593 Natural Language Processing, Purdue University Fort Wayne, Spring 2026


Citation

@inproceedings{li2023halueval,
  title={HaluEval: A Large-Scale Hallucination Evaluation Benchmark for Large Language Models},
  author={Li, Junyi and Cheng, Xiaoxue and Zhao, Wayne Xin and Nie, Jian-Yun and Wen, Ji-Rong},
  booktitle={Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing},
  year={2023}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen2ForCausalLM
Ревизия весов
13dd48c

0 моделей