This model is a pre-trained adaptation of the NLLB-200 (No Language Left Behind) 1.3B parameter model that has been specifically optimized to improve translation capabilities for the Kabardian language (kbd). The base NLLB-200 model was developed by Meta AI and supports 200 languages, with this variant specifically adjusted for Kabardian language translation tasks.
This model has been pre-trained building upon the original NLLB-200 model, which used parallel multilingual data from various sources and monolingual data constructed from Common Crawl. The specific additional pre-training for Kabardian likely involved specialized Kabardian language resources.
The original NLLB-200 model was evaluated using the Flores-200 dataset.
1from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
2
3model_name = "panagoa/nllb-200-1.3b-kbd-pretrain"
4tokenizer = AutoTokenizer.from_pretrained(model_name)
5model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
6
7# Example: Translating to Kabardian
8src_lang = "eng_Latn" # English
9tgt_lang = "kbd_Cyrl" # Kabardian in Cyrillic script
10
11text = "Hello, how are you?"
12inputs = tokenizer(f"{src_lang}: {text}", return_tensors="pt")
13translated_tokens = model.generate(
14 **inputs,
15 forced_bos_token_id=tokenizer.lang_code_to_id[tgt_lang],
16 max_length=30
17)
18translation = tokenizer.batch_decode(translated_tokens, skip_special_tokens=True)[0]
19print(translation)
This model is part of a collection of NLLB models fine-tuned for Kabardian language translation developed by panagoa.