Downloads · 30 days
0
kisyou07/lora_structeval_t_qwen3_4b_lr2e5_ep2_wd001_dpo1
lora_structeval_t_qwen3_4b_lr2e5_ep2_wd001_dpo1 is a text generation model from kisyou07. 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 repository contains a LoRA adapter fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using Direct Preference Optimization (DPO) with the u-10bei/dpo-dataset-qwen-cot preference dataset.
Downloads · 30 days
0
Access
Public
Updated Feb 24, 2026
Repo size
540 MB
Likes
0
Public
Click a slice to open those files.
.safetensors529 MB · 97%
From the Hugging Face model README
This repository contains a LoRA adapter fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using Direct Preference Optimization (DPO) with the u-10bei/dpo-dataset-qwen-cot preference dataset.
✅ This is NOT a merged full model.
You must load the base model and then apply this LoRA adapter via PEFT.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
BASE_MODEL = "Qwen/Qwen3-4B-Instruct-2507"
ADAPTER_ID = "your_id/your-repo-name" # <-- this repo
tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
base = AutoModelForCausalLM.from_pretrained(
BASE_MODEL,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(base, ADAPTER_ID)
# Inference example
prompt = "Produce a TOML document for an API specification."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(out[0], skip_special_tokens=True))