RinnRinnmini/lora_structeval_t_qwen3_4b_sft_v3
This repository provides a LoRA adapter (PEFT) fine-tuned from Qwen/Qwen3-4B-Instruct-2507 for structured output tasks (StructEval-T style).
Important: This repo contains LoRA adapter weights only. Load the base model separately, then apply this adapter.
Training Objective
Improve structured output accuracy and stability for formats such as JSON / YAML / XML / TOML / CSV.
Usage (example)
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_id = "Qwen/Qwen3-4B-Instruct-2507"
adapter_id = "RinnRinnmini/lora_structeval_t_qwen3_4b_sft_v3"
tokenizer = AutoTokenizer.from_pretrained(base_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
base_id,
device_map="auto",
torch_dtype=torch.float16,
trust_remote_code=True,
)
model = PeftModel.from_pretrained(model, adapter_id)
model.eval()
prompt = "Convert this JSON to YAML. Return ONLY YAML.\n\nJSON:\n{\"a\": 1, \"b\": [2,3]}"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=256, do_sample=False)
print(tokenizer.decode(out[0], skip_special_tokens=True))
Sources & License (IMPORTANT)
- Base model: Qwen/Qwen3-4B-Instruct-2507 (see the base model license / terms)
- Training dataset(s): u-10bei/structured_data_with_cot_dataset_512_v5
- Please check each dataset card for the license/usage constraints and comply accordingly.
- Downloads last month
- 20
Model tree for RinnRinnmini/lora_structeval_t_qwen3_4b_sft_v3
Base model
Qwen/Qwen3-4B-Instruct-2507