en-zhtw
English-to-Traditional Chinese sentence translator
This model is a fine-tuned version of Helsinki-NLP/opus-mt-en-zh on the zetavg/coct-en-zh-tw-translations-twp-300k dataset.
This is so it can output Traditional Chinese by default and make the translations more natural sounding.
Model description
- input: English text only
- output: Traditional Chinese text translation
How to use:
from transformers import pipeline
model_checkpoint = "agentlans/en-zhtw"
translator = pipeline("translation", model=model_checkpoint)
translator(
[
"Even if you spend a day in Windsor you'll notice that it's a very multicultural city, yet still retaining a small town feel.",
"Its main waterfront park stretches about 5 km (3.1 mi), from the 1929 Ambassador suspension bridge past the contemporary Windsor Sculpture Park.",
]
)
# [{'translation_text': '儘管在風沙住了一天,都會發現這裡是個非常多樣化的城市,但還是保留了一個小鎮的感覺。'}, {'translation_text': '從 1929 年的大使吊橋到今天的風雕公園,總長約 5 公里。'}]
Intended uses & limitations
- English to Traditional Chinese translation
- Single sentence
- Limitations: may hallucinate or omit information, doesn't understand context, can still sound awkward or strange (as the above example shows)
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 3.0
Framework versions
- Transformers 4.43.3
- Pytorch 2.3.0+cu121
- Datasets 2.20.0
- Tokenizers 0.19.1
- Downloads last month
- 110
Inference Providers
NEW
This model is not currently available via any of the supported third-party Inference Providers, and
the model is not deployed on the HF Inference API.
Model tree for agentlans/en-zhtw
Base model
Helsinki-NLP/opus-mt-en-zh