CoolFace
Modelpublic

Lahad/nllb200-francais-wolof

sourceHugging Facemitupdated 2y agoView on Hugging Face
3likes227downloads
Model Card

Model Card: NLLB-200 French-Wolof(πŸ‡«πŸ‡·β†”οΈπŸ‡ΈπŸ‡³) Translation Model

Model Details

Model Description

A fine-tuned version of Meta's NLLB-200 (600M distilled) model specialized for French to Wolof translation. This model was trained to improve accessibility of content between French and Wolof languages.

  • β€”Developed by: Lahad
  • β€”Model type: Sequence-to-Sequence Translation Model
  • β€”Language(s): French (frLatn) ↔️ Wolof (wolLatn)
  • β€”License: CC-BY-NC-4.0
  • β€”Finetuned from model: facebook/nllb-200-distilled-600M

Model Sources

Uses

Direct Use

  • β€”Text translation between French and Wolof
  • β€”Content localization
  • β€”Language learning assistance
  • β€”Cross-cultural communication

Out-of-Scope Use

  • β€”Commercial use without proper licensing
  • β€”Translation of highly technical or specialized content
  • β€”Legal or medical document translation where professional human translation is required
  • β€”Real-time speech translation

Bias, Risks, and Limitations

  1. 1.Language Variety Limitations:
  2. 2.Limited coverage of regional Wolof dialects
  3. 3.May not handle cultural nuances effectively
  1. 1.Technical Limitations:
  2. 2.Maximum context window of 128 tokens
  3. 3.Reduced performance on technical/specialized content
  4. 4.May struggle with informal language and slang
  1. 1.Potential Biases:
  2. 2.Training data may reflect cultural biases
  3. 3.May perform better on standard/formal language

Recommendations

  • β€”Use for general communication and content translation
  • β€”Verify translations for critical communications
  • β€”Consider regional language variations
  • β€”Implement human review for sensitive content
  • β€”Test translations in intended context before deployment

How to Get Started with the Model

python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("Lahad/nllb200-francais-wolof")
model = AutoModelForSeq2SeqLM.from_pretrained("Lahad/nllb200-francais-wolof")

# Translation function
def translate(text, max_length=128):
    inputs = tokenizer(
        text,
        max_length=max_length,
        padding="max_length",
        truncation=True,
        return_tensors="pt"
    )
    
    outputs = model.generate(
        input_ids=inputs["input_ids"],
        attention_mask=inputs["attention_mask"],
        forced_bos_token_id=tokenizer.convert_tokens_to_ids("wol_Latn"),
        max_length=max_length
    )
    
    return tokenizer.decode(outputs[0], skip_special_tokens=True)

Training Details

Training Data

  • β€”Dataset: galsenai/centralizedwoloffrenchtranslationdata
  • β€”Split: 80% training, 20% testing
  • β€”Format: JSON pairs of French and Wolof translations

Training Procedure

Preprocessing
  • β€”Dynamic tokenization with padding
  • β€”Maximum sequence length: 128 tokens
  • β€”Source/target language tags: frLatn/wolLatn
Training Hyperparameters
  • β€”Learning rate: 2e-5
  • β€”Batch size: 8 per device
  • β€”Training epochs: 3
  • β€”FP16 training: Enabled
  • β€”Evaluation strategy: Per epoch

Evaluation

Testing Data, Factors & Metrics

  • β€”Testing Data: 20% of dataset
  • β€”Metrics:
  • β€”Cloud Provider:
  • β€”Evaluation Factors:
  • β€”Translation accuracy
  • β€”Semantic preservation
  • β€”Grammar correctness

Environmental Impact

  • β€”Hardware Type: NVIDIA T4 GPU
  • β€”Hours used: 5
  • β€”Cloud Provider: [Not Specified]
  • β€”Compute Region: [Not Specified]
  • β€”Carbon Emitted: [Not Calculated]

Technical Specifications

Model Architecture and Objective

  • β€”Architecture: NLLB-200 (Distilled 600M version)
  • β€”Objective: Neural Machine Translation
  • β€”Parameters: 600M
  • β€”Context Window: 128 tokens

Compute Infrastructure

  • β€”Training Hardware: NVIDIA T4 GPU
  • β€”Training Time: 5 hours
  • β€”Software Framework: Hugging Face Transformers

Model Card Contact

For questions about this model, please create an issue on the model's Hugging Face repository.