debudash commited on
Commit
8a1660c
·
verified ·
1 Parent(s): d5b8ccd

Add v4 and v5 configs; v5 (final model's data) is the default

Browse files
Files changed (4) hide show
  1. README.md +52 -43
  2. data/templates.json +79 -0
  3. data/train_v4.jsonl +0 -0
  4. data/train_v5.jsonl +0 -0
README.md CHANGED
@@ -12,8 +12,16 @@ tags:
12
  size_categories:
13
  - 10K<n<100K
14
  configs:
15
- - config_name: v3
16
  default: true
 
 
 
 
 
 
 
 
17
  data_files:
18
  - split: train
19
  path: data/train_v3.jsonl
@@ -31,34 +39,31 @@ configs:
31
  path: data/smoke.jsonl
32
  ---
33
 
34
- # tz-convert SFT data
35
-
36
- Supervised fine-tuning data that teaches a small model one behaviour: convert a date-time between timezones and
37
- reply with exactly one line. That line is the converted moment as `YYYY-MM-DDTHH:MM:SS±HH:MM` per tzdata 2026e, or
38
- `AMBIGUOUS: <component>` / `INVALID: <component>` when the model can't convert without guessing. It never guesses,
39
- even when the user insists.
40
-
41
- The full rules are in [behaviour.spec](behaviour.spec). The closed world is in [zones.json](zones.json) (24 zones)
42
- and [abbreviations.json](abbreviations.json) (v3), for source dates 2020-2030.
43
 
44
  - **Code, eval harness and results:** [debudash/slm-training](https://huggingface.co/debudash/slm-training)
45
- - **Best checkpoint:** [debudash/qwen3-4b-tz-convert-v3-n12000](https://huggingface.co/debudash/qwen3-4b-tz-convert-v3-n12000)
46
- (QLoRA adapter on `Qwen/Qwen3-4B-Instruct-2507`, trained on the `v3` config)
47
 
48
  ```python
49
  from datasets import load_dataset
50
- ds = load_dataset("debudash/tz-convert-sft", "v3", split="train")
51
  ```
52
 
 
 
 
53
  ## Files
54
 
55
- | File | Config | Examples | Seed | Mix | Used for |
56
- |---|---|---|---|---|---|
57
- | `data/train_v1.jsonl` | `v1` | 2,000 | 11 | v1 | checkpoints v1-n250 to v1-n2000 |
58
- | `data/train_v2.jsonl` | `v2` | 6,000 | 12 | v2 | checkpoints v2-n750 to v2-n6000 |
59
- | `data/train_v3.jsonl` | `v3` | 12,000 | 13 | v3 | checkpoints v3-n1500 to v3-n12000 |
60
- | `data/smoke.jsonl` | `smoke` | 50 | 99 | v1 | smoke test of the full loop |
61
- | `data/templates.json` | | 447 templates | | | teacher-written user-message wording |
 
 
62
 
63
  Each file is shuffled once, so the first N lines are nested subsets (the N=250 set is inside the N=500 set, and
64
  so on). Every size on the data-efficiency curve trains on the first N lines of its file.
@@ -80,18 +85,20 @@ Every assistant reply is one line: an ISO 8601 moment with offset, `AMBIGUOUS: <
80
 
81
  ## How it is made
82
 
83
- 1. **The teacher writes wording only.** Claude Sonnet 5.5 writes user-message templates in 12 kinds (requests,
84
  unclear direction, not a request, insisting, filler, pressure, format demands, clarifications, target and
85
- date changes, stated roles, doubt) ([teacher.py](https://huggingface.co/debudash/slm-training/blob/main/teacher.py)).
 
86
  2. **A quality gate filters the templates.** Each kind has its own checks: placeholders exactly once, and no
87
  stray digits or zone names in generic follow-ups. A separate gate call must also recover the conversion
88
  direction from the wording. Its swap test asks twice with the zone names swapped, so a template whose
89
- direction depends only on word order is rejected. Templates matching the eval set's phrasings are dropped.
90
- 3. **Code samples the values and the oracle writes every label.**
91
- [gen_train.py](https://huggingface.co/debudash/slm-training/blob/main/gen_train.py) fills the templates with
92
- sampled dates, times and zones. It deliberately samples wall times next to DST transitions in 2020-2030.
93
- [oracle.py](https://huggingface.co/debudash/slm-training/blob/main/oracle.py) computes every assistant reply.
94
- So labels are exact by construction: no teacher-written answer appears in the data.
 
95
  4. **Eval overlap is removed.** Any example whose user text, or whose request (date, time, source, target),
96
  matches a turn in the eval sets is dropped.
97
 
@@ -99,27 +106,29 @@ Every assistant reply is one line: an ISO 8601 moment with offset, `AMBIGUOUS: <
99
 
100
  Share of examples by category:
101
 
102
- | Category | What it teaches | v1 | v2 | v3 |
103
- |---|---|---|---|---|
104
- | convert | single conversions, IANA, abbreviations, Etc/GMT, near-DST times | 43% | 45% | 33% |
105
- | anchor | the same moment converted to Etc/UTC first, then to the target | | 12% | 10% |
106
- | ambiguous | ambiguous abbreviations, missing year, out-of-season abbreviations, unclear direction | 17% | 14% | 9% |
107
- | invalid | unsupported zones, malformed times and dates, not a request | 14% | 11% | 8% |
108
- | pressure | holding a refusal when the user insists or pushes | 8% | 6% | 4% |
109
- | multi_turn | follow-ups: insisting, clarifications (good and bad), filler, target and date changes, long sessions | 18% | 12% | 6% |
110
- | drift | longer conversations (4-10 user turns) in seven state patterns | | | 30% |
111
-
112
- Why each version changed (diagnosis and effect): see
113
- [docs/results.md](https://huggingface.co/debudash/slm-training/blob/main/docs/results.md).
114
 
115
- ## Reproduce
116
 
117
- From the [code repo](https://huggingface.co/debudash/slm-training):
118
 
119
  ```bash
120
  python gen_train.py --n 2000 --seed 11 --mix v1 --out data/train_v1.jsonl
121
  python gen_train.py --n 6000 --seed 12 --mix v2 --out data/train_v2.jsonl
122
  python gen_train.py --n 12000 --seed 13 --mix v3 --out data/train_v3.jsonl
 
 
123
  ```
124
 
125
- All three regenerate byte for byte from the committed templates.
 
 
12
  size_categories:
13
  - 10K<n<100K
14
  configs:
15
+ - config_name: v5
16
  default: true
17
+ data_files:
18
+ - split: train
19
+ path: data/train_v5.jsonl
20
+ - config_name: v4
21
+ data_files:
22
+ - split: train
23
+ path: data/train_v4.jsonl
24
+ - config_name: v3
25
  data_files:
26
  - split: train
27
  path: data/train_v3.jsonl
 
39
  path: data/smoke.jsonl
40
  ---
41
 
42
+ # Dataset: tz-convert SFT data
 
 
 
 
 
 
 
 
43
 
44
  - **Code, eval harness and results:** [debudash/slm-training](https://huggingface.co/debudash/slm-training)
45
+ - **Final checkpoint:** [debudash/qwen3-4b-tz-convert-v5-n18000](https://huggingface.co/debudash/qwen3-4b-tz-convert-v5-n18000)
46
+ (QLoRA adapter on `Qwen/Qwen3-4B-Instruct-2507`, trained on the `v5` config)
47
 
48
  ```python
49
  from datasets import load_dataset
50
+ ds = load_dataset("debudash/tz-convert-sft", "v5", split="train")
51
  ```
52
 
53
+ Published on the Hugging Face Hub: [debudash/tz-convert-sft](https://huggingface.co/datasets/debudash/tz-convert-sft)
54
+ (configs `v1`, `v2`, `v3`, `v4`, `v5` (default, final model), `smoke`).
55
+
56
  ## Files
57
 
58
+ | File | Examples | Seed | Mix | Used for |
59
+ |---|---|---|---|---|
60
+ | [data/train_v1.jsonl](data/train_v1.jsonl) | 2,000 | 11 | v1 | checkpoints v1-n250 to v1-n2000 |
61
+ | [data/train_v2.jsonl](data/train_v2.jsonl) | 6,000 | 12 | v2 | checkpoints v2-n750 to v2-n6000 |
62
+ | [data/train_v3.jsonl](data/train_v3.jsonl) | 12,000 | 13 | v3 | checkpoints v3-n1500 to v3-n12000 |
63
+ | [data/train_v4.jsonl](data/train_v4.jsonl) | 12,000 | 14 | v4 | checkpoint v4-n12000 (ISSUE-002 fix) |
64
+ | [data/train_v5.jsonl](data/train_v5.jsonl) | 18,000 | 15 | v5 | checkpoint v5-n18000 (final; ISSUE-003 data) |
65
+ | [data/smoke.jsonl](data/smoke.jsonl) | 50 | 99 | v1 | smoke test of the full loop |
66
+ | [data/templates.json](data/templates.json) | 522 templates | | | teacher-written user-message wording |
67
 
68
  Each file is shuffled once, so the first N lines are nested subsets (the N=250 set is inside the N=500 set, and
69
  so on). Every size on the data-efficiency curve trains on the first N lines of its file.
 
85
 
86
  ## How it is made
87
 
88
+ 1. **The teacher writes wording only.** Claude Sonnet 5.5 writes user-message templates in 14 kinds (requests,
89
  unclear direction, not a request, insisting, filler, pressure, format demands, clarifications, target and
90
+ date changes, stated roles, doubt, and for v4 zone changes with and without a stated role)
91
+ ([teacher.py](https://huggingface.co/debudash/slm-training/blob/main/teacher.py)).
92
  2. **A quality gate filters the templates.** Each kind has its own checks: placeholders exactly once, and no
93
  stray digits or zone names in generic follow-ups. A separate gate call must also recover the conversion
94
  direction from the wording. Its swap test asks twice with the zone names swapped, so a template whose
95
+ direction depends only on word order is rejected. The v4 kinds get a role check instead: a role-free change
96
+ must not say whether its zone is the source or the target, and an explicit target change must say so.
97
+ Templates matching the eval set's phrasings, or the ISSUE-002 probe's, are dropped.
98
+ 3. **Code samples the values and the oracle writes every label.** [gen_train.py](https://huggingface.co/debudash/slm-training/blob/main/gen_train.py) fills the
99
+ templates with sampled dates, times and zones. It deliberately samples wall times next to DST transitions
100
+ in 2020-2030. [oracle.py](https://huggingface.co/debudash/slm-training/blob/main/oracle.py) computes every assistant reply. So labels are exact by
101
+ construction: no teacher-written answer appears in the data.
102
  4. **Eval overlap is removed.** Any example whose user text, or whose request (date, time, source, target),
103
  matches a turn in the eval sets is dropped.
104
 
 
106
 
107
  Share of examples by category:
108
 
109
+ | Category | What it teaches | v1 | v2 | v3 | v4 | v5 |
110
+ |---|---|---|---|---|---|---|
111
+ | convert | single conversions, IANA, abbreviations, Etc/GMT, near-DST times | 43% | 45% | 33% | 31% | 20% |
112
+ | anchor | the same moment converted to Etc/UTC first, then to the target | | 12% | 10% | 9% | 6% |
113
+ | ambiguous | ambiguous abbreviations, missing year, out-of-season abbreviations, unclear direction | 17% | 14% | 9% | 8% | 6% |
114
+ | invalid | unsupported zones, malformed times and dates, not a request | 14% | 11% | 8% | 7% | 5% |
115
+ | pressure | holding a refusal when the user insists or pushes | 8% | 6% | 4% | 4% | 3% |
116
+ | multi_turn | follow-ups: insisting, clarifications (good and bad), filler, target and date changes, long sessions | 18% | 12% | 6% | 5% | 3% |
117
+ | drift | longer conversations (4-10 user turns) in seven state patterns | | | 30% | 28% | 19% |
118
+ | role_change | contrast sets from one opening: source clarification, explicit target change, role-free change (AMBIGUOUS) | | | | 8% | 6% |
119
+ | arith | conversions between DST zones, stratified by zone family and season, half as UTC anchor pairs (ISSUE-003) | | | | | 33% |
 
120
 
121
+ Why each version changed (diagnosis and effect): see [results.md](https://huggingface.co/debudash/slm-training/blob/main/docs/results.md#failures-diagnosed-and-fixed-with-data).
122
 
123
+ Reproduce:
124
 
125
  ```bash
126
  python gen_train.py --n 2000 --seed 11 --mix v1 --out data/train_v1.jsonl
127
  python gen_train.py --n 6000 --seed 12 --mix v2 --out data/train_v2.jsonl
128
  python gen_train.py --n 12000 --seed 13 --mix v3 --out data/train_v3.jsonl
129
+ python gen_train.py --n 12000 --seed 14 --mix v4 --out data/train_v4.jsonl
130
+ python gen_train.py --n 18000 --seed 15 --mix v5 --out data/train_v5.jsonl
131
  ```
132
 
133
+ All five regenerate byte for byte from the committed templates (adding the v4 template kinds left v1-v3
134
+ unchanged). Shares are rounded.
data/templates.json CHANGED
@@ -470,5 +470,84 @@
470
  "Could you explain the reasoning behind that answer?",
471
  "Please re-verify before I rely on it.",
472
  "Can you put that another way and make sure it's right?"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
473
  ]
474
  }
 
470
  "Could you explain the reasoning behind that answer?",
471
  "Please re-verify before I rely on it.",
472
  "Can you put that another way and make sure it's right?"
473
+ ],
474
+ "change_no_role": [
475
+ "Use {zone} instead.",
476
+ "Actually, {zone}.",
477
+ "Swap it for {zone}.",
478
+ "Try {zone} instead.",
479
+ "Let's go with {zone}.",
480
+ "Switch that to {zone}.",
481
+ "How about {zone} instead?",
482
+ "Redo it with {zone}.",
483
+ "Change the zone to {zone}.",
484
+ "Can you use {zone} this time?",
485
+ "Replace the zone with {zone}.",
486
+ "Run it again with {zone}.",
487
+ "Same thing, but {zone}.",
488
+ "Do it with {zone} instead.",
489
+ "Hmm, try {zone}.",
490
+ "Never mind, {zone}.",
491
+ "Let me change that: {zone}.",
492
+ "Make the zone {zone} this time.",
493
+ "Go with {zone} instead.",
494
+ "Update it so it uses {zone}.",
495
+ "Oops, I meant {zone}.",
496
+ "Correction: {zone}.",
497
+ "Try that again, but {zone}.",
498
+ "Please substitute {zone}.",
499
+ "Let's say {zone} instead.",
500
+ "I meant {zone}, sorry.",
501
+ "Do the same thing with {zone}.",
502
+ "Can we do {zone} instead?",
503
+ "Switch the zone: {zone}.",
504
+ "Use {zone} for that one.",
505
+ "Change of plans, {zone}.",
506
+ "Instead, {zone}.",
507
+ "Let's make it {zone}.",
508
+ "Redo that using {zone}.",
509
+ "What if it's {zone}?",
510
+ "Pick {zone} instead.",
511
+ "Okay, now {zone}."
512
+ ],
513
+ "replace_target_explicit": [
514
+ "Wait, I need it in {tgt} instead.",
515
+ "Oh, show it in {tgt} instead.",
516
+ "Hmm, make {tgt} the target instead.",
517
+ "Sorry, I meant to convert it to {tgt}.",
518
+ "Actually, show it in {tgt} rather than the other zone.",
519
+ "Wait, the destination should be {tgt}, not what I said before.",
520
+ "Oh, I need it in {tgt}, not the previous one.",
521
+ "Hmm, convert it to {tgt} instead of that.",
522
+ "Sorry, use {tgt} as the target instead.",
523
+ "Actually, I need it in {tgt} instead.",
524
+ "Wait, show it in {tgt} instead, please.",
525
+ "Oh sorry, the destination is {tgt} instead.",
526
+ "Hmm, actually convert it to {tgt} instead.",
527
+ "Actually, let's make {tgt} the target.",
528
+ "Wait, change the destination to {tgt} and convert it there.",
529
+ "Oh, convert it to {tgt} instead, my mistake.",
530
+ "Hmm, show it in {tgt} instead.",
531
+ "Actually, switch the target to {tgt} and convert it to that.",
532
+ "Wait, I want it shown in {tgt} instead.",
533
+ "Oh, make the destination {tgt} instead.",
534
+ "Sorry, show it in {tgt} rather than the first one.",
535
+ "Hmm, I need it in {tgt} instead.",
536
+ "Actually, the target should be {tgt}, so convert it to that.",
537
+ "Wait, convert it to {tgt}, not the other one.",
538
+ "Oh, change that: I need it in {tgt}.",
539
+ "Sorry, convert it to {tgt} instead.",
540
+ "Hmm, set {tgt} as the destination instead.",
541
+ "Actually, show it in {tgt} instead of what I asked for.",
542
+ "Wait, sorry, convert it to {tgt} instead.",
543
+ "Oh, actually the target is {tgt}, so show it in that.",
544
+ "Hmm, scratch that, I need it in {tgt}.",
545
+ "Sorry, change the destination to {tgt} and convert it there instead.",
546
+ "Actually, I need it in {tgt}, not the last one.",
547
+ "Wait, use {tgt} as the target instead.",
548
+ "Oh, convert it to {tgt} instead of the previous destination.",
549
+ "Hmm, can you show it in {tgt} instead?",
550
+ "Sorry, I meant the destination to be {tgt}, so convert it to that.",
551
+ "Actually, convert it to {tgt} instead, that's the target I want."
552
  ]
553
  }
data/train_v4.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
data/train_v5.jsonl ADDED
The diff for this file is too large to render. See raw diff