Downloads · 30 days
13
7% of all-time downloads
ruijiewang45401/qwen2.5-7b-humanlike-dpo
qwen2.5-7b-humanlike-dpo is a text generation model from ruijiewang45401. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Fine-tuned Qwen2.5-7B-Instruct with DPO for more natural, empathetic conversations.
Downloads · 30 days
13
7% of all-time downloads
All-time downloads
182
Public
Parameters
7.6B
15.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors15.2 GB · 100%
From the Hugging Face model README
Fine-tuned Qwen2.5-7B-Instruct with DPO for more natural, empathetic conversations.
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model = AutoModelForCausalLM.from_pretrained(
"ruijiewang45401/qwen2.5-7b-humanlike-dpo",
torch_dtype=torch.bfloat16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("ruijiewang45401/qwen2.5-7b-humanlike-dpo")
messages = [
{"role": "system", "content": "You are a warm and helpful assistant."},
{"role": "user", "content": "Hello!"}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to("cuda")
outputs = model.generate(
**inputs,
max_new_tokens=200,
temperature=0.8,
top_p=0.9,
do_sample=True
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
| Parameter | Value |
|---|---|
| Beta | 0.1 |
| Learning Rate | 5e-5 |
| Batch Size | 2 × 8 |
| Max Length | 1024 |
| Epochs | 1 |
| Optimizer | AdamW |
| Scheduler | Cosine |
model.generate(
**inputs,
max_new_tokens=150-300,
temperature=0.7-0.9, # Higher = more natural
top_p=0.9,
repetition_penalty=1.1,
do_sample=True
)
@misc{qwen25-humanlike-dpo,
author = {ruijiewang45401},
title = {Qwen2.5-7B Human-like DPO},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/ruijiewang45401/qwen2.5-7b-humanlike-dpo}
}