CoolFace
Modelpublic

nagasahiro/qwen3-4b-structured-lora-u-10bei_structured_data_with_cot_dataset_512_v4-sq090-20260302

sourceHugging Faceapache-2.0updated 7mo agoView on Hugging Face
0likes10downloads
Model Card

Qwen3-4B Structured LoRA - TrackB SQ090 ds512_v4 (v6=0.24934784)

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.

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: Qwen/Qwen3-4B-Instruct-2507
  • —Method: QLoRA (4-bit)
  • —Max sequence length: 512
  • —Epochs: 1.0
  • —Learning rate: 1e-06
  • —LoRA: r=64, alpha=128

Usage

python
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch

base = "Qwen/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/structureddatawithcotdataset512v4

Dataset License: MIT License Compliance: Competition rule compliant (allowed datasets only; no public_150 labels used for training; submission artifact policy respected).