Downloads · 30 days
9
19% of all-time downloads
ryo-llm/qwen3-4b-structured-output-lora-202602080937
qwen3-4b-structured-output-lora-202602080937 is a text generation model from ryo-llm. 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.
This repository provides a LoRA adapter fine-tuned from Qwen/Qwen3-4B-Instruct-2507 using QLoRA (4-bit, Unsloth) to improve structured output accuracy (JSON / YAML / XML / TOML / CSV).
Downloads · 30 days
9
19% of all-time downloads
All-time downloads
48
Public
Repo size
276 MB
Likes
0
Public
Click a slice to open those files.
.safetensors264 MB · 95%
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) to improve structured output accuracy (JSON / YAML / XML / TOML / CSV).
This repository contains LoRA adapter weights only.
Load the base model separately, then apply this adapter.
Improve strict, machine-readable structured outputs (no extra prose).
To reduce preface/explanation text learned from the synthetic dataset, the training samples were normalized:
Output: in the final assistant message.json/yaml/xml/toml/```csv).from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = "Qwen/Qwen3-4B-Instruct-2507"
adapter = "ryo-llm/qwen3-4b-structured-output-lora-202602080937"
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
Dataset License: MIT License (see the dataset card).
Compliance: Users must comply with the dataset license terms and the base model's original terms of use.