poonehmousavi commited on
Commit
2086226
1 Parent(s): 8f5a2a0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +120 -0
README.md CHANGED
@@ -1,3 +1,123 @@
1
  ---
 
 
 
 
 
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - fr
4
+ thumbnail: null
5
+ tags:
6
+ - response-generation
7
+ - gpt
8
+ - pytorch
9
+ - speechbrain
10
  license: apache-2.0
11
+ datasets:
12
+ - multiwoz
13
+ metrics:
14
+ - name: Test PPL
15
+ type: ppl
16
+ value: ' 17.58'
17
  ---
18
+
19
+ <iframe src="https://ghbtns.com/github-btn.html?user=speechbrain&repo=speechbrain&type=star&count=true&size=large&v=2" frameborder="0" scrolling="0" width="170" height="30" title="GitHub"></iframe>
20
+ <br/><br/>
21
+
22
+ # GPT2 trained on MultiWOZ.2.1
23
+ This repository provides all the necessary tools to perform response generation from an end-to-end system within
24
+ SpeechBrain. For a better experience, we encourage you to learn more about
25
+ [SpeechBrain](https://speechbrain.github.io).
26
+ The performance of the model is the following:
27
+
28
+ | Release | Test PPL | Test BLEU 4 | GPUs |
29
+ |:-------------:|:--------------:|:--------------:| :--------:|
30
+ | 15.08.23 | 7.61 | 17.58 | 1xV100 32GB |
31
+
32
+ ## Credits
33
+ The model is provided by [vitas.ai](https://www.vitas.ai/).
34
+
35
+ ## Pipeline description
36
+ This dialouge system is composed of 2 different but linked blocks:
37
+
38
+ - Pretrained GPT Tokenizer that transforms words into subwords.
39
+ - GPT2LMHeadModel to generate the next sentence given the history of the dialogue.
40
+
41
+ The system is trained with dialogue from MultiWOZ corpus.
42
+
43
+
44
+ ## Install SpeechBrain
45
+ First of all, please install SpeechBrain with the following command:
46
+
47
+ ```
48
+ pip install speechbrain
49
+ ```
50
+
51
+ Please notice that we encourage you to read our tutorials and learn more about
52
+ [SpeechBrain](https://speechbrain.github.io).
53
+
54
+ ### Generating your Own Dialuge
55
+
56
+ ```python
57
+ from speechbrain.pretrained import ResponseGenerator
58
+ res_gen_model = ResponseGenerator.from_hparams(source="speechbrain/MultiWOZ-GPT-Response_Generation", savedir="pretrained_models/MultiWOZ-GPT-Response_Generation", pymodule_file="custom.py")
59
+ res_gen_model.generate_response()
60
+ ```
61
+
62
+ ### Inference on GPU
63
+
64
+ To perform inference on the GPU, add `run_opts={"device":"cuda"}` when calling the `from_hparams` method.
65
+
66
+ ## Parallel Inference on a Batch
67
+
68
+ Please, [see this Colab notebook](https://colab.research.google.com/drive/1hX5ZI9S4jHIjahFCZnhwwQmFoGAi3tmu?usp=sharing) to figure out how to transcribe in parallel a batch of input sentences using a pre-trained model.
69
+
70
+ ### Training
71
+
72
+ The model was trained with SpeechBrain (986a2175).
73
+ To train it from scratch follows these steps:
74
+
75
+ 1. Clone SpeechBrain:
76
+
77
+ ```bash
78
+ git clone https://github.com/speechbrain/speechbrain/
79
+ ```
80
+
81
+ 2. Install it:
82
+
83
+ ```
84
+ cd speechbrain
85
+ pip install -r requirements.txt
86
+ pip install -e .
87
+ ```
88
+
89
+ 3. Run Training:
90
+
91
+ ```
92
+ cd recipes/MultiWOZ/response_generation
93
+ pip install -r extra_requirements.txt
94
+ python train_with_gpt.py hparams/train_gpt.yaml --data_folder=your_data_folder
95
+ ```
96
+
97
+ You can find our training results (models, logs, etc) [here](https://www.dropbox.com/sh/vm8f5iavohr4zz9/AACrkOxXuxsrvJy4Cjpih9bQa?dl=0)
98
+
99
+ ### Limitations
100
+
101
+ The SpeechBrain team does not provide any warranty on the performance achieved by this model when used on other datasets.
102
+
103
+ # **About SpeechBrain**
104
+
105
+ - Website: https://speechbrain.github.io/
106
+ - Code: https://github.com/speechbrain/speechbrain/
107
+ - HuggingFace: https://huggingface.co/speechbrain/
108
+
109
+ # **Citing SpeechBrain**
110
+
111
+ Please, cite SpeechBrain if you use it for your research or business.
112
+
113
+ ```bibtex
114
+ @misc{speechbrain,
115
+ title={{SpeechBrain}: A General-Purpose Speech Toolkit},
116
+ author={Mirco Ravanelli and Titouan Parcollet and Peter Plantinga and Aku Rouhe and Samuele Cornell and Loren Lugosch and Cem Subakan and Nauman Dawalatabad and Abdelwahab Heba and Jianyuan Zhong and Ju-Chieh Chou and Sung-Lin Yeh and Szu-Wei Fu and Chien-Feng Liao and Elena Rastorgueva and François Grondin and William Aris and Hwidong Na and Yan Gao and Renato De Mori and Yoshua Bengio},
117
+ year={2021},
118
+ eprint={2106.04624},
119
+ archivePrefix={arXiv},
120
+ primaryClass={eess.AS},
121
+ note={arXiv:2106.04624}
122
+ }
123
+ ```