alexandre-lopes commited on
Commit
6a7b744
1 Parent(s): 2de91ab

Create Readme.md

Browse files
Files changed (1) hide show
  1. README.md +41 -0
README.md ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Introduction
2
+
3
+ This repository brings an implementation of T5 for translation in PT-EN tasks using a modest hardware setup. We propose some changes in tokenizator and post-processing that improves the result and used a Portuguese pretrained model for the translation. You can collect more informations in [our repository](https://github.com/unicamp-dl/Lite-T5-Translation). Also, check [our paper](https://aclanthology.org/2020.wmt-1.90.pdf)!
4
+
5
+ # Usage
6
+
7
+ Just follow "Use in Transformers" instructions. It is necessary to add a few words before to define the task to T5.
8
+
9
+ You can also create a pipeline for it. An example with the phrase " Eu gosto de comer arroz" is:
10
+
11
+ ```python
12
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
13
+
14
+ tokenizer = AutoTokenizer.from_pretrained("unicamp-dl/translation-pt-en-t5")
15
+
16
+ model = AutoModelForSeq2SeqLM.from_pretrained("unicamp-dl/translation-pt-en-t5")
17
+
18
+ pten_pipeline = pipeline('text2text-generation', model=model, tokenizer=tokenizer)
19
+
20
+ pten_pipeline("translate Portuguese to English: Eu gosto de comer arroz.")
21
+
22
+ ```
23
+
24
+ # Citation
25
+
26
+ ```bibtex
27
+ @inproceedings{lopes-etal-2020-lite,
28
+ title = "Lite Training Strategies for {P}ortuguese-{E}nglish and {E}nglish-{P}ortuguese Translation",
29
+ author = "Lopes, Alexandre and
30
+ Nogueira, Rodrigo and
31
+ Lotufo, Roberto and
32
+ Pedrini, Helio",
33
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
34
+ month = nov,
35
+ year = "2020",
36
+ address = "Online",
37
+ publisher = "Association for Computational Linguistics",
38
+ url = "https://www.aclweb.org/anthology/2020.wmt-1.90",
39
+ pages = "833--840",
40
+ }
41
+ ```