Downloads · 30 days
32
21% of all-time downloads
BrandenTung/t5-zh-en-opus
t5-zh-en-opus is a translation model from BrandenTung. Use it when you need text moved from one language to another.
This model is a T5-style encoder–decoder Transformer trained for Chinese → English translation on OPUS-100 (500,000 sentence pairs).
Downloads · 30 days
32
21% of all-time downloads
All-time downloads
155
Public
Parameters
37.6M
151 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors150 MB · 100%
From the Hugging Face model README
This model is a T5-style encoder–decoder Transformer trained for Chinese → English translation on OPUS-100 (500,000 sentence pairs).
Example translations generated by the model:
ZH: 你是谁?
EN: Who are you?
ZH: 我喜欢喝咖啡。
EN: I like coffee.
This repository includes spm.model, a SentencePiece tokenizer trained jointly on Chinese and English text from OPUS-100.
Tokenizer settings:
Load the model using:
from transformers import T5ForConditionalGeneration
import sentencepiece as spm
model = T5ForConditionalGeneration.from_pretrained("BrandenTung/t5-zh-en-opus")
sp = spm.SentencePieceProcessor()
sp.load("spm.model")
Before encoding, add this prefix to the Chinese sentence:
translate Chinese to English: