Views
No views yet
<thinking>...</thinking> completely removedyaml, json, xml, toml, ````csv removed1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3import torch
4
5base = "Qwen/Qwen3-4B-Instruct-2507"
6adapter = "yuk1chan/qwen3-4b-structeval-yamlxml-boost-v2-lr6e-6"
7
8tokenizer = AutoTokenizer.from_pretrained(base)
9model = AutoModelForCausalLM.from_pretrained(
10 base,
11 torch_dtype=torch.float16,
12 device_map="auto",
13)
14model = PeftModel.from_pretrained(model, adapter)
15
16# Inference
17prompt = "Generate YAML code for..."
18# ... your inference code
19
20Training Results
21
22- Training Loss: ~1.25-1.30
23- Validation Loss: ~1.50-1.55
24- Training Time: ~8-9 hours
25- Expected Score: 0.805-0.810 (YAML/XML improvement from 0.80195 baseline)
26
27Strategy: YAML/XML Clean Expansion (Revised)
28
29Key Insights from Expert AI Analysis:
30
31The main causes of YAML/XML failures are:
321. Code fences (yaml, xml) appearing in output
332. Leading phrases ("Here's the output:", "Sure!") before output
343. u-10bei datasets' "Approach: → Output:" structure leaking into outputs
35
36Solutions Implemented:
37┌─────────────────────────────────────┬──────────────────────────────┬───────────────────────────────────┐
38│ Problem │ Solution │ Effect │
39├─────────────────────────────────────┼──────────────────────────────┼───────────────────────────────────┤
40│ u-10bei "Output:" structure │ Extract only after "Output:" │ Removes explanation tendency │
41├─────────────────────────────────────┼──────────────────────────────┼───────────────────────────────────┤
42│ Insufficient "Return ONLY" examples │ Boost daichira datasets 2x │ Strengthens direct output pattern │
43├─────────────────────────────────────┼──────────────────────────────┼───────────────────────────────────┤
44│ YAML/XML too weak │ Boost YAML/XML 2x │ More training data │
45└─────────────────────────────────────┴──────────────────────────────┴───────────────────────────────────┘
46Expected Improvements:
47┌────────┬──────────┬────────┬──────────────────────────┐
48│ Format │ Baseline │ Target │ Strategy │
49├────────┼──────────┼────────┼──────────────────────────┤
50│ YAML │ 94.3% │ 96-97% │ Clean u-10bei + 2x boost │
51├────────┼──────────┼────────┼──────────────────────────┤
52│ XML │ 85.0% │ 88-90% │ Clean u-10bei + 2x boost │
53├────────┼──────────┼────────┼──────────────────────────┤
54│ TOML │ 100.0% │ 100% │ Maintain │
55├────────┼──────────┼────────┼──────────────────────────┤
56│ JSON │ 96.0% │ 96%+ │ Maintain │
57├────────┼──────────┼────────┼──────────────────────────┤
58│ CSV │ 100.0% │ 100% │ Maintain │
59└────────┴──────────┴────────┴──────────────────────────┘
60License
61
62Apache 2.0
63
64---
65Trained on Cleaned StructEval dataset (YAML/XML Boosted - Revised)
66Learning Rate: 6e-6 (conservative setting)
67Strategy: u-10bei Output extraction + daichira 2x + YAML/XML 2x
68Based on expert AI analysis