Results
Exact match on the full constraint JSON (greedy decoding).
Table with columns: Eval set, Items, Base, This model| Eval set | Items | Base | This model |
|---|
| test (same generator as training) | 500 | 19.6% | 98.6% |
| test_unseen_phrasing (held-out wording) | 394 | 19.8% | 81.2% |
| human-written notes | 20 | 30.0% | 75.0% |
| GSM8K (lighteval, regression check) | — | 0.670 | 0.710 |
Refusal recall 75.2% → 96.6%; false refusals 9.4% → 0.1%; valid JSON 100%.



The gap between test and unseen/human phrasings shows the model partly learned the synthetic data generator; most remaining errors are unseen wordings and relative-time arithmetic.
{"intent": "set_constraints | no_action | off_topic | refuse", "constraints": [{"workload_id": "...", "field": "flex_tier | earliest_start | allow_pause", "value": "...", "action": "set | clear", "valid_until": "YYYY-MM-DD HH:MM | null"}], "explanation": "..."}
The system prompt (workload list, schema and rules) is in the GitHub repo's notebooks; the model expects it.
Training
- Adapter:
yoyu001/grid-dispatch-A-instruct-qlora-v1 (hash 1d4b4d4a), merged to float16
- QLoRA r=16, alpha=32, dropout 0.05, all attention and MLP projections
- 496 steps on one Kaggle T4 (fp16), 163 min, 5.9 GB peak memory
- Data: 5,000 rule-generated synthetic notes (
yoyu001/grid-dispatch-notes-zh, private); no real operator records
Limitations
- Less reliable on phrasings unlike the synthetic data; outputs must be validated and approved by a human before execution.
- Chinese (Traditional, Taiwan usage) operator notes only.
Final assignment for Unit 1 (SFT) of the Hugging Face smol-course.
中文摘要:以 QLoRA 微調 Qwen3-4B-Instruct-2507,把電網調度操作員的中文備註轉成限制條件 JSON,並拒絕違反 SLA 的指令;模型不做調度決策,輸出須經安全驗證與人員核准。