Downloads · 30 days
120
11% of all-time downloads
RUCAIBox/Erya4FT
Erya4FT is a translation model from RUCAIBox. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as apache-2.0.
Erya4FT is based on Erya and further fine-tuned on our Dataset, enhancing the ability to translate ancient Chinese into Modern Chinese.
Downloads · 30 days
120
11% of all-time downloads
All-time downloads
1.1K
Public
Repo size
2.1 GB
Likes
4
Public
Click a slice to open those files.
.bin1.1 GB · 100%
From the Hugging Face model README
Erya4FT is based on Erya and further fine-tuned on our Dataset, enhancing the ability to translate ancient Chinese into Modern Chinese.
>>> from transformers import BertTokenizer, CPTForConditionalGeneration
>>> tokenizer = BertTokenizer.from_pretrained("RUCAIBox/Erya4FT")
>>> model = CPTForConditionalGeneration.from_pretrained("RUCAIBox/Erya4FT")
>>> input_ids = tokenizer("竖子不足与谋。", return_tensors='pt')
>>> input_ids.pop("token_type_ids")
>>> pred_ids = model.generate(max_new_tokens=256, **input_ids)
>>> print(tokenizer.batch_decode(pred_ids, skip_special_tokens=True))
['这 小 子 不 值 得 与 他 商 量 。']