NlpHUST / t5-vi-en-small

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

Introduction of t5-vi-en-small

Model Details of t5-vi-en-small


language:

  • vi

tags:

  • t5
  • seq2seq

Machine translation for vietnamese

Model Description

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

Training data

T5-vi-en-small 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-small")
tokenizer = T5Tokenizer.from_pretrained("NlpHUST/t5-vi-en-small")
model.to(device)

src = "Indonesia phỏng đoán nguyên nhân tàu ngầm chở 53 người mất tích bí ẩn"
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)

Indonesia anticipates the cause of the submarine transporting 53 mysterious missing persons

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

6
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

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

t5-vi-en-small huggingface.co

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

t5-vi-en-small huggingface.co Url

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

NlpHUST t5-vi-en-small online free

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

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

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

t5-vi-en-small install

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

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

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

Url of t5-vi-en-small

t5-vi-en-small huggingface.co Url

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

NlpHUST
ORGANIZATIONS

Other API from NlpHUST

huggingface.co

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