Machine translation for ancient Vietnamese

How to use

from transformers import T5ForConditionalGeneration, T5Tokenizer

model = T5ForConditionalGeneration.from_pretrained("huyg1108/t5-ancient_vie-eng-base")
tokenizer = T5Tokenizer.from_pretrained("huyg1108/t5-ancient_vie-eng-base", legacy=False)
model.eval()

src = "Đạo chi vi vật, duy hoảng duy hốt."
tokenized_text = tokenizer.encode(src, return_tensors="pt")
summary_ids = model.generate(
  tokenized_text,
  max_length=64,
  num_beams=7,
  repetition_penalty=2.5,
  length_penalty=1.0,
  early_stopping=True
)

output = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
output

The Way governs things, only they are alarmed and sudden.

Downloads last month
47
Safetensors
Model size
582M params
Tensor type
F32
·
Inference Examples
Unable to determine this model's library. Check the docs .

Model tree for huyg1108/t5-ancient_vie-eng-base

Finetuned
(1)
this model