Downloads · 30 days
308
7% of all-time downloads
neverLife/nllb-200-distilled-600M-ja-zh
nllb-200-distilled-600M-ja-zh is a translation model from neverLife. Use it when you need text moved from one language to another. It is set up for transformers.
Downloads · 30 days
308
7% of all-time downloads
All-time downloads
4.4K
Public
Repo size
5 GB
Likes
9
Public
Click a slice to open those files.
.bin2.5 GB · 99%
From the Hugging Face model README
在1epoch的结果
在评估集上得到如下结果:
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_path = "neverLife/nllb-200-distilled-600M-ja-zh"
model = AutoModelForSeq2SeqLM.from_pretrained(model_path)
ja = "ぜんぜん田舎に来た気がしないんだが……。"
tokenizer = AutoTokenizer.from_pretrained(model_path, src_lang="jpn_Jpan", tgt_lang="zho_Hans")
input_ids = tokenizer.encode(ja, max_length=128, padding=True, return_tensors='pt')
outputs = model.generate(input_ids, num_beams=4, max_new_tokens=128)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))