Downloads · 30 days
7
10% of all-time downloads
GawinGowin/dpo-struct-output-sfted
dpo-struct-output-sfted is a text generation model from GawinGowin. 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 full-merged 16-bit version of Qwen/Qwen3-4B-Instruct-2507 with a Supervised Fine-Tuning (SFT) LoRA adapter merged into the base weights.
Downloads · 30 days
7
10% of all-time downloads
All-time downloads
68
Public
Parameters
4B
8.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors8.1 GB · 100%
From the Hugging Face model README
This model is a full-merged 16-bit version of Qwen/Qwen3-4B-Instruct-2507 with a Supervised Fine-Tuning (SFT) LoRA adapter merged into the base weights.
It serves as the base model for subsequent DPO training.
Qwen/Qwen3-4B-Instruct-2507 (base)
|
v
SFT via QLoRA (4-bit, Unsloth)
- Objective: structured output accuracy (JSON / YAML / XML / TOML / CSV)
- Adapter: GawinGowin/lora-struct-output (private)
|
v
Merge adapter into full weights -> this model
|
v
DPO -> GawinGowin/dpo-struct-output-sfted
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen3-4B-Instruct-2507 |
| Method | QLoRA (4-bit) + Unsloth |
| Training objective | Structured output (JSON / YAML / XML / TOML / CSV) |
| Dataset | u-10bei/structured_data_with_cot_dataset_512_v2 |
| Max sequence length | 512 |
| Epochs | 1 |
| Learning rate | 1e-6 |
| LoRA r / alpha | 64 / 128 |
| CoT Masking | Enabled (loss applied after Output: marker only) |
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Use the DPO model for inference
model_id = "GawinGowin/dpo-struct-output-sfted"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype=torch.float16, device_map="auto",
)