u-10bei/dpo-dataset-qwen-cot
Viewer • Updated • 4.04k • 18 • 2
How to use inagakimugi/qwen3-4b-dpo-v4 with PEFT:
Task type is invalid.
This repository provides a LoRA adapter fine-tuned from inagakimugi/qwen3-4b-sft-merged-v4 using DPO (Direct Preference Optimization) and QLoRA.
This repository contains LoRA adapter weights only. The base model must be loaded separately.
This adapter is trained to align the model with human preferences, specifically focusing on structured output accuracy and reasoning quality.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = "inagakimugi/qwen3-4b-sft-merged-v4"
adapter = "inagakimugi/qwen3-4b-dpo-v4"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(
base,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter)
Sources & Terms (IMPORTANT)
Training data: u-10bei/dpo-dataset-qwen-cot
Dataset License: MIT License. This dataset is used and distributed under the terms of the MIT License.
Compliance: Users must comply with the MIT license (including copyright notice) and the base model's original terms of use.
Base model
inagakimugi/qwen3-4b-sft-merged-v4