NlpHUST / t5-en-vi-small

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

Introduction of t5-en-vi-small

Model Details of t5-en-vi-small

T5-EN-VI-SMALL:Pretraining Text-To-Text Transfer Transformer for English Vietnamese Translation

Dataset

The IWSLT'15 English-Vietnamese data is used from Stanford NLP group . For all experiments the corpus was split into training, development and test set:

Data set Sentences Download
Training 133,317 via GitHub or located in data/train-en-vi.tgz
Development 1,553 via GitHub or located in data/dev-2012-en-vi.tgz
Test 1,268 via GitHub or located in data/test-2013-en-vi.tgz
Results

The results on test set.

Model BLEU (Beam Search)
Luong & Manning (2015) 23.30
Sequence-to-sequence model with attention 26.10
Neural Phrase-based Machine Translation Huang et. al. (2017) 27.69
Neural Phrase-based Machine Translation + LM Huang et. al. (2017) 28.07
t5-en-vi-small (pretraining, without training data) 28.46 (cased) / 29.23 (uncased)
t5-en-vi-small (fineturning with training data) 32.38 (cased) / 33.19 (uncased)
Example Using
import torch

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

src = "In school , we spent a lot of time studying the history of Kim Il-Sung , but we never learned much about the outside world , except that America , South Korea , Japan are the enemies ."
tokenized_text = tokenizer.encode(src, return_tensors="pt").to(device)
model.eval()
summary_ids = model.generate(
                    tokenized_text,
                    max_length=128, 
                    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)
Output

Ở trường, chúng tôi dành nhiều thời gian để nghiên cứu về lịch sử Kim Il-Sung, nhưng chúng tôi chưa bao giờ học được nhiều về thế giới bên ngoài, ngoại trừ Mỹ, Hàn Quốc, Nhật Bản là kẻ thù.
Contact information

For personal communication related to this project, please contact Nha Nguyen Van ( [email protected] ).

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

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

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

t5-en-vi-small huggingface.co

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

t5-en-vi-small huggingface.co Url

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

NlpHUST t5-en-vi-small online free

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

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

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

t5-en-vi-small install

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

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

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

Url of t5-en-vi-small

t5-en-vi-small huggingface.co Url

Provider of t5-en-vi-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