CoolFace
Modelpublic

kruokruo/nllb-200-kapampangan-en

sourceHugging Faceupdated 1y agoView on Hugging Face
2likes23downloads
Model Card

Got it πŸ‘ Thanks for sharing your Wav2Vec2 model card format β€” I’ll now draft your NLLB fine-tuned model card in the same style and structure for consistency.


Model Card for NLLB-200-Distilled-600M-Kapampangan-English

This model is a fine-tuned version of facebook/nllb-200-distilled-600M for machine translation between Kapampangan and English. It was trained on a custom dataset of 1,685 sentence pairs and achieves competitive results on a held-out test split. The model supports bidirectional translation between Kapampangan (pam) and English (en).


Model Details

Model Description

  • β€”Developed by: Sean Almendral
  • β€”Model type: Machine Translation (NMT)
  • β€”Languages (NLP): Kapampangan (kap), English (en)
  • β€”License: Apache-2.0
  • β€”Finetuned from model: facebook/nllb-200-distilled-600M
  • β€”Pipeline tag: translation

Model Sources

  • β€”Repository: Hugging Face Model Card
  • β€”Paper \[base model]: No Language Left Behind: Scaling Human-Centered Machine Translation

Uses

Direct Use

  • β€”Translating between Kapampangan ↔ English.
  • β€”Educational and cultural preservation of Kapampangan.
  • β€”Baseline translation model for further fine-tuning.

Downstream Use

  • β€”Integration into ASR + MT pipelines (e.g., Kapampangan speech β†’ English text).
  • β€”Language learning tools, chatbots, or educational apps.

Out-of-Scope Use

  • β€”Not suited for medical, legal, or safety-critical translations.
  • β€”May produce inaccurate outputs for low-resource domains or idiomatic expressions.

Bias, Risks, and Limitations

  • β€”Dataset size is relatively small (1,685 pairs), so coverage is limited.
  • β€”May not generalize well to informal speech, slang, or rare words.
  • β€”Risk of bias toward dataset domains (conversational & general sentences).
  • β€”Limited exposure to code-switching between Kapampangan and English.

Recommendations

  • β€”Validate translations before sensitive use.
  • β€”Extend training with larger and domain-specific corpora for production systems.

How to Get Started with the Model

python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

tokenizer = AutoTokenizer.from_pretrained("kruokruo/nllb-200-kapampangan-en")
model = AutoModelForSeq2SeqLM.from_pretrained("kruokruo/nllb-200-kapampangan-en")

text = "Ali ku balu"
inputs = tokenizer(text, return_tensors="pt")

translated_tokens = model.generate(
    **inputs,
    forced_bos_token_id=tokenizer.lang_code_to_id["eng_Latn"]
)
translation = tokenizer.decode(translated_tokens[0], skip_special_tokens=True)

print(translation)  # "I didn’t know"

Training Details

Training Data

  • β€”Custom dataset of 1,685 parallel Kapampangan–English pairs.
  • β€”Preprocessing included lowercasing and punctuation normalization.

Training Procedure

  • β€”Base model: facebook/nllb-200-distilled-600M
  • β€”Optimizer: AdamW
  • β€”Learning rate: 1e-5
  • β€”Epochs: 5 (with Early Stopping)
  • β€”Train/Validation split: 80/20 (seed=42)

Training Hyperparameters

  • β€”Precision: fp32
  • β€”Batch size: GPU-dependent (with gradient accumulation)
  • β€”Scheduler: Linear decay with warmup

Evaluation

Testing Data

  • β€”20% held-out split from the dataset.

Metrics

  • β€”Training Loss: 1.3471 β†’ 0.0322
  • β€”Validation Loss: ↓ 1.3589 β†’ 1.2495 (epoch 2), ↑ 1.5447 (epoch 5)
  • β€”SacreBLEU: ↑ 16.6973 β†’ 29.6054

Sample Prediction

  • β€”Source: malyari meng gisyan ing kahun ba yang ibusni.
  • β€”Prediction: The box was about to be removed.
  • β€”Reference: you can tear the box open.

BLEU Breakdown (test):

  • β€”BLEU = 0.4046
  • β€”Precisions = [61.79%, 42.34%, 35.20%, 31.20%]
  • β€”BP = 0.9826
  • β€”Translation length = 2,387
  • β€”Reference length = 2,429

SacreBLEU Breakdown (test):

  • β€”SacreBLEU = 40.46
  • β€”Counts = [1475, 868, 603, 430]
  • β€”Totals = [2387, 2050, 1713, 1378]
  • β€”Precisions = [61.79%, 42.34%, 35.20%, 31.20%]
  • β€”BP = 0.9826 ---

Environmental Impact

  • β€”Hardware Type: NVIDIA L4 GPU (Google Colab Pro)
  • β€”Training Duration: \[fill in if tracked]
  • β€”Energy Consumed: \~104.87 gCO2e (estimated using ML Impact calculator)
  • β€”Energy Needed: \~257.03 Wh
  • β€”Cloud Provider: Google Colab Pro

Technical Specifications

Model Architecture and Objective

  • β€”Architecture: NLLB-200-Distilled-600M (600M parameters)
  • β€”Objective: Fine-tuned for supervised sequence-to-sequence translation

Compute Infrastructure

  • β€”Framework: PyTorch + Hugging Face Transformers
  • β€”Trainer: Hugging Face Seq2SeqTrainer API

Citation

bibtex
@misc{nllb-kapampangan-en,
  title={NLLB-200-Distilled-600M-Kapampangan-English: Machine Translation Model},
  author={Sean Almendral},
  year={2025},
  howpublished={\url{https://huggingface.co/kruokruo/nllb-200-kapampangan-en}},
}

Model Card Authors

Sean Almendral

Model Card Contact

πŸ“§ seansimonea@gmail.com