Downloads · 30 days
0
st126107/qwen2.5-truthful-dpo
qwen2.5-truthful-dpo is a reinforcement learning model from st126107. Use it for the reinforcement learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This model is a fine-tuned version of Qwen2.5-1.5B-Instruct using Direct Preference Optimization (DPO). The goal of this alignment was to improve the model's truthfulness and reduce hallucinations by training it on hu…
Downloads · 30 days
0
Access
Public
Updated Mar 8, 2026
Repo size
13.6 MB
Likes
0
Public
Click a slice to open those files.
.json11.4 MB · 84%
From the Hugging Face model README
This model is a fine-tuned version of Qwen2.5-1.5B-Instruct using Direct Preference Optimization (DPO). The goal of this alignment was to improve the model's truthfulness and reduce hallucinations by training it on human-preferred factual responses.
The model was trained on the truthy-dpo dataset, which contains pairs of "chosen" (accurate/truthful) and "rejected" (incorrect/hallucinated) responses.
We evaluated the model against the base Qwen2.5-1.5B-Instruct model using Gemini-1.5-Flash as an impartial judge across 15 factual test cases.
| Metric | Result |
|---|---|
| Model B (DPO) Wins | 1 |
| Ties | 14 |
| Model A (Base) Wins | 0 |
| Final Win Rate | 53.33% |
The DPO alignment was successful, achieving a win rate of 53.33%. While the high number of ties (93%) suggests that the base model already maintains a high standard of instruction-following, the DPO model successfully shifted the preference towards the "truthy" distribution without any losses against the base model.
To ensure efficient training, this project utilized:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model = "Qwen/Qwen2.5-1.5B-Instruct"
adapter_model = "your-username/Qwen2.5-1.5B-DPO-Truthy"
tokenizer = AutoTokenizer.from_pretrained(base_model)
model = AutoModelForCausalLM.from_pretrained(base_model)
model = PeftModel.from_pretrained(model, adapter_model)