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-clean-maxsteps1500-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.26-1.30
23- Validation Loss: ~1.50-1.53
24- Training Steps: ~1,500 (1.2x deeper than usual)
25- Training Time: ~8 hours
26- Expected Score: 0.802-0.806 (YAML/XML improvement from 0.80195 baseline)
27
28Strategy: Deeper Learning
29
30Key Innovation: Increasing max_steps from 1,172 to 1,500 to allow deeper learning.
31
32Rationale:
33- 1 epoch (1,172 steps) may not be sufficient for the model to fully learn the patterns
34- By training 28% longer, we aim to improve YAML/XML performance
35- TOML 100% performance is expected to be maintained
36
37License
38
39Apache 2.0
40
41---
42Trained on Cleaned StructEval dataset (20,000 samples)
43Learning Rate: 6e-6 (conservative setting)
44Max Steps: 1,500 (1.2x deeper training)