qwen3-4b-structured-output-lora_2
This repository provides a LoRA adapter obtained by continued fine-tuning of an existing structured-output LoRA originally trained on unsloth/Qwen3-4B-Instruct-2507.
This adapter is not trained from scratch. It is a continuation of:
mandalgo/qwen3-4b-structured-output-lora_1
This repository contains LoRA adapter weights only. The base model must be loaded separately.
Training Objective
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.
Training Configuration
- Base model: unsloth/Qwen3-4B-Instruct-2507
- Parent adapter: qwen3-4b-structured-output-lora_1
- Method: QLoRA (4-bit, Unsloth)
- Max sequence length: 512
- Epochs: 1 (continued fine-tuning)
- Learning rate: 1e-06
- LoRA: r=64, alpha=128
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = "unsloth/Qwen3-4B-Instruct-2507"
adapter = "your_id/your-repo"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(
base,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter)
Sources & Terms (IMPORTANT)
Training data:
- u-10bei/structured_data_with_cot_dataset_512_v5 (MIT License)
- daichira/structured-hard-sft-4k (CC-BY-4.0, synthetic)
The daichira dataset is a purely synthetic dataset licensed under Creative Commons Attribution 4.0 (CC-BY-4.0).
When using or redistributing this adapter, users must provide appropriate attribution to the dataset author in accordance with the CC-BY-4.0 license.
This adapter is a continued fine-tuning of a prior LoRA adapter and must also comply with:
- The base model license (Apache-2.0)
- The original adapter license
- All dataset licenses listed above
Attribution
Dataset "structured-hard-sft-4k" by daichira, licensed under CC-BY-4.0.
- Downloads last month
- 3
Model tree for mandalgo/qwen3-4b-structured-output-lora_2
Base model
Qwen/Qwen3-4B-Instruct-2507