mengsay commited on
Commit
13da4e1
·
verified ·
1 Parent(s): 9dbb5e0

v1: add generator_v2/train_v2_s4

Browse files
Files changed (3) hide show
  1. README.md +20 -15
  2. generator_v2/train_v2_s4.parquet +3 -0
  3. recipes.json +54 -22
README.md CHANGED
@@ -29,7 +29,9 @@ configs:
29
  default: true
30
  data_files:
31
  - split: train
32
- path: generator_v2/train_v2_s3.parquet
 
 
33
  - split: validation
34
  path: generator_v2/train_v2_s3.dev.parquet
35
  - config_name: generator_v1
@@ -52,41 +54,44 @@ configs:
52
 
53
  # Samdei Type Pretraining Data
54
 
55
- These are the exact **pretraining (stage-1)** pairs of the Samdei Type romanized-Khmer → Khmer-script converters: 19.3M (romanized input, Khmer target) pairs. Every **Khmer target is real text**: 1.41M sentences from HPLT v2, FineWeb-2, Khmer Wikipedia and ALT, plus 2,483 chat sentences written by Gemma 4. The **romanized input** is made by a rule-based generator that spells each piece of a sentence as one of four typing personas would type it, and for a small part by Gemma 4.
 
 
56
 
57
- They trained the pretrained checkpoints [`samdei/samdei-type-base-pretrained`](https://huggingface.co/samdei/samdei-type-base-pretrained) and [`samdei/samdei-type-mini-pretrained`](https://huggingface.co/samdei/samdei-type-mini-pretrained), from which Samdei Type Base and Mini were fine-tuned. The fine-tuning and adaptation data (stages 2–3) is in [`samdei/samdei-type-finetuning-data`](https://huggingface.co/datasets/samdei/samdei-type-finetuning-data).
58
 
59
  Paper: [technical report](https://github.com/Samdei-Labs/samdei-type/blob/main/paper/samdei-type.pdf). Inference code: [github.com/Samdei-Labs/samdei-type](https://github.com/Samdei-Labs/samdei-type). Test set: [`samdei/samdei-type-bench`](https://huggingface.co/datasets/samdei/samdei-type-bench).
60
 
61
  ## Configs and files
62
 
63
- The data is organized by what it is, not by model. `recipes.json` gives the exact mix of each model (files, repeats, steps, learning rate), read from the training arguments stored in the checkpoints.
64
 
65
  | Config | Files (rows) | What it is | Used by |
66
  |---|---|---|---|
67
- | `generator_v2` (default) | `train_v2_s3` (6,501,912) | web sentences and the chat sentences, spelled by the second generator version | Mini |
68
- | `generator_v1` | `train_web_s1` (6,289,947), `train_web_s2` (6,288,484) | web sentences, spelled twice by the first generator version (two independent samples) | Base; the channel model (`train_web_s1`) |
69
- | `llm_chat_sentences` | `train_gemma_s1` (189,431) | the 2.4k LLM-written chat sentences, spelled by the first generator version, ×40 | Base; the channel model |
70
- | `llm_romanized` | `train_gemrom` (5,715) | Gemma 4 romanizations of 2,000 real sentences (×3 copies with random casing) | Mini (listed ×3 in its mix); the channel model |
71
 
72
  | Model | Stage-1 mix | Pairs |
73
  |---|---|---|
74
- | Base (18.2M) | `train_web_s1` + `train_web_s2` + `train_gemma_s1` | 12,767,862 |
75
- | Mini (7.1M) | `train_v2_s3` + `train_gemrom` ×3 | 6,519,057 |
76
- | channel model (Khmer → Latin, used in Base's reranker) | `train_web_s1` + `train_gemma_s1` + `train_gemrom` | 6,485,093 |
 
77
 
78
- **Why two generator versions.** Base was pretrained first, with the first generator version. The second version adds:
79
  - English chat words and place names inserted on both sides;
80
  - standalone place-name pairs (`persona` = `place`);
81
  - sentence-final punctuation dropped from both sides together.
82
 
83
- It came out of the errors of the first models. Mini was pretrained with it, and both models' later stages use it. Both versions are here, so both models' pretraining can be reproduced exactly.
84
 
85
  **Validation splits** are synthetic: held-out sentences spelled by the same generator, monitored during training. Checkpoints were selected on separate evaluation sets, which are not part of this dataset.
86
 
87
  ```
88
  generator_v1/ train_web_s1.parquet train_web_s2.parquet train_web_s1.dev.parquet
89
- generator_v2/ train_v2_s3.parquet train_v2_s3.dev.parquet
90
  llm/ train_gemma_s1.parquet train_gemrom.parquet
91
  recipes.json
92
  ```
@@ -154,7 +159,7 @@ To rebuild a mix exactly, read `recipes.json` and concatenate its files in order
154
  | Google Khmer pronunciation lexicon | Latin (generator) | CC BY 4.0 |
155
  | Chat lexicon, place names, English chat words (ours) | Latin (generator) | CC0 |
156
 
157
- Rows whose `source` is `wikipedia` or `gemrom_wikipedia` carry Wikipedia's share-alike terms. They are about 19% of `train_web_s1`, `train_web_s2` and `train_v2_s3`.
158
 
159
  **Changes to the source text.** The sentences were normalized with `khnormal`, filtered and deduplicated; the generator cut them into pieces of 1–12 words. Each Khmer target is paired with a romanization in the `latin` column (see "How the pairs were made").
160
 
 
29
  default: true
30
  data_files:
31
  - split: train
32
+ path:
33
+ - generator_v2/train_v2_s3.parquet
34
+ - generator_v2/train_v2_s4.parquet
35
  - split: validation
36
  path: generator_v2/train_v2_s3.dev.parquet
37
  - config_name: generator_v1
 
54
 
55
  # Samdei Type Pretraining Data
56
 
57
+ These are the exact **pretraining (stage-1)** pairs of the Samdei Type romanized-Khmer → Khmer-script converters: 25.8M (romanized input, Khmer target) pairs. Every **Khmer target is real text**: 1.41M sentences from HPLT v2, FineWeb-2, Khmer Wikipedia and ALT, plus 2,483 chat sentences written by Gemma 4. The **romanized input** is made by a rule-based generator that spells each piece of a sentence as one of four typing personas would type it, and for a small part by Gemma 4.
58
+
59
+ They trained the pretrained checkpoints [`samdei/samdei-type-base-pretrained`](https://huggingface.co/samdei/samdei-type-base-pretrained) and [`samdei/samdei-type-mini-pretrained`](https://huggingface.co/samdei/samdei-type-mini-pretrained), from which Samdei Type Base and Mini were fine-tuned. The data of the later stages is in [`samdei/samdei-type-finetuning-data`](https://huggingface.co/datasets/samdei/samdei-type-finetuning-data).
60
 
61
+ **v1 (2026-11-24)** adds `generator_v2/train_v2_s4`, the second sample of the second generator version, on which Base v1 was pretrained. The rest is unchanged; the dataset of the first release is at revision [`v0.1`](https://huggingface.co/datasets/samdei/samdei-type-pretraining-data/tree/v0.1).
62
 
63
  Paper: [technical report](https://github.com/Samdei-Labs/samdei-type/blob/main/paper/samdei-type.pdf). Inference code: [github.com/Samdei-Labs/samdei-type](https://github.com/Samdei-Labs/samdei-type). Test set: [`samdei/samdei-type-bench`](https://huggingface.co/datasets/samdei/samdei-type-bench).
64
 
65
  ## Configs and files
66
 
67
+ The data is organized by what it is, not by model. `recipes.json` gives the exact mix of each v1 model (files, repeats, steps, learning rate), read from the training arguments stored in the checkpoints; the v0.1 mixes are in `recipes.json` at revision `v0.1`.
68
 
69
  | Config | Files (rows) | What it is | Used by |
70
  |---|---|---|---|
71
+ | `generator_v2` (default) | `train_v2_s3` (6,501,912), `train_v2_s4` (6,499,553) | web sentences and the chat sentences, spelled twice by the second generator version (two independent samples) | Mini (`train_v2_s3`); Base v1 |
72
+ | `generator_v1` | `train_web_s1` (6,289,947), `train_web_s2` (6,288,484) | web sentences, spelled twice by the first generator version (two independent samples) | Base v0.1; the v0.1 channel model (`train_web_s1`) |
73
+ | `llm_chat_sentences` | `train_gemma_s1` (189,431) | the 2.4k LLM-written chat sentences, spelled by the first generator version, ×40 | Base v0.1; the v0.1 channel model |
74
+ | `llm_romanized` | `train_gemrom` (5,715) | Gemma 4 romanizations of 2,000 real sentences (×3 copies with random casing) | Mini and Base v1 (listed ×3 in their mixes); the v0.1 channel model |
75
 
76
  | Model | Stage-1 mix | Pairs |
77
  |---|---|---|
78
+ | Base v1 (18.2M) | `train_v2_s3` + `train_v2_s4` + `train_gemrom` ×3 | 13,018,610 |
79
+ | Mini (7.1M) | `train_v2_s3` + `train_gemrom` ×3 (75k steps in v1, 40k in v0.1) | 6,519,057 |
80
+ | Base v0.1 | `train_web_s1` + `train_web_s2` + `train_gemma_s1` | 12,767,862 |
81
+ | v0.1 channel model (Khmer → Latin, used in Base v0.1's reranker) | `train_web_s1` + `train_gemma_s1` + `train_gemrom` | 6,485,093 |
82
 
83
+ **Why two generator versions.** Base v0.1 was pretrained first, with the first generator version. The second version adds:
84
  - English chat words and place names inserted on both sides;
85
  - standalone place-name pairs (`persona` = `place`);
86
  - sentence-final punctuation dropped from both sides together.
87
 
88
+ It came out of the errors of the first models. Mini was pretrained with it, and since v1 Base is too; all later stages use it. Both versions are here, so the pretraining of both releases can be reproduced exactly.
89
 
90
  **Validation splits** are synthetic: held-out sentences spelled by the same generator, monitored during training. Checkpoints were selected on separate evaluation sets, which are not part of this dataset.
91
 
92
  ```
93
  generator_v1/ train_web_s1.parquet train_web_s2.parquet train_web_s1.dev.parquet
94
+ generator_v2/ train_v2_s3.parquet train_v2_s4.parquet train_v2_s3.dev.parquet
95
  llm/ train_gemma_s1.parquet train_gemrom.parquet
96
  recipes.json
97
  ```
 
159
  | Google Khmer pronunciation lexicon | Latin (generator) | CC BY 4.0 |
160
  | Chat lexicon, place names, English chat words (ours) | Latin (generator) | CC0 |
161
 
162
+ Rows whose `source` is `wikipedia` or `gemrom_wikipedia` carry Wikipedia's share-alike terms. They are about 19% of `train_web_s1`, `train_web_s2`, `train_v2_s3` and `train_v2_s4`.
163
 
164
  **Changes to the source text.** The sentences were normalized with `khnormal`, filtered and deduplicated; the generator cut them into pieces of 1–12 words. Each Khmer target is paired with a romanization in the `latin` column (see "How the pairs were made").
165
 
generator_v2/train_v2_s4.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:49a82c41ebafafe56144775b06ea6c2c50660c78126d824bc9cf28decd8eda94
3
+ size 254703970
recipes.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "about": "Exact training mixes of the Samdei Type checkpoints trained on this dataset, read from the arguments stored in each checkpoint (scripts/train.py). Files are listed in the order given to the training script; 'repeat' is how many times the file was listed. Paths are relative to this dataset unless they name another repo. 'monitor' is the synthetic held-out file watched during training; checkpoints were selected as given in 'selected_on'.",
3
  "shared": {
4
  "optimizer": "AdamW, betas 0.9/0.98, weight decay 0.01",
5
  "schedule": "cosine decay to 5% of the peak",
@@ -16,19 +16,19 @@
16
  "released_as": "samdei/samdei-type-base-pretrained",
17
  "train": [
18
  {
19
- "file": "generator_v1/train_web_s1.parquet",
20
  "repeat": 1
21
  },
22
  {
23
- "file": "generator_v1/train_web_s2.parquet",
24
  "repeat": 1
25
  },
26
  {
27
- "file": "llm/train_gemma_s1.parquet",
28
- "repeat": 1
29
  }
30
  ],
31
- "monitor": "generator_v1/train_web_s1.dev.parquet",
32
  "steps": 60000,
33
  "selected_step": 60000,
34
  "warmup": 3000,
@@ -44,7 +44,7 @@
44
  "ff": 1536,
45
  "dropout": 0.1,
46
  "max_len": 256,
47
- "src_vocab": 216,
48
  "tgt_vocab": 228
49
  }
50
  },
@@ -53,7 +53,7 @@
53
  "stage": 1,
54
  "direction": "latin->khmer",
55
  "init": null,
56
- "released_as": "samdei/samdei-type-mini-pretrained",
57
  "train": [
58
  {
59
  "file": "generator_v2/train_v2_s3.parquet",
@@ -85,33 +85,65 @@
85
  }
86
  },
87
  {
88
- "model": "samdei-type-base: channel model",
89
  "stage": 1,
90
- "direction": "khmer->latin",
91
- "init": null,
92
- "released_as": "samdei/samdei-type-base: channel/",
93
  "train": [
94
  {
95
- "file": "generator_v1/train_web_s1.parquet",
96
  "repeat": 1
97
  },
98
  {
99
- "file": "llm/train_gemma_s1.parquet",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  "repeat": 1
101
  },
102
  {
103
  "file": "llm/train_gemrom.parquet",
104
- "repeat": 1
105
  }
106
  ],
107
- "monitor": "generator_v1/train_web_s1.dev.parquet",
108
- "steps": 25000,
109
  "selected_step": 20000,
110
- "warmup": 2000,
111
- "peak_lr": 0.001,
112
  "max_tokens_per_batch": 12000,
113
  "seed": 1,
114
- "selected_on": "lowest greedy CER on the monitor file",
115
  "model_config": {
116
  "d_model": 256,
117
  "nhead": 4,
@@ -120,8 +152,8 @@
120
  "ff": 1024,
121
  "dropout": 0.1,
122
  "max_len": 256,
123
- "src_vocab": 228,
124
- "tgt_vocab": 216
125
  }
126
  }
127
  ]
 
1
  {
2
+ "about": "Exact training mixes of the Samdei Type checkpoints trained on this dataset, read from the arguments stored in each checkpoint (scripts/train.py). Files are listed in the order given to the training script; 'repeat' is how many times the file was listed. Paths are relative to this dataset unless they name another repo. 'monitor' is the synthetic held-out file watched during training; checkpoints were selected as given in 'selected_on'. In the two-way runs (direction 'both'), 'train_khmer_to_latin' lists the files also used the other way round: the Khmer side, after the character U+E000, as input. The recipes of v0.1 are at revision v0.1.",
3
  "shared": {
4
  "optimizer": "AdamW, betas 0.9/0.98, weight decay 0.01",
5
  "schedule": "cosine decay to 5% of the peak",
 
16
  "released_as": "samdei/samdei-type-base-pretrained",
17
  "train": [
18
  {
19
+ "file": "generator_v2/train_v2_s3.parquet",
20
  "repeat": 1
21
  },
22
  {
23
+ "file": "generator_v2/train_v2_s4.parquet",
24
  "repeat": 1
25
  },
26
  {
27
+ "file": "llm/train_gemrom.parquet",
28
+ "repeat": 3
29
  }
30
  ],
31
+ "monitor": "generator_v2/train_v2_s3.dev.parquet",
32
  "steps": 60000,
33
  "selected_step": 60000,
34
  "warmup": 3000,
 
44
  "ff": 1536,
45
  "dropout": 0.1,
46
  "max_len": 256,
47
+ "src_vocab": 215,
48
  "tgt_vocab": 228
49
  }
50
  },
 
53
  "stage": 1,
54
  "direction": "latin->khmer",
55
  "init": null,
56
+ "released_as": null,
57
  "train": [
58
  {
59
  "file": "generator_v2/train_v2_s3.parquet",
 
85
  }
86
  },
87
  {
88
+ "model": "samdei-type-mini",
89
  "stage": 1,
90
+ "direction": "latin->khmer",
91
+ "init": "Mini stage 1, first run",
92
+ "released_as": null,
93
  "train": [
94
  {
95
+ "file": "generator_v2/train_v2_s3.parquet",
96
  "repeat": 1
97
  },
98
  {
99
+ "file": "llm/train_gemrom.parquet",
100
+ "repeat": 3
101
+ }
102
+ ],
103
+ "monitor": "generator_v2/train_v2_s3.dev.parquet",
104
+ "steps": 20000,
105
+ "selected_step": 20000,
106
+ "warmup": 1000,
107
+ "peak_lr": 0.0005,
108
+ "max_tokens_per_batch": 12000,
109
+ "seed": 1,
110
+ "selected_on": "lowest mean greedy CER on Dev-Sentences and Chat-Words (selection only; never trained on)",
111
+ "model_config": {
112
+ "d_model": 256,
113
+ "nhead": 4,
114
+ "enc_layers": 6,
115
+ "dec_layers": 2,
116
+ "ff": 1024,
117
+ "dropout": 0.1,
118
+ "max_len": 256,
119
+ "src_vocab": 215,
120
+ "tgt_vocab": 228
121
+ }
122
+ },
123
+ {
124
+ "model": "samdei-type-mini",
125
+ "stage": 1,
126
+ "direction": "latin->khmer",
127
+ "init": "Mini stage 1, second run",
128
+ "released_as": "samdei/samdei-type-mini-pretrained",
129
+ "train": [
130
+ {
131
+ "file": "generator_v2/train_v2_s3.parquet",
132
  "repeat": 1
133
  },
134
  {
135
  "file": "llm/train_gemrom.parquet",
136
+ "repeat": 3
137
  }
138
  ],
139
+ "monitor": "generator_v2/train_v2_s3.dev.parquet",
140
+ "steps": 20000,
141
  "selected_step": 20000,
142
+ "warmup": 1000,
143
+ "peak_lr": 0.0003,
144
  "max_tokens_per_batch": 12000,
145
  "seed": 1,
146
+ "selected_on": "lowest mean greedy CER on Dev-Sentences and Chat-Words (selection only; never trained on)",
147
  "model_config": {
148
  "d_model": 256,
149
  "nhead": 4,
 
152
  "ff": 1024,
153
  "dropout": 0.1,
154
  "max_len": 256,
155
+ "src_vocab": 215,
156
+ "tgt_vocab": 228
157
  }
158
  }
159
  ]