Downloads · 30 days
10
3% of all-time downloads
yuk1chan/qwen3-4b-structeval-yamlxml-boost-v2-lr6e-6
qwen3-4b-structeval-yamlxml-boost-v2-lr6e-6 is a text generation model from yuk1chan. 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).
Downloads · 30 days
10
3% of all-time downloads
All-time downloads
303
Public
Repo size
408 MB
Likes
0
Public
Click a slice to open those files.
.safetensors132 MB · 90%
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).
This adapter is trained to improve structured output accuracy (JSON / YAML / XML / TOML / CSV).
Strategy 2 Revised: YAML/XML Clean Expansion 🔥
Based on expert AI analysis, this revision addresses the root causes of YAML/XML failures:
u-10bei系: 「Output:」以降だけを抽出
daichira系: 2倍ブースト(「Return ONLY」パターン)
YAML/XML: 2倍ブースト
<thinking>...</thinking> completely removedyaml, json, xml, toml, ````csv removedTotal: ~25,000-30,000 samples
u-10bei系(「Output:」抽出適用):
daichira系(2倍ブースト):
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = "Qwen/Qwen3-4B-Instruct-2507"
adapter = "yuk1chan/qwen3-4b-structeval-yamlxml-boost-v2-lr6e-6"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(
base,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(model, adapter)
# Inference
prompt = "Generate YAML code for..."
# ... your inference code
Training Results
- Training Loss: ~1.25-1.30
- Validation Loss: ~1.50-1.55
- Training Time: ~8-9 hours
- Expected Score: 0.805-0.810 (YAML/XML improvement from 0.80195 baseline)
Strategy: YAML/XML Clean Expansion (Revised)
Key Insights from Expert AI Analysis:
The main causes of YAML/XML failures are:
1. Code fences (yaml, xml) appearing in output
2. Leading phrases ("Here's the output:", "Sure!") before output
3. u-10bei datasets' "Approach: → Output:" structure leaking into outputs
Solutions Implemented:
┌─────────────────────────────────────┬──────────────────────────────┬───────────────────────────────────┐
│ Problem │ Solution │ Effect │
├─────────────────────────────────────┼──────────────────────────────┼───────────────────────────────────┤
│ u-10bei "Output:" structure │ Extract only after "Output:" │ Removes explanation tendency │
├─────────────────────────────────────┼──────────────────────────────┼───────────────────────────────────┤
│ Insufficient "Return ONLY" examples │ Boost daichira datasets 2x │ Strengthens direct output pattern │
├─────────────────────────────────────┼──────────────────────────────┼───────────────────────────────────┤
│ YAML/XML too weak │ Boost YAML/XML 2x │ More training data │
└─────────────────────────────────────┴──────────────────────────────┴───────────────────────────────────┘
Expected Improvements:
┌────────┬──────────┬────────┬──────────────────────────┐
│ Format │ Baseline │ Target │ Strategy │
├────────┼──────────┼────────┼──────────────────────────┤
│ YAML │ 94.3% │ 96-97% │ Clean u-10bei + 2x boost │
├────────┼──────────┼────────┼──────────────────────────┤
│ XML │ 85.0% │ 88-90% │ Clean u-10bei + 2x boost │
├────────┼──────────┼────────┼──────────────────────────┤
│ TOML │ 100.0% │ 100% │ Maintain │
├────────┼──────────┼────────┼──────────────────────────┤
│ JSON │ 96.0% │ 96%+ │ Maintain │
├────────┼──────────┼────────┼──────────────────────────┤
│ CSV │ 100.0% │ 100% │ Maintain │
└────────┴──────────┴────────┴──────────────────────────┘
License
Apache 2.0
---
Trained on Cleaned StructEval dataset (YAML/XML Boosted - Revised)
Learning Rate: 6e-6 (conservative setting)
Strategy: u-10bei Output extraction + daichira 2x + YAML/XML 2x
Based on expert AI analysis