Downloads · 30 days
7
9% of all-time downloads
kevineen/Qwen3-4B-instruct-2507-sft-dpo-001
Qwen3-4B-instruct-2507-sft-dpo-001 is a text generation model from kevineen. Use it when you need the model to write or continue text. It is set up for peft.
このリポジトリは、unsloth/Qwen3-4B-Instruct-2507 をベースモデルとし、QLoRAを用いてSFT + DPOでファインチューニングされた LoRA アダプターを提供します。
Downloads · 30 days
7
9% of all-time downloads
All-time downloads
76
Public
Repo size
58.6 MB
Likes
0
Public
Click a slice to open those files.
.safetensors47.2 MB · 75%
From the Hugging Face model README
このリポジトリは、unsloth/Qwen3-4B-Instruct-2507 をベースモデルとし、QLoRAを用いてSFT + DPOでファインチューニングされた LoRA アダプターを提供します。
【重要】本リポジトリには LoRA アダプターの重みのみが含まれています。ベースモデルは別途ロードする必要があります。
このアダプターは、StructEval-T ベンチマークにおける構造化出力(JSON / YAML / XML / TOML / CSV)の精度向上を目的としてトレーニングされています。
学習時、損失(Loss)は最終的なアシスタントの出力にのみ適用され、中間的な推論プロセス(Chain-of-Thought)はマスクされています。
データセット:
daichira/structured-hard-sft-4kLoRA パラメータ:
学習パラメータ:
unsloth/Qwen3-4B-Instruct-2507データセットライセンス: Creative Commons Attribution (CC-BY-4.0)
データセット:
u-10bei/dpo-dataset-qwen-cotSFT アダプターからの継続:
outputs/experiments/04_daichira_hard/04_daichira_hard/adapterLoRA パラメータ:
学習パラメータ:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = "unsloth/Qwen3-4B-Instruct-2507"
adapter = "kevineen/Qwen3-4B-instruct-2507-main-exp01"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(
base,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter)
# 推論
messages = [{"role": "user", "content": "Please output JSON code:\n\nTask: Generate a user profile with name and age."}]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.0)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(result)
vllm serve "kevineen/Qwen3-4B-instruct-2507-main-exp01" \
--base-model "unsloth/Qwen3-4B-Instruct-2507" \
--max-model-len 2048 \
--gpu-memory-utilization 0.60
daichira/structured-hard-sft-4ku-10bei/dpo-dataset-qwen-cot学習データはCC-BY-4.0ライセンスの条項に基づき、使用および再配布が可能です。
遵守事項:
unsloth/Qwen3-4B-Instruct-2507Holdout split(100 samples)での評価結果:
形式別スコア:
04_daichira_harddpo_from_daichira_hardsft_dpo_v1daichira本モデルを使用する場合は、以下のクレジットを含めてください:
@model{qwen3_4b_structeval_2026,
title={Qwen3-4B-Structured-Output-LoRA},
author={kevineen},
year={2026},
base_model={unsloth/Qwen3-4B-Instruct-2507},
sft_dataset={daichira/structured-hard-sft-4k},
dpo_dataset={u-10bei/dpo-dataset-qwen-cot},
license={CC-BY-4.0}
}