Text Generation
Transformers
English
dpo
sft
unsloth
qwen
alignment

qwen3-4b-sft-dpo-combined-078

This model is a two-stage fine-tuned version of Qwen/Qwen3-4B-Instruct-2507:

Training Pipeline

Stage 1: SFT (Supervised Fine-Tuning)

  • Dataset: u-10bei/structured_data_with_cot_dataset_512_v2
  • Learning rate: 1e-6
  • Epochs: 3
  • LoRA: r=64, alpha=128
  • StructEval Score: 0.780 (baseline: 0.700)

Stage 2: DPO (Direct Preference Optimization)

  • Base: SFT model (0.780)
  • Dataset: u-10bei/dpo-dataset-qwen-cot
  • Learning rate: 5e-08
  • Epochs: 1
  • Beta: 0.1
  • LoRA: r=8, alpha=16

This repository contains the full-merged 16-bit weights (SFT + DPO combined).

Training Configuration

SFT Stage

Base model: Qwen/Qwen3-4B-Instruct-2507
Method: QLoRA (4-bit)
Max sequence length: 512
Epochs: 3
Learning rate: 1e-6
LoRA: r=64, alpha=128
GPU: A100 (BFloat16)
Result: StructEval score 0.780

DPO Stage

Base: SFT model (0.780)
Method: DPO with QLoRA
Max sequence length: 1024
Epochs: 1
Learning rate: 5e-08
Beta: 0.1
LoRA: r=8, alpha=16
GPU: A100 (BFloat16)

Usage

Since this is a merged model, you can use it directly:

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "your_username/sft-dpo-qwen-078-plus"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.float16,
    device_map="auto"
)

# Example inference
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("cuda")

outputs = model.generate(inputs, max_new_tokens=512, temperature=0.0)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Sources & License

Training Data

Compliance

Users must comply with:

  • Base model license (Qwen)
  • Dataset licenses (MIT)
  • All applicable terms of use

Performance

  • SFT only: StructEval score 0.780
  • SFT + DPO: [To be evaluated]

Expected improvement: +0.02 to +0.04 points

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for legoskier/sft-dpo-qwen-078-plus

Finetuned
(1666)
this model

Datasets used to train legoskier/sft-dpo-qwen-078-plus