NlpHUST / t5-vi-en-base

huggingface.co
Total runs: 21
24-hour runs: 0
7-day runs: -4
30-day runs: -10
Model's Last Updated: June 23 2021
text-generation

Introduction of t5-vi-en-base

Model Details of t5-vi-en-base


language:

  • vi

tags:

  • t5
  • seq2seq

Machine translation for vietnamese

Model Description

T5-vi-en-base is a transformer model for vietnamese machine translation designed using T5 architecture.

Training data

T5-vi-en-base was trained on 4M sentence pairs (english,vietnamese)

How to use
from transformers import T5ForConditionalGeneration, T5Tokenizer
import torch
if torch.cuda.is_available():       
    device = torch.device("cuda")

    print('There are %d GPU(s) available.' % torch.cuda.device_count())

    print('We will use the GPU:', torch.cuda.get_device_name(0))
else:
    print('No GPU available, using the CPU instead.')
    device = torch.device("cpu")

model = T5ForConditionalGeneration.from_pretrained("NlpHUST/t5-vi-en-base")
tokenizer = T5Tokenizer.from_pretrained("NlpHUST/t5-vi-en-base")
model.to(device)

src = "Theo lãnh đạo Sở Y tế, 3 người này không có triệu chứng sốt, ho, khó thở, đã được lấy mẫu xét nghiệm và cách ly tập trung."
tokenized_text = tokenizer.encode(src, return_tensors="pt").to(device)
model.eval()
summary_ids = model.generate(
                    tokenized_text,
                    max_length=256, 
                    num_beams=5,
                    repetition_penalty=2.5, 
                    length_penalty=1.0, 
                    early_stopping=True
                )
output = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
print(output)

According to the head of the Department of Health, the three people had no symptoms of fever, cough, shortness of breath, were taken samples for testing and concentrated quarantine.

Runs of NlpHUST t5-vi-en-base on huggingface.co

21
Total runs
0
24-hour runs
-1
3-day runs
-4
7-day runs
-10
30-day runs

More Information About t5-vi-en-base huggingface.co Model

t5-vi-en-base huggingface.co

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

t5-vi-en-base huggingface.co Url

https://huggingface.co/NlpHUST/t5-vi-en-base

NlpHUST t5-vi-en-base online free

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

NlpHUST t5-vi-en-base online free url in huggingface.co:

https://huggingface.co/NlpHUST/t5-vi-en-base

t5-vi-en-base install

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

t5-vi-en-base install url in huggingface.co:

https://huggingface.co/NlpHUST/t5-vi-en-base

Url of t5-vi-en-base

t5-vi-en-base huggingface.co Url

Provider of t5-vi-en-base huggingface.co

NlpHUST
ORGANIZATIONS

Other API from NlpHUST

huggingface.co

Total runs: 13
Run Growth: 0
Growth Rate: 0.00%
Updated:November 12 2022