aarontseng / zero-mt-en-zh_hant

huggingface.co
Total runs: 7
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: November 06 2024
translation

Introduction of zero-mt-en-zh_hant

Model Details of zero-mt-en-zh_hant

Zero-mt

https://github.com/zape-aat/zero-mt

Metrics
Testset BLEU Chrf++ Comet22
flores200-dev 46.62 39.37 0.857
flores200-devtest 30.62 24.93 0.854
newstest2019 33.26 33.09 0.805
How to use
git lfs install
git clone https://huggingface.co/aarontseng/zero-mt-zh_hant-en
pip install ctranslate2
pip install sentencepiece
Basic Usage
import ctranslate2
import sentencepiece

src_model = sentencepiece.SentencePieceProcessor()
src_model.load("zero-mt-zh_hant-en/source.model")
tgt_model = sentencepiece.SentencePieceProcessor()
tgt_model.load("zero-mt-zh_hant-en/target.model")

translator = ctranslate2.Translator("zero-mt-zh_hant-en", device="cuda")  # "cpu" or "cuda"

encoded_line = src_model.encode_as_pieces("在世界上的許多地方,揮手都是一種表示「你好」的友善手勢」。")

results = translator.translate_batch([encoded_line], batch_type="tokens", max_batch_size=1024)

decoded_line = tgt_model.decode(results[0].hypotheses[0])

print(decoded_line) # In many places around the world, waving is a friendly gesture of "hello".
Batch translation
import ctranslate2
import sentencepiece

src_path = "dev.cmn_Hant"
tgt_path = "translated.txt"

src_model = sentencepiece.SentencePieceProcessor()
src_model.load("zero-mt-zh_hant-en/source.model")
tgt_model = sentencepiece.SentencePieceProcessor()
tgt_model.load("zero-mt-zh_hant-en/target.model")

translator = ctranslate2.Translator("zero-mt-zh_hant-en", device="cuda")  # "cpu" or "cuda"

src_file = open(src_path, 'r', encoding="utf-8")
src_lines = src_file.readlines()

encoded_lines = src_model.encode_as_pieces(src_lines)

results = translator.translate_batch(encoded_lines, batch_type="tokens", max_batch_size=1024)
translations = [translation.hypotheses[0] for translation in results]

decoded_lines = tgt_model.decode(translations)

tgt_file = open(tgt_path, "w", encoding="utf-8", newline='')

for line in decoded_lines:
    tgt_file.write(line)
    tgt_file.write('\n')

Runs of aarontseng zero-mt-en-zh_hant on huggingface.co

7
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About zero-mt-en-zh_hant huggingface.co Model

More zero-mt-en-zh_hant license Visit here:

https://choosealicense.com/licenses/apache-2.0

zero-mt-en-zh_hant huggingface.co

zero-mt-en-zh_hant huggingface.co is an AI model on huggingface.co that provides zero-mt-en-zh_hant's model effect (), which can be used instantly with this aarontseng zero-mt-en-zh_hant model. huggingface.co supports a free trial of the zero-mt-en-zh_hant model, and also provides paid use of the zero-mt-en-zh_hant. Support call zero-mt-en-zh_hant model through api, including Node.js, Python, http.

zero-mt-en-zh_hant huggingface.co Url

https://huggingface.co/aarontseng/zero-mt-en-zh_hant

aarontseng zero-mt-en-zh_hant online free

zero-mt-en-zh_hant huggingface.co is an online trial and call api platform, which integrates zero-mt-en-zh_hant's modeling effects, including api services, and provides a free online trial of zero-mt-en-zh_hant, you can try zero-mt-en-zh_hant online for free by clicking the link below.

aarontseng zero-mt-en-zh_hant online free url in huggingface.co:

https://huggingface.co/aarontseng/zero-mt-en-zh_hant

zero-mt-en-zh_hant install

zero-mt-en-zh_hant is an open source model from GitHub that offers a free installation service, and any user can find zero-mt-en-zh_hant on GitHub to install. At the same time, huggingface.co provides the effect of zero-mt-en-zh_hant install, users can directly use zero-mt-en-zh_hant installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

zero-mt-en-zh_hant install url in huggingface.co:

https://huggingface.co/aarontseng/zero-mt-en-zh_hant

Url of zero-mt-en-zh_hant

zero-mt-en-zh_hant huggingface.co Url

Provider of zero-mt-en-zh_hant huggingface.co

aarontseng
ORGANIZATIONS

Other API from aarontseng

huggingface.co

Total runs: 46
Run Growth: 2
Growth Rate: 4.35%
Updated:September 19 2024
huggingface.co

Total runs: 9
Run Growth: 9
Growth Rate: 100.00%
Updated:November 08 2025
huggingface.co

Total runs: 7
Run Growth: 3
Growth Rate: 42.86%
Updated:February 11 2025