Downloads · 30 days
82
45% of all-time downloads
kunjcr2/qwen2.5-0.5b-sft-dpo
qwen2.5-0.5b-sft-dpo is a text generation model from kunjcr2. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
Downloads · 30 days
82
45% of all-time downloads
All-time downloads
182
Public
Repo size
171 MB
Likes
1
Public
Click a slice to open those files.
.pt106 MB · 41%
From the Hugging Face model README
This repository contains:
Both are packaged in one repo:
dpo_adapters/ = LoRA adapters (DPO preference optimization)# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="kunjcr2/qwen2.5-0.5b-sft-dpo")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages)
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
tok = AutoTokenizer.from_pretrained("your-username/qwen2.5-0.5b-sft-dpo")
base = AutoModelForCausalLM.from_pretrained("your-username/qwen2.5-0.5b-sft-dpo", torch_dtype="auto", device_map="auto")
model = PeftModel.from_pretrained(base, "your-username/qwen2.5-0.5b-sft-dpo/dpo_adapters")
SFT:
DPO:
If you use this model, cite Qwen as the base and this repo for the SFT+DPO adapters.
@misc{qwen2.5sftdpo,
title = {Qwen2.5-0.5B SFT + DPO (LoRA)},
author = {Your Name},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/kunjcr2/qwen2.5-0.5b-sft-dpo}}
}