Downloads · 30 days
4
1% of all-time downloads
kenzrx/dpo-qwen-cot-merged
dpo-qwen-cot-merged is a text generation model from kenzrx. 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.
This repository provides full-merged 16-bit weights (no adapter loading required).
Downloads · 30 days
4
1% of all-time downloads
All-time downloads
643
Public
Parameters
4B
24.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8 GB · 100%
From the Hugging Face model README
This repository provides full-merged 16-bit weights (no adapter loading required).
This model was trained in two stages:
The DPO stage optimizes the model to prefer chosen outputs over rejected outputs given the same prompt, improving response alignment and structured quality.
You can use this model directly with transformers.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "your_id/your-repo-name"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto",
)
prompt = "Your question here"
messages = [
{"role": "user", "content": prompt},
]
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))