cantonese chinese translation
raptorkwokIntroduction
The Cantonese-Chinese Translation model is a fine-tuned version of the fnlp/bart-base-chinese
model, specifically designed for translating between Cantonese and Traditional Chinese. It was fine-tuned using the raptorkwok/cantonese-traditional-chinese-parallel-corpus
dataset, achieving significant evaluation metrics such as a BLEU score of 62.1085.
Architecture
The model is based on the BART architecture, optimized for text-to-text generation tasks. It leverages the strengths of the fnlp/bart-base-chinese
model, a robust foundation for Chinese language processing tasks.
Training
Training Parameters
The model was trained using the following hyperparameters:
- Learning Rate: 2e-05
- Train Batch Size: 16
- Eval Batch Size: 16
- Seed: 42
- Optimizer: Adam with betas=(0.9, 0.999) and epsilon=1e-08
- LR Scheduler Type: Linear
- Number of Epochs: 30
- Mixed Precision Training: Native AMP
Training Results
The model demonstrated progressive improvements across training steps, with a final validation loss of 0.2258 and consistent performance metrics. The BLEU score and CHRF scores indicate high-quality translation outputs.
Framework Versions
- Transformers: 4.28.1
- PyTorch: 2.1.0+cu121
- Datasets: 2.14.6
- Tokenizers: 0.13.3
Guide: Running Locally
To run the Cantonese-Chinese Translation model locally, follow these steps:
-
Install Dependencies:
pip install transformers datasets torch
-
Load the Model:
from transformers import pipeline model = pipeline("translation", model="raptorkwok/cantonese-chinese-translation")
-
Run a Translation:
result = model("Your Cantonese text here") print(result)
-
Cloud GPUs: For efficient processing, consider using cloud services like AWS, GCP, or Azure, which offer GPU instances.
License
The licensing terms for the Cantonese-Chinese Translation model are not explicitly stated in the provided document. It is recommended to review the model card on Hugging Face for detailed licensing information.