Downloads · 30 days
0
svjay/dpo-qwen2.5-7b-adapter
dpo-qwen2.5-7b-adapter is a machine learning model from svjay. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
A LoRA adapter trained with Direct Preference Optimization (DPO) on top of Qwen/Qwen2.5-7B-Instruct, on a subset of UltraFeedback. Trained under a tight compute budget (single L40S, 2–3 hr window) as part of a two-poi…
Downloads · 30 days
0
Access
Public
Updated Jul 18, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md3 KB · 67%
From the Hugging Face model README
A LoRA adapter trained with Direct Preference Optimization (DPO) on top of
Qwen/Qwen2.5-7B-Instruct, on a subset of UltraFeedback. Trained under a
tight compute budget (single L40S, 2–3 hr window) as part of a two-point
beta ablation study; this checkpoint is the beta=0.3 run.
Evaluated with a position-bias-controlled pairwise LLM judge (Llama-3.3-70B via Groq API) on 150 held-out UltraFeedback prompts, comparing this DPO-adapted model against the unmodified Qwen2.5-7B-Instruct baseline. Each pair was judged twice with response order swapped to detect position bias.
| Metric | Value (n=133 judged) |
|---|---|
| Raw DPO win-rate | 5.3% |
| DPO wins / Baseline wins | 7 / 7 |
| Tie / position-disagreement rate | 89.5% |
Honest interpretation: the ~90% tie/position-disagreement rate indicates the judge could not reliably discriminate between baseline and DPO outputs for most prompts under this training budget. This is consistent with a parallel run at beta=0.1 on a different base model (Llama-3.1-8B-Instruct), which showed a near-identical ~89% instability rate. Loss and reward margins moved in the expected direction during training, so this reflects a measurement/training-budget limitation (small dataset, single epoch, possibly judge-capacity limits at 8B-class), not a training failure.
This is a research/portfolio artifact demonstrating a DPO training and rigorous pairwise-eval pipeline under constrained compute — not intended for production deployment.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct", torch_dtype="bfloat16", device_map="auto")
model = PeftModel.from_pretrained(base, "svjay/dpo-qwen2.5-7b-adapter")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")