mengsay commited on
Commit
d2dac46
·
verified ·
1 Parent(s): 21137bf

Data cards: the generator and training code are not public (inference-only code); drop script and seed pointers

Browse files
Files changed (1) hide show
  1. README.md +7 -7
README.md CHANGED
@@ -71,7 +71,7 @@ Each stage is 3–6k steps (10–36 minutes on a laptop).
71
 
72
  Every **Khmer target is real text**, except 2,483 chat sentences written by Gemma 4. Only the **romanized input** varies, by source.
73
 
74
- Paper: `<paper-url>`. 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).
75
 
76
  ## Configs
77
 
@@ -83,7 +83,7 @@ The data is organized by kind, so each source of spelling noise can be used, ins
83
  | `llm_romanized` | `train_gemrom2` (18,273) | Gemma 4 romanizations of 6,382 real sentences, 4 style prompts, ×3 copies with random casing | 2, 3 (×4 in the mix) | Mini, Base |
84
  | `abbreviated` | `ft_v2_abbr3` (139,704), `train_gemrom2_abbr3` (16,302) | chat-like abbreviated copies of `chat_mix` and `llm_romanized` pairs; only the input changes (`tov` → `tv`, `bong` → `bg`) | 2, 3 (Gemma part ×2) | Mini, Base |
85
  | `mined_tables_chh` | `ft_rules_chh` (289,820) | new pairs spelled with the table mined from the Chhunneng word list (dictionary-like scheme), alone or with mixed / lazy noise habits | 2, 3 | **Mini** |
86
- | `mined_tables_chh_wd` | `ft_rules_chhwd` (289,647) | made from the same sources with the same seed, spelled 70% with the Chhunneng table and 30% with the table mined from Wikidata names (official, name-style scheme) | 2, 3 | **Base** |
87
  | `casual` | `ft_casual_noakk` (426,946) | 21.6k spoken-register web sentences, spelled by the generator with stretched letters (`tovvv`, `baaan`) | **3 only** | Mini, Base |
88
  | `synthetic_heldout` | `train_v2_s3.dev` (12,232) | synthetic held-out pairs monitored during training (validation split) | – | – |
89
 
@@ -134,7 +134,7 @@ casual = load_dataset("samdei/samdei-type-finetuning-data", "casual", split="tra
134
  abbr = load_dataset("samdei/samdei-type-finetuning-data", "abbreviated", split="train")
135
  ```
136
 
137
- To rebuild a mix exactly, read `recipes.json` and concatenate its files in order, with repeats. The training script reads the same four columns from TSV (`scripts/train.py --init <stage-1 checkpoint> --train <files...>`). The stage-1 checkpoints are [`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).
138
 
139
  ## How the pairs were made
140
 
@@ -144,20 +144,20 @@ To rebuild a mix exactly, read `recipes.json` and concatenate its files in order
144
  3. it spells the piece in a persona (formal 8%, careful 32%, mixed 40%, lazy 20%);
145
  4. it adds noise (glued or split words, dropped vowels, swaps, typos), English chat words and place names.
146
  - **`llm_romanized`.** Gemma 4 12B, run locally, romanized real sentences "the way Cambodians type on Messenger", 10 sentences per call. The Khmer side stays the original sentence, so the target is always correct, and Gemma's looser spelling acts as human-like noise on the input. 97% of the outputs passed our filters.
147
- - **`mined_tables_*`.** `scripts/mine_rules.py` learns per-slot spelling tables (onset, vowel, coda, glide, context) by Viterbi alignment and hard EM from public (Khmer word, romanization) lists: the Chhunneng word list (24.9k pairs, MIT) and 1.6k Wikidata person and place names (CC0). Words that are targets of a word-level evaluation set are removed first. The tables are in [`samdei/samdei-type-resources`](https://huggingface.co/datasets/samdei/samdei-type-resources). The pairs here are new sentences (HPLT, FineWeb-2, ALT, chat sentences; seed 31) spelled with them.
148
- - **`abbreviated`** (`scripts/make_abbrev.py --short_top 1000`).
149
  - It covers 40% of `chat_mix` pairs and all `llm_romanized` pairs.
150
  - Operations: consonant skeleton (`bong` → `bg`), dropped vowels, first + last letter (`jong` → `jg`), dropped digraph h (`khlang` → `klang`), dropped cluster member.
151
  - Vowels are dropped only from one-syllable words among the 1,000 most frequent.
152
  - An abbreviation that the chat lexicon reserves for one word (`nh` for ខ្ញុំ) is never produced for another.
153
- - **`casual`.** 21.6k HPLT and FineWeb-2 sentences that contain one of 13 spoken-register words (ហ្នឹង, ចឹង, អី, តោះ, …) as a token; misordered PDF text is dropped. They are spelled with stretched letters by the generator (formal 5%, careful 25%, mixed 35%, lazy 15%, Chhunneng table with mixed habits 20%; seed 34). No Akkhara-derived spelling rules are used.
154
 
155
  **Test separation.**
156
  - Every sentence of every evaluation set, including Samdei Type Bench and its chat context, is banned in the generator.
157
  - The rule miner never sees a test row or a word-level test target.
158
  - No Samdei Type Bench message equals a training target. The only shared strings are common single words.
159
 
160
- **Reproducibility.** The commands are in the code repository: `run_rules.sh` (mined-table pairs), `run_abbr3.sh` (abbreviated copies), `build_distill_pairs.py` (Gemma romanizations to pairs) and `run_stage3_casual.sh` (casual-register pairs and the stage-3 runs). The `make_synth.py` command line of `ft_v2` is not kept in a script; its seed and sources are recorded. The generator has since gained stricter banned lists, so regenerating today can differ slightly. These files are the ones the released models were trained on.
161
 
162
  ## Limitations
163
 
 
71
 
72
  Every **Khmer target is real text**, except 2,483 chat sentences written by Gemma 4. Only the **romanized input** varies, by source.
73
 
74
+ Paper: `<paper-url>`. 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).
75
 
76
  ## Configs
77
 
 
83
  | `llm_romanized` | `train_gemrom2` (18,273) | Gemma 4 romanizations of 6,382 real sentences, 4 style prompts, ×3 copies with random casing | 2, 3 (×4 in the mix) | Mini, Base |
84
  | `abbreviated` | `ft_v2_abbr3` (139,704), `train_gemrom2_abbr3` (16,302) | chat-like abbreviated copies of `chat_mix` and `llm_romanized` pairs; only the input changes (`tov` → `tv`, `bong` → `bg`) | 2, 3 (Gemma part ×2) | Mini, Base |
85
  | `mined_tables_chh` | `ft_rules_chh` (289,820) | new pairs spelled with the table mined from the Chhunneng word list (dictionary-like scheme), alone or with mixed / lazy noise habits | 2, 3 | **Mini** |
86
+ | `mined_tables_chh_wd` | `ft_rules_chhwd` (289,647) | made the same way from the same sources, but spelled 70% with the Chhunneng table and 30% with the table mined from Wikidata names (official, name-style scheme) | 2, 3 | **Base** |
87
  | `casual` | `ft_casual_noakk` (426,946) | 21.6k spoken-register web sentences, spelled by the generator with stretched letters (`tovvv`, `baaan`) | **3 only** | Mini, Base |
88
  | `synthetic_heldout` | `train_v2_s3.dev` (12,232) | synthetic held-out pairs monitored during training (validation split) | – | – |
89
 
 
134
  abbr = load_dataset("samdei/samdei-type-finetuning-data", "abbreviated", split="train")
135
  ```
136
 
137
+ To rebuild a mix exactly, read `recipes.json` and concatenate its files in order, with repeats. Training starts from the stage-1 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).
138
 
139
  ## How the pairs were made
140
 
 
144
  3. it spells the piece in a persona (formal 8%, careful 32%, mixed 40%, lazy 20%);
145
  4. it adds noise (glued or split words, dropped vowels, swaps, typos), English chat words and place names.
146
  - **`llm_romanized`.** Gemma 4 12B, run locally, romanized real sentences "the way Cambodians type on Messenger", 10 sentences per call. The Khmer side stays the original sentence, so the target is always correct, and Gemma's looser spelling acts as human-like noise on the input. 97% of the outputs passed our filters.
147
+ - **`mined_tables_*`.** A rule miner learns per-slot spelling tables (onset, vowel, coda, glide, context) by Viterbi alignment and hard EM from public (Khmer word, romanization) lists: the Chhunneng word list (24.9k pairs, MIT) and 1.6k Wikidata person and place names (CC0). Words that are targets of a word-level evaluation set are removed first. The tables are in [`samdei/samdei-type-resources`](https://huggingface.co/datasets/samdei/samdei-type-resources). The pairs here are new sentences (HPLT, FineWeb-2, ALT, chat sentences) spelled with them.
148
+ - **`abbreviated`.**
149
  - It covers 40% of `chat_mix` pairs and all `llm_romanized` pairs.
150
  - Operations: consonant skeleton (`bong` → `bg`), dropped vowels, first + last letter (`jong` → `jg`), dropped digraph h (`khlang` → `klang`), dropped cluster member.
151
  - Vowels are dropped only from one-syllable words among the 1,000 most frequent.
152
  - An abbreviation that the chat lexicon reserves for one word (`nh` for ខ្ញុំ) is never produced for another.
153
+ - **`casual`.** 21.6k HPLT and FineWeb-2 sentences that contain one of 13 spoken-register words (ហ្នឹង, ចឹង, អី, តោះ, …) as a token; misordered PDF text is dropped. They are spelled with stretched letters by the generator (formal 5%, careful 25%, mixed 35%, lazy 15%, Chhunneng table with mixed habits 20%). No Akkhara-derived spelling rules are used.
154
 
155
  **Test separation.**
156
  - Every sentence of every evaluation set, including Samdei Type Bench and its chat context, is banned in the generator.
157
  - The rule miner never sees a test row or a word-level test target.
158
  - No Samdei Type Bench message equals a training target. The only shared strings are common single words.
159
 
160
+ **Reproducibility.** These files are the exact pairs the released models were trained on, so training can be repeated without regenerating them. The data generator and the training code are not public; the released code ([github.com/Samdei-Labs/samdei-type](https://github.com/Samdei-Labs/samdei-type)) is for inference only.
161
 
162
  ## Limitations
163