Views
No views yet
facebook/nllb-200-distilled-600M
for Abkhaz (apsua) → Russian translation. Its primary purpose was to serve as the
back-translation model for a low-resource RU→AB pipeline: it converts the large monolingual
Abkhaz corpus into synthetic Russian, creating extra (synthetic-RU, real-AB) training pairs.| Metric | Value |
|---|---|
| Clean held-out AB→RU (sentence-BLEU, beam=4) | 18.99 |
| (earlier undertrained checkpoint, ckpt-2250) | 11.99 |
1from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
3REPO = "audiosurffer0/Ab_ru_dojo26_7000check"
4tok = AutoTokenizer.from_pretrained(REPO)
5model = AutoModelForSeq2SeqLM.from_pretrained(REPO).to("cuda").eval()
6
7tok.src_lang = "abk_Cyrl" # Abkhaz source (vocab id 256230)
8rus = tok.convert_tokens_to_ids("rus_Cyrl")
9
10def translate(text):
11 enc = tok(text, return_tensors="pt", truncation=True, max_length=128).to("cuda")
12 out = model.generate(**enc, forced_bos_token_id=rus,
13 max_new_tokens=128, num_beams=4, do_sample=False)
14 return tok.decode(out[0], skip_special_tokens=True).replace("rus_Cyrl", "").strip()Note: the target isrus_Cyrl, which is a proper special token, so the output is clean (the.replaceabove is just defensive). The Abkhazabk_Cyrlsource token is a regular vocab token (id 256230) added via tokenizer surgery — see the companion RU→AB card.
abk_Cyrl + 26 Abkhaz chars in tokenizer.json,
vocab 256231).x = tok(ab), labels = tok(text_target=ru), forced_bos = rus_Cyrl.audiosurffer0/nllb-600m-ru-ab-dojo26), which reached 9.98 sentence-BLEU on the contest test.