Downloads · 30 days
9
12% of all-time downloads
DTakai/sft4-allowed4k-1epoch-lora
sft4-allowed4k-1epoch-lora is a machine learning model from DTakai. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
This repository provides a LoRA adapter fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using QLoRA (4-bit, Unsloth).
Downloads · 30 days
9
12% of all-time downloads
All-time downloads
73
Public
Repo size
3.2 GB
Likes
0
Public
Click a slice to open those files.
.pt2.1 GB · 56%
From the Hugging Face model README
This repository provides a LoRA adapter fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using QLoRA (4-bit, Unsloth).
This repository contains LoRA adapter weights only. The base model must be loaded separately.
This adapter is trained to improve structured output accuracy for:
The training script applies loss to the final assistant output only. Intermediate reasoning (Chain-of-Thought) is masked.
Qwen/Qwen3-4B-Instruct-2507This adapter was trained on a cleaned + deduplicated dataset built from the organizer-approved SFT datasets:
u-10bei/structured_data_with_cot_dataset_512_v2u-10bei/structured_data_with_cot_dataset_512_v4u-10bei/structured_data_with_cot_dataset_512_v5u-10bei/structured_data_with_cot_dataset_512u-10bei/structured_data_with_cot_dataset_v2u-10bei/structured_data_with_cot_datasetdaichira/structured-3k-mix-sftdaichira/structured-5k-mix-sftdaichira/structured-hard-sft-4kThe local build process validates that assistant outputs are parseable for their target format and removes exact duplicates.
Notes:
This repository contains LoRA adapter weights only.
Qwen/Qwen3-4B-Instruct-2507)daichira/*: CC-BY-4.0u-10bei/*: MIT (please verify each dataset page)from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_id = "Qwen/Qwen3-4B-Instruct-2507"
adapter_id = "DTakai/sft4-allowed4k-1epoch-lora"
tokenizer = AutoTokenizer.from_pretrained(base_id)
base = AutoModelForCausalLM.from_pretrained(
base_id,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(base, adapter_id)
# Optional: merge LoRA into base weights
merged = model.merge_and_unload()
If you are following a notebook that merges the LoRA adapter and runs vLLM, you can point it at:
Qwen/Qwen3-4B-Instruct-2507DTakai/sft4-allowed4k-1epoch-loraこのリポジトリは、Qwen/Qwen3-4B-Instruct-2507 をベースモデルとして、QLoRA (4-bit, Unsloth) を用いてファインチューニングした LoRA アダプタを提供します。
本リポジトリには LoRA アダプタの重みのみが含まれています。ベースモデルは別途ロードする必要があります。
このアダプタは、以下の構造化出力の精度向上を目的として学習されています。
学習スクリプトでは、損失(Loss)は最終的なアシスタント出力のみに適用されます。中間の推論(Chain-of-Thought)はマスクされています。
Qwen/Qwen3-4B-Instruct-2507このアダプタは、主催者が許可した SFT データセット群から作成した「クリーニング済み + 重複排除済み」のデータを用いて学習されています。
u-10bei/structured_data_with_cot_dataset_512_v2u-10bei/structured_data_with_cot_dataset_512_v4u-10bei/structured_data_with_cot_dataset_512_v5u-10bei/structured_data_with_cot_dataset_512u-10bei/structured_data_with_cot_dataset_v2u-10bei/structured_data_with_cot_datasetdaichira/structured-3k-mix-sftdaichira/structured-5k-mix-sftdaichira/structured-hard-sft-4kローカルのビルド工程では、アシスタント出力がターゲット形式としてパース可能であることを検証し、完全一致の重複を除去します。
注意:
本リポジトリには LoRA アダプタの重みのみが含まれます。
Qwen/Qwen3-4B-Instruct-2507 を参照)daichira/*: CC-BY-4.0u-10bei/*: MIT(各データセットページで確認してください)from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base_id = "Qwen/Qwen3-4B-Instruct-2507"
adapter_id = "DTakai/sft4-allowed4k-1epoch-lora"
tokenizer = AutoTokenizer.from_pretrained(base_id)
base = AutoModelForCausalLM.from_pretrained(
base_id,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(base, adapter_id)
# Optional: merge LoRA into base weights
merged = model.merge_and_unload()
LoRA アダプタをマージして vLLM で推論するノートブック/スクリプトを使う場合は、以下を指定できます。
Qwen/Qwen3-4B-Instruct-2507DTakai/sft4-allowed4k-1epoch-lora