bash98/nllb-english-pidgin-nllb-1-3b
English to Nigerian Pidgin translation
1 min readupdated
This model is a specialized variant of the facebook/nllb-200-1.3B architecture (a large language model built for translation), fine-tuned to translate short texts from English into Nigerian Pidgin (pcm). Through full fine-tuning, it learned the special pcm_Latn language token. It is aimed at developers and researchers working with African language pairs and content localization.
Key features
- Base model: A fine-tuned version of facebook/nllb-200-1.3B with 1.37B parameters.
- Training: Trained on a balanced dataset combining the Naija-NSC and Okwu corpora.
- Optimization: Uses the Adafactor optimizer paired with BF16 mixed precision.
What you can do
- Pipeline integration: Plug the model into translation scripts to handle Nigerian Pidgin text.
- Linguistic research: Use it to analyze and translate African language dialects.
Example
MODEL_ID = 'bash98/nllb-english-pidgin-nllb-1-3b-20261118-123027'
import torch
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, src_lang="eng_Latn", tgt_lang="pcm_Latn", token=False)
model = AutoModelForSeq2SeqLM.from_pretrained(MODEL_ID, torch_dtype=torch.float32, token=False).to(device)
model.eval()
inputs = tokenizer("Where is the nearest bus stop?", return_tensors="pt", truncation=False).to(device)
output = model.generate(**inputs, forced_bos_token_id=tokenizer.convert_tokens_to_ids("pcm_Latn"), max_new_tokens=192)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Read more
Details• Benchmarks: BLEU: 40.081, chrF: 58.48 (on the validation set).
• Hardware: Requires enough RAM or VRAM to load FP32 weights for a 1.37B-parameter model.
• Limitations: Not intended for medical or legal translation; human review is required.










Comments