alexandre-lopes commited on
Commit
159647b
1 Parent(s): b7c710f

Create Readme

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 EN-PT 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 "I like to eat rice" is:
10
+
11
+ ```python
12
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
13
+
14
+ tokenizer = AutoTokenizer.from_pretrained("unicamp-dl/translation-en-pt-t5")
15
+
16
+ model = AutoModelForSeq2SeqLM.from_pretrained("unicamp-dl/translation-en-pt-t5")
17
+
18
+ enpt_pipeline = pipeline('text2text-generation', model=model, tokenizer=tokenizer)
19
+
20
+ enpt_pipeline("translate English to Portuguese: I like to eat rice.")
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
+ ```