Downloads · 30 days
10
10% of all-time downloads
Shion1124/qwen3-4b-struct-lora
qwen3-4b-struct-lora is a text generation model from Shion1124. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
unsloth/Qwen3-4B StructEval-T Optimized (v5 + Hard Mix)
Downloads · 30 days
10
10% of all-time downloads
All-time downloads
103
Public
Repo size
280 MB
Likes
0
Public
Click a slice to open those files.
.safetensors269 MB · 95%
From the Hugging Face model README
unsloth/Qwen3-4B StructEval-T Optimized (v5 + Hard Mix)
This repository provides a DoRA adapter fine-tuned from unsloth/Qwen3-4B-Instruct-2507 using QLoRA (4-bit, Unsloth).
This repository contains DoRA adapter weights only. The base model must be loaded separately.
This adapter is trained to improve structured output accuracy (JSON / YAML / XML / TOML / CSV).
Loss is applied only to the final assistant output, while intermediate reasoning (Chain-of-Thought) is masked.
Model Selection
unsloth/Qwen3-4B-Instruct-2507MAX_SEQ_LEN (1024), which is crucial for processing long structural requirements in the StructEval-T benchmark.Dataset Strategy (Strategy B) To achieve both high formatting accuracy and complex reasoning, a hybrid dataset approach was used:
Preprocessing & Data Engineering Unlike simple fine-tuning, the following programmatic enhancements were applied to the training data:
Reasoning... Output: {Structured Data} pattern to maximize the effectiveness of CoT masking.Hyperparameters & Optimization
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = "unsloth/Qwen3-4B-Instruct-2507"
# adapter = "your_id/your-repo"
adapter = "Shion1124/qwen3-4b-struct-lora"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(
base,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter)
Training data: u-10bei/structured_data_with_cot_dataset_512_v5, daichira/structured-hard-sft-4k
Dataset License: MIT License. This dataset is used and distributed under the terms of the MIT License. Compliance: Users must comply with the MIT license (including copyright notice) and the base model's original terms of use.
This model was trained on a custom mixture of the following datasets (Strategy B):
Dataset Licenses: ・The datasets are used under their respective permissive licenses (MIT License / Apache-2.0). ・Users of this model must comply with the original terms provided by the dataset authors.
Model Compliance: This model is a derivative work of Qwen3-4B-Instruct-2507. Users must adhere to the original license terms and usage policies set by the Qwen team.