Qwen3-4B-Agent-StructEval-T-DoRA-DPO-v5-HardMix
This model is a fine-tuned version of unsloth/Qwen3-4B-Instruct-2507 using Direct Preference Optimization (DPO) via the Unsloth library.
This repository contains the full-merged 16-bit weights. No adapter loading is required.
Training Objective
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.
Model Description
This model is specifically fine-tuned for structured data generation (JSON/XML/YAML/TOML/CSV). It follows a two-stage training process:
- SFT: Trained on a 7:3 mix of
v5(High-quality) andHard-Mix(Complex reasoning) datasets using DoRA. - DPO: Refined with
dpo-dataset-qwen-cotto align reasoning processes and formatting precision.
Training Configuration
- Base model: unsloth/Qwen3-4B-Instruct-2507
- Method: DPO (Direct Preference Optimization) + DoRA
- SFT Data Strategy: 70% u-10bei/v5 + 30% daichira/hard-4k
- Max Sequence Length: 1536 (Prompt: 1024)
- Learning rate: 5e-07
- Beta: 0.1
- LoRA Config: r=16, alpha=32 (Weight-Decomposed)
Usage
Since this is a merged model, you can use it directly with transformers.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "Shion1124/dpo-qwen-cot-merged"
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"
# Note: Doubled braces { } are used here to escape them in the python f-string
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]))
Sources & License (IMPORTANT)
Training Data: [u-10bei/dpo-dataset-qwen-cot]
License: MIT License. (As per dataset terms).
Compliance: Users must follow the original base model's license terms.
Training Data: (Supplementary)
- u-10bei/structured_data_with_cot_dataset_512_v5
- daichira/structured-hard-sft-4k
- u-10bei/dpo-dataset-qwen-cot
- Downloads last month
- 2
Model tree for Shion1124/dpo-qwen-cot-merged
Base model
Qwen/Qwen3-4B-Instruct-2507