Downloads · 30 days
0
MSakae/dpo-qwen-cot-merged
dpo-qwen-cot-merged is a text generation model from MSakae. 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 a merged 16-bit model derived from Qwen/Qwen3-4B-Instruct-2507. The model was trained using Direct Preference Optimization (DPO) via the Unsloth library, starting from an SFT-initialized LoRA…
Downloads · 30 days
0
Access
Public
Updated Feb 8, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.md2.6 KB · 63%
From the Hugging Face model README
This repository provides a merged 16-bit model derived from Qwen/Qwen3-4B-Instruct-2507. The model was trained using Direct Preference Optimization (DPO) via the Unsloth library, starting from an SFT-initialized LoRA adapter.
Training pipeline: Base model → Structured-output SFT (LoRA) → DPO preference alignment → merged_16bit export
✅ Full merged 16-bit weights (no adapter loading required)
✅ Tokenizer files
✅ Model card (this README)
Before DPO, the base model was initialized with an SFT LoRA adapter to improve structured output behavior (JSON / YAML / XML / TOML / CSV style formatting).
SFT initialization adapter:
MSakae/qwen3-4b-structured-output-lora_sample_try_L4
The SFT-initialized model was further optimized using DPO with a preference dataset.
DPO dataset:
u-10bei/dpo-dataset-qwen-cot
DPO aims to improve:
Since this is a merged model, you can use it 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"
)
# Test inference
prompt = "Your question here"
inputs = tokenizer.apply_chat_template([{"role": "user", "content": prompt}], tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0]))