PyaeSoneK commited on
Commit
f7f9c7d
Β·
verified Β·
1 Parent(s): 05f2d48

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +196 -0
README.md ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: facebook/nllb-200-distilled-600M
3
+ datasets:
4
+ - facebook/flores
5
+ language:
6
+ - en
7
+ - my
8
+ library_name: transformers
9
+ license: cc-by-nc-4.0
10
+ metrics:
11
+ - chrf
12
+ - bleu
13
+ pipeline_tag: translation
14
+ tags:
15
+ - translation
16
+ - nllb
17
+ - burmese
18
+ - wikihow
19
+ - low-resource
20
+ model-index:
21
+ - name: nllb-600m-wikihow-en-my
22
+ results:
23
+ - task:
24
+ type: translation
25
+ name: Machine Translation (English to Burmese)
26
+ dataset:
27
+ name: WikiHow-MY (held-out test, article-disjoint)
28
+ type: custom
29
+ split: test
30
+ metrics:
31
+ - type: chrf
32
+ value: 41.64
33
+ name: chrF++
34
+ - type: bleu
35
+ value: 23.18
36
+ name: spBLEU
37
+ - task:
38
+ type: translation
39
+ name: Machine Translation (English to Burmese)
40
+ dataset:
41
+ name: FLORES-200 (devtest, eng_Latn-mya_Mymr)
42
+ type: facebook/flores
43
+ config: eng_Latn-mya_Mymr
44
+ split: devtest
45
+ metrics:
46
+ - type: chrf
47
+ value: 33.5
48
+ name: chrF++
49
+ - type: bleu
50
+ value: 17.78
51
+ name: spBLEU
52
+ ---
53
+
54
+ # NLLB-200-distilled-600M fine-tuned for English to Burmese (WikiHow-MY)
55
+
56
+ This is [`facebook/nllb-200-distilled-600M`](https://huggingface.co/facebook/nllb-200-distilled-600M)
57
+ fine-tuned for **English to Burmese (`eng_Latn` to `mya_Mymr`)** translation on an
58
+ instructional-text corpus derived from wikiHow. It targets the procedural /
59
+ how-to register, where the zero-shot NLLB baseline is weakest.
60
+
61
+ ## Model description
62
+
63
+ - **Base model:** `facebook/nllb-200-distilled-600M` (600M-param distilled NLLB-200)
64
+ - **Architecture:** `M2M100ForConditionalGeneration` (seq2seq, SentencePiece tokenizer)
65
+ - **Direction:** English (`eng_Latn`) to Burmese (`mya_Mymr`), single direction
66
+ - **Fine-tuning data:** WikiHow-MY instructional EN to MY pairs (see Training data)
67
+ - **Selection metric:** dev **chrF** (more stable than BLEU on unsegmented Burmese)
68
+
69
+ ## Intended uses & limitations
70
+
71
+ **Intended use.** Translating English instructional / how-to text into Burmese
72
+ (steps, tips, procedural prose). Research and non-commercial use only.
73
+
74
+ **Out of scope / limitations.**
75
+
76
+ - **Non-commercial only** β€” inherits CC-BY-NC-4.0 from NLLB-200 (see License).
77
+ - Tuned on a single domain (wikiHow). Expect degradation on conversational,
78
+ legal, medical, or other out-of-domain text.
79
+ - Single direction (en to my). Do not use for my to en.
80
+ - Burmese has no orthographic word boundaries; downstream metrics and any
81
+ word-level processing must account for this. Reported BLEU is **spBLEU**
82
+ (SentencePiece-tokenized) and the primary metric is **chrF++**.
83
+ - May hallucinate, drop, or mistranslate named entities and numbers; not for
84
+ high-stakes use without human review.
85
+
86
+ ## Training data
87
+
88
+ Fine-tuned on **WikiHow-MY**, parallel English to Burmese instructional
89
+ sentence pairs extracted from wikiHow articles. wikiHow content is licensed
90
+ **CC-BY-NC-SA-3.0**; this derivative therefore carries a non-commercial,
91
+ share-alike obligation in addition to NLLB's CC-BY-NC (see License & attribution).
92
+
93
+ - Train / dev / test: **8,302 / 908 / 846** pairs (~10,056 total, from 82 articles)
94
+ - **Article-disjoint** splits (seed 42): no article appears in more than one split,
95
+ so the benchmark has no train/test leakage at the article level.
96
+ - Preprocessing: Zawgyi-to-Unicode normalization, de-duplication, and
97
+ sentence-level alignment of the English-Burmese instructional pairs.
98
+
99
+ ## Training procedure
100
+
101
+ Fine-tuned with πŸ€— Transformers `Seq2SeqTrainer`.
102
+
103
+ | Hyperparameter | Value |
104
+ | ----------------------- | --------------------------------- |
105
+ | base model | facebook/nllb-200-distilled-600M |
106
+ | learning rate | 3e-5 |
107
+ | warmup ratio | 0.05 |
108
+ | epochs | up to 10 (early stop on dev chrF) |
109
+ | per-device train batch | 4 |
110
+ | grad accumulation | 8 (effective batch 32) |
111
+ | precision | fp16 |
112
+ | eval / save steps | 250 |
113
+ | early-stopping patience | 4 |
114
+ | max length | 256 |
115
+ | seed | 42 |
116
+ | beams (eval/inference) | 5 |
117
+
118
+ ## Evaluation results
119
+
120
+ Evaluated on FLORES-200 devtest (`eng_Latn-mya_Mymr`) and the held-out
121
+ WikiHow-MY test split. chrF++ and spBLEU computed with `sacrebleu`.
122
+
123
+ | System / test set | chrF++ | spBLEU | BLEU |
124
+ | ----------------------------------- | -----: | -----: | ---: |
125
+ | **This model** β€” WikiHow-MY test | 41.64 | 23.18 | 3.74 |
126
+ | Base NLLB zero-shot β€” WikiHow-MY | 36.01 | 19.33 | 2.62 |
127
+ | **This model** β€” FLORES-200 devtest | 33.50 | 17.78 | 2.71 |
128
+ | Base NLLB zero-shot β€” FLORES-200 | 29.17 | 14.79 | 2.19 |
129
+
130
+ Fine-tuning on WikiHow improves the procedural in-domain test by **+5.6 chrF++**
131
+ (36.01 to 41.64) and also lifts general-domain FLORES-200 by **+4.3 chrF++**
132
+ (29.17 to 33.50) β€” i.e. domain adaptation with no catastrophic forgetting.
133
+ chrF++ is the primary metric (segmentation-agnostic for unsegmented Burmese);
134
+ spBLEU uses the FLORES-200 tokenizer. Numbers from
135
+ `experiments/results/main_results.json`.
136
+
137
+ ## How to use
138
+
139
+ ```python
140
+ from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
141
+
142
+ model_id = "PyaeSoneK/nllb-600m-wikihow-en-my"
143
+ tokenizer = AutoTokenizer.from_pretrained(model_id, src_lang="eng_Latn")
144
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
145
+
146
+ text = "Fold the paper in half, then crease the edge firmly."
147
+ inputs = tokenizer(text, return_tensors="pt")
148
+
149
+ # Force the decoder to start generating in Burmese.
150
+ bos = tokenizer.convert_tokens_to_ids("mya_Mymr")
151
+ generated = model.generate(
152
+ **inputs,
153
+ forced_bos_token_id=bos,
154
+ num_beams=5,
155
+ max_new_tokens=256,
156
+ )
157
+ print(tokenizer.batch_decode(generated, skip_special_tokens=True)[0])
158
+ ```
159
+
160
+ Note: on recent `transformers`, prefer
161
+ `tokenizer.convert_tokens_to_ids("mya_Mymr")` over the deprecated
162
+ `tokenizer.lang_code_to_id[...]`.
163
+
164
+ ## License & attribution
165
+
166
+ This model is released under **CC-BY-NC-4.0**. Two upstream non-commercial
167
+ terms apply and you must comply with both:
168
+
169
+ 1. **NLLB-200** (`facebook/nllb-200-distilled-600M`) is **CC-BY-NC-4.0**. Any
170
+ derivative β€” including this fine-tune β€” must remain non-commercial and
171
+ attribute Meta AI / the NLLB Team.
172
+ 2. **wikiHow** training content is **CC-BY-NC-SA-3.0**: non-commercial **and
173
+ share-alike**. Reuse of this model or its outputs must credit wikiHow and
174
+ carry a compatible non-commercial license.
175
+
176
+ Effective terms = the union of these: **non-commercial use only**, attribution
177
+ to both NLLB and wikiHow, and share-alike where wikiHow-derived content is
178
+ redistributed.
179
+
180
+ ## Citation
181
+
182
+ ```bibtex
183
+ @misc{nllb600m_wikihow_en_my,
184
+ title = {NLLB-200-distilled-600M fine-tuned for English-Burmese on WikiHow-MY},
185
+ author = {Pyae Sone Kyaw},
186
+ year = {2026},
187
+ note = {Fine-tune of facebook/nllb-200-distilled-600M, CC-BY-NC-4.0}
188
+ }
189
+
190
+ @article{nllb2022,
191
+ title = {No Language Left Behind: Scaling Human-Centered Machine Translation},
192
+ author = {{NLLB Team} and Costa-juss\`a, Marta R. and others},
193
+ journal = {arXiv preprint arXiv:2207.04672},
194
+ year = {2022}
195
+ }
196
+ ```