Downloads · 30 days
8
16% of all-time downloads
NobutaMN/dpo-qwen-cot-mergedv2
dpo-qwen-cot-mergedv2 is a text generation model from NobutaMN. 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 model is a fine-tuned version of NobutaMN/qwen3-4b-structevalt-lora-nobuta-v2change using Direct Preference Optimization (DPO) via the Unsloth library.
Downloads · 30 days
8
16% of all-time downloads
All-time downloads
49
Public
Parameters
4.1B
4.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors4.1 GB · 100%
How the weights are stored.
U83.1B · 76%
From the Hugging Face model README
This model is a fine-tuned version of NobutaMN/qwen3-4b-structevalt-lora-nobuta-v2change using Direct Preference Optimization (DPO) via the Unsloth library.
This repository contains LoRA adapter weights only. The base model must be loaded separately.
This model has been optimized using DPO to align its responses with preferred outputs, focusing on improving reasoning (Chain-of-Thought) and structured response quality based on the provided preference dataset.
This is a LoRA adapter. Load the base model, then apply the adapter.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
base_id = "Qwen/Qwen3-4B-Instruct-2507"
adapter_id = "your_id/your-repo-name"
tokenizer = AutoTokenizer.from_pretrained(base_id)
model = AutoModelForCausalLM.from_pretrained(
base_id,
torch_dtype=torch.float16,
device_map="auto"
)
from peft import PeftModel
model = PeftModel.from_pretrained(model, adapter_id)
# 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]))