StevenTang commited on
Commit
c531557
1 Parent(s): d4d2d83

Update README

Browse files
Files changed (1) hide show
  1. README.md +45 -0
README.md CHANGED
@@ -20,3 +20,48 @@ widget:
20
  - text: "Generate the question based on the answer: boxing [X_SEP] A bolo punch is a punch used in martial arts . A hook is a punch in boxing ."
21
  example_title: "Question Generaion"
22
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  - text: "Generate the question based on the answer: boxing [X_SEP] A bolo punch is a punch used in martial arts . A hook is a punch in boxing ."
21
  example_title: "Question Generaion"
22
  ---
23
+
24
+ # MVP
25
+ The MVP model was proposed in [**MVP: Multi-task Supervised Pre-training for Natural Language Generation**](https://github.com/RUCAIBox/MVP/blob/main/paper.pdf) by Tianyi Tang, Junyi Li, Wayne Xin Zhao and Ji-Rong Wen.
26
+
27
+ The detailed information and instructions can be found [https://github.com/RUCAIBox/MVP](https://github.com/RUCAIBox/MVP).
28
+
29
+ ## Model Description
30
+ MVP is supervised pre-trained using a mixture of labeled datasets. It follows a standard Transformer encoder-decoder architecture.
31
+
32
+ MVP is specially designed for natural language generation and can be adapted to a wide range of generation tasks, including but not limited to summarization, data-to-text generation, open-ended dialogue system, story generation, question answering, question generation, task-oriented dialogue system, commonsense generation, paraphrase generation, text style transfer, and text simplification. Our model can also be adapted to natural language understanding tasks such as sequence classification and (extractive) question answering.
33
+
34
+ ## Examples
35
+ For summarization:
36
+ ```python
37
+ >>> from transformers import MvpTokenizer, MvpForConditionalGeneration
38
+
39
+ >>> tokenizer = MvpTokenizer.from_pretrained("RUCAIBox/mvp")
40
+ >>> model = MvpForConditionalGeneration.from_pretrained("RUCAIBox/mvp")
41
+
42
+ >>> inputs = tokenizer(
43
+ ... "Summarize: You may want to stick it to your boss and leave your job, but don't do it if these are your reasons.",
44
+ ... return_tensors="pt",
45
+ ... )
46
+ >>> generated_ids = model.generate(**inputs)
47
+ >>> tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
48
+ ["Why You Shouldn't Quit Your Job"]
49
+ ```
50
+
51
+ For data-to-text generation:
52
+ ```python
53
+ >>> from transformers import MvpTokenizerFast, MvpForConditionalGeneration
54
+
55
+ >>> tokenizer = MvpTokenizerFast.from_pretrained("RUCAIBox/mvp")
56
+ >>> model = MvpForConditionalGeneration.from_pretrained("RUCAIBox/mvp")
57
+
58
+ >>> inputs = tokenizer(
59
+ ... "Describe the following data: Iron Man | instance of | Superhero [SEP] Stan Lee | creator | Iron Man",
60
+ ... return_tensors="pt",
61
+ ... )
62
+ >>> generated_ids = model.generate(**inputs)
63
+ >>> tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
64
+ ['Stan Lee created the character of Iron Man, a fictional superhero appearing in American comic']
65
+ ```
66
+
67
+ ## Citation