asahi417 commited on
Commit
ae944ce
1 Parent(s): 21527fb

model update

Browse files
Files changed (1) hide show
  1. README.md +70 -77
README.md CHANGED
@@ -21,12 +21,12 @@ widget:
21
  example_title: "Question Generation Example 2"
22
  - text: "generate question: <hl> 원테이크 촬영 <hl> 이기 때문에 한 사람이 실수를 하면 처음부터 다시 찍어야 하는 상황이 발생한다."
23
  example_title: "Question Generation Example 3"
24
- - text: "또한 스피어스는 많은 새로운 여성 아티스트들에게 영향을 끼쳤는데, 대표적으로 데미 로바토, 케이티 페리, 크리스티니아 드바지, 레이디 가가, 리틀 부츠, 셀레나 고메즈 & 더씬, 픽시 로트 이 있다. 2007년 비욘세 놀스는 Total Request Live와의 인터뷰에서 '나는 브리트니를 사랑하고 팬이에요. 특히 새 앨범 Blackout을 좋아해요'라고 말했다. 린제이 로한은 '언제나 브리트니 스피어스에게 영감을 받는다. 학창시절 그녀처럼 타블로이드에 오르기를 꿈꿔왔다'고 말하며 롤 모델로 꼽았다. 스피어스는 현대 음악가들에게 음악적 영감으로 언급되기도 했다. <hl> 마일리 사이러스는 자신의 히트곡 Party in the U.S.A. 가 브리트니에게 영감과 영향을 받은 곡이라고 밝혔다. <hl> 베리 매닐로우의 앨범 15 Minutes 역시 브리트니에게 영감을 얻었다고 언급되었다."
25
  example_title: "Answer Extraction Example 1"
26
- - text: "지난 22일 아프리카TV는 BJ 철구가 서비스 정지 처분을 받았음을 밝혔다. 서비스 정지 처분을 사유는 철구가 10대 청소년에게 유해한 장면을 방송으로 내보냈기 때문이었다. 문제가 된 장면은 BJ 철구가 미성년자는 시청할 수 없게 하는 19세 시청 가능 설정을 하지 않은 채 흡연하는 모습을 여과 없이 드러낸 장면이다. 아프리카TV는 청소년 보호 정책의 '청소년들이 해로운 환경으로부터 보호받을 수 있도록 조치한다'라고 조항을 근거로 철구에게 서비스 정지 처분을 내렸다. 흡연 이외에 음주 방송 등도 19세 시청 가능 설정을 해야만 방송할 수 있다. <hl> 게다가 철구의 방송 정지 처분은 이번에 처음이 아니라 16번 째기 때문에 더욱더 논란이 되고 있다. <hl>"
27
  example_title: "Answer Extraction Example 2"
28
  model-index:
29
- - name: lmqg/mt5-small-koquad-multitask
30
  results:
31
  - task:
32
  name: Text2text Generation
@@ -36,63 +36,44 @@ model-index:
36
  type: default
37
  args: default
38
  metrics:
39
- - name: BLEU4
40
- type: bleu4
41
- value: 0.10906053987753252
42
- - name: ROUGE-L
43
- type: rouge-l
44
- value: 0.25825433157641464
45
- - name: METEOR
46
- type: meteor
47
- value: 0.2752418309340361
48
- - name: BERTScore
49
- type: bertscore
50
- value: 0.8339547658777764
51
- - name: MoverScore
52
- type: moverscore
53
- value: 0.8253569952436216
54
- - name: QAAlignedF1Score (BERTScore)
55
- type: qa_aligned_f1_score_bertscore
56
- value: 0.803637745157127
57
- - name: QAAlignedRecall (BERTScore)
58
- type: qa_aligned_recall_bertscore
59
- value: 0.8372135478464777
60
- - name: QAAlignedPrecision (BERTScore)
61
- type: qa_aligned_precision_bertscore
62
- value: 0.7734194841249756
63
- - name: QAAlignedF1Score (MoverScore)
64
- type: qa_aligned_f1_score_moverscore
65
- value: 0.8254996927301479
66
- - name: QAAlignedRecall (MoverScore)
67
- type: qa_aligned_recall_moverscore
68
- value: 0.8668749372525869
69
- - name: QAAlignedPrecision (MoverScore)
70
- type: qa_aligned_precision_moverscore
71
- value: 0.7892838716044577
72
  ---
73
 
74
- # Model Card of `lmqg/mt5-small-koquad-multitask`
75
- This model is fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) for question generation task on the
76
- [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
77
- This model is fine-tuned on the answer extraction task as well as the question generation.
78
 
79
- Please cite our paper if you use the model ([https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)).
80
-
81
- ```
82
-
83
- @inproceedings{ushio-etal-2022-generative,
84
- title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
85
- author = "Ushio, Asahi and
86
- Alva-Manchego, Fernando and
87
- Camacho-Collados, Jose",
88
- booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
89
- month = dec,
90
- year = "2022",
91
- address = "Abu Dhabi, U.A.E.",
92
- publisher = "Association for Computational Linguistics",
93
- }
94
-
95
- ```
96
 
97
  ### Overview
98
  - **Language model:** [google/mt5-small](https://huggingface.co/google/mt5-small)
@@ -105,44 +86,57 @@ Please cite our paper if you use the model ([https://arxiv.org/abs/2210.03992](h
105
  ### Usage
106
  - With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
107
  ```python
108
-
109
  from lmqg import TransformersQG
 
110
  # initialize model
111
- model = TransformersQG(language='ko', model='lmqg/mt5-small-koquad-multitask')
 
112
  # model prediction
113
- question_answer = model.generate_qa("1990년 영화 《 남부군 》에서 단역으로 영화배우 첫 데뷔에 이어 같은 해 KBS 드라마 《지구인》에서 단역으로 출연하였고 이듬해 MBC 《여명의 눈동자》를 통해 단역으로 출연하였다.")
114
 
115
  ```
116
 
117
  - With `transformers`
118
  ```python
119
-
120
  from transformers import pipeline
121
- # initialize model
122
- pipe = pipeline("text2text-generation", 'lmqg/mt5-small-koquad-multitask')
 
123
  # answer extraction
124
- answer = pipe('extract answers: 또한 스피어스는 많은 새로운 여성 아티스트들에게 영향을 끼쳤는데, 대표적으로 데미 로바토, 케이티 페리, 크리스티니아 드바지, 레이디 가가, 리틀 부츠, 셀레나 고메즈 & 더씬, 픽시 로트 이 있다. 2007비욘세 놀스는 Total Request Live와의 인터뷰에서 '나는 브리트니�� 사랑하고 팬이에요. 특히 새 앨범 Blackout을 좋아해요'라고 말했다. 린제이 로한은 '언제나 브리트니 스피어스에게 영감을 받는다. 학창시절 그녀처럼 타블로이드에 오르기를 꿈꿔왔다'고 말하며 롤 모델로 꼽았다. 스피어스는 현대 음악가들에게 음악적 영감으로 언급되기도 했다. <hl> 마일리 사이러스는 자신의 히트곡 Party in the U.S.A. 브리트니에게 영감과 영향을 받은 곡이라고 밝혔다. <hl> 베리 매닐로우의 앨범 15 Minutes 역시 브리트니에게 영감을 얻었다고 언급되었다.')
 
125
  # question generation
126
- question = pipe('generate question: 1990영화 <hl> 남부군 <hl> 》에서 단역으로 영화배우 데뷔에 이어 같은 KBS 드라마 《지구인》에서 단역으로 출연하였고 이듬해 MBC 《여명의 눈동자》를 통해 단역으로 출연하였다.')
127
 
128
  ```
129
 
130
- ## Evaluation Metrics
131
 
132
 
133
- ### Metrics
134
 
135
- | Dataset | Type | BLEU4 | ROUGE-L | METEOR | BERTScore | MoverScore | Link |
136
- |:--------|:-----|------:|--------:|-------:|----------:|-----------:|-----:|
137
- | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) | default | 0.109 | 0.258 | 0.275 | 0.834 | 0.825 | [link](https://huggingface.co/lmqg/mt5-small-koquad-multitask/raw/main/eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json) |
 
 
 
 
 
 
 
138
 
139
 
140
- ### Metrics (QAG)
141
 
142
- | Dataset | Type | QA Aligned F1 Score (BERTScore) | QA Aligned F1 Score (MoverScore) | Link |
143
- |:--------|:-----|--------------------------------:|---------------------------------:|-----:|
144
- | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) | default | 0.804 | 0.825 | [link](https://huggingface.co/lmqg/mt5-small-koquad-multitask/raw/main/eval/metric.first.answer.paragraph.questions_answers.lmqg_qg_koquad.default.json) |
145
-
 
 
 
 
146
 
147
 
148
 
@@ -165,11 +159,10 @@ The following hyperparameters were used during fine-tuning:
165
  - gradient_accumulation_steps: 4
166
  - label_smoothing: 0.15
167
 
168
- The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-koquad-multitask/raw/main/trainer_config.json).
169
 
170
  ## Citation
171
  ```
172
-
173
  @inproceedings{ushio-etal-2022-generative,
174
  title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
175
  author = "Ushio, Asahi and
 
21
  example_title: "Question Generation Example 2"
22
  - text: "generate question: <hl> 원테이크 촬영 <hl> 이기 때문에 한 사람이 실수를 하면 처음부터 다시 찍어야 하는 상황이 발생한다."
23
  example_title: "Question Generation Example 3"
24
+ - text: "extract answers: 또한 스피어스는 많은 새로운 여성 아티스트들에게 영향을 끼쳤는데, 대표적으로 데미 로바토, 케이티 페리, 크리스티니아 드바지, 레이디 가가, 리틀 부츠, 셀레나 고메즈 & 더씬, 픽시 로트 이 있다. 2007년 비욘세 놀스는 Total Request Live와의 인터뷰에서 '나는 브리트니를 사랑하고 팬이에요. 특히 새 앨범 Blackout을 좋아해요'라고 말했다. 린제이 로한은 '언제나 브리트니 스피어스에게 영감을 받는다. 학창시절 그녀처럼 타블로이드에 오르기를 꿈꿔왔다'고 말하며 롤 모델로 꼽았다. 스피어스는 현대 음악가들에게 음악적 영감으로 언급되기도 했다. <hl> 마일리 사이러스는 자신의 히트곡 Party in the U.S.A. 가 브리트니에게 영감과 영향을 받은 곡이라고 밝혔다. <hl> 베리 매닐로우의 앨범 15 Minutes 역시 브리트니에게 영감을 얻었다고 언급되었다."
25
  example_title: "Answer Extraction Example 1"
26
+ - text: "extract answers: 지난 22일 아프리카TV는 BJ 철구가 서비스 정지 처분을 받았음을 밝혔다. 서비스 정지 처분을 사유는 철구가 10대 청소년에게 유해한 장면을 방송으로 내보냈기 때문이었다. 문제가 된 장면은 BJ 철구가 미성년자는 시청할 수 없게 하는 19세 시청 가능 설정을 하지 않은 채 흡연하는 모습을 여과 없이 드러낸 장면이다. 아프리카TV는 청소년 보호 정책의 '청소년들이 해로운 환경으로부터 보호받을 수 있도록 조치한다'라고 조항을 근거로 철구에게 서비스 정지 처분을 내렸다. 흡연 이외에 음주 방송 등도 19세 시청 가능 설정을 해야만 방송할 수 있다. <hl> 게다가 철구의 방송 정지 처분은 이번에 처음이 아니라 16번 째기 때문에 더욱더 논란이 되고 있다. <hl>"
27
  example_title: "Answer Extraction Example 2"
28
  model-index:
29
+ - name: lmqg/mt5-small-koquad-qg-ae
30
  results:
31
  - task:
32
  name: Text2text Generation
 
36
  type: default
37
  args: default
38
  metrics:
39
+ - name: BLEU4 (Question Generation)
40
+ type: bleu4_question_generation
41
+ value: 10.91
42
+ - name: ROUGE-L (Question Generation)
43
+ type: rouge_l_question_generation
44
+ value: 25.83
45
+ - name: METEOR (Question Generation)
46
+ type: meteor_question_generation
47
+ value: 27.52
48
+ - name: BERTScore (Question Generation)
49
+ type: bertscore_question_generation
50
+ value: 83.4
51
+ - name: MoverScore (Question Generation)
52
+ type: moverscore_question_generation
53
+ value: 82.54
54
+ - name: QAAlignedF1Score-BERTScore (Question & Answer Generation)
55
+ type: qa_aligned_f1_score_bertscore_question_answer_generation
56
+ value: 80.36
57
+ - name: QAAlignedRecall-BERTScore (Question & Answer Generation)
58
+ type: qa_aligned_recall_bertscore_question_answer_generation
59
+ value: 83.72
60
+ - name: QAAlignedPrecision-BERTScore (Question & Answer Generation)
61
+ type: qa_aligned_precision_bertscore_question_answer_generation
62
+ value: 77.34
63
+ - name: QAAlignedF1Score-MoverScore (Question & Answer Generation)
64
+ type: qa_aligned_f1_score_moverscore_question_answer_generation
65
+ value: 82.55
66
+ - name: QAAlignedRecall-MoverScore (Question & Answer Generation)
67
+ type: qa_aligned_recall_moverscore_question_answer_generation
68
+ value: 86.69
69
+ - name: QAAlignedPrecision-MoverScore (Question & Answer Generation)
70
+ type: qa_aligned_precision_moverscore_question_answer_generation
71
+ value: 78.93
72
  ---
73
 
74
+ # Model Card of `lmqg/mt5-small-koquad-qg-ae`
75
+ This model is fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) for question generation and answer extraction jointly on the [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
 
 
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
 
78
  ### Overview
79
  - **Language model:** [google/mt5-small](https://huggingface.co/google/mt5-small)
 
86
  ### Usage
87
  - With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
88
  ```python
 
89
  from lmqg import TransformersQG
90
+
91
  # initialize model
92
+ model = TransformersQG(language="ko", model="lmqg/mt5-small-koquad-qg-ae")
93
+
94
  # model prediction
95
+ question_answer_pairs = model.generate_qa("1990년 영화 《 남부군 》에서 단역으로 영화배우 첫 데뷔에 이어 같은 해 KBS 드라마 《지구인》에서 단역으로 출연하였고 이듬해 MBC 《여명의 눈동자》를 통해 단역으로 출연하였다.")
96
 
97
  ```
98
 
99
  - With `transformers`
100
  ```python
 
101
  from transformers import pipeline
102
+
103
+ pipe = pipeline("text2text-generation", "lmqg/mt5-small-koquad-qg-ae")
104
+
105
  # answer extraction
106
+ answer = pipe("generate question: 1990영화 <hl> 남부군 <hl> 》에서 단역으로 영화배우 데뷔에 이어 같은 KBS 드라마 《지구인》에서 단역으로 출연하였고 이듬해 MBC 《여명의 눈동자》를 통해 단역으로 출연하였다.")
107
+
108
  # question generation
109
+ question = pipe("extract answers: 또한 스피어스는 많은 새로운 여성 아티스트들에게 영향을 끼쳤는데, 대표적으로 데미 로바토, 케이티 페리, 크리스티니아 드바지, 레이디 가가, 리틀 부츠, 셀레나 고메즈 & 더씬, 픽시 로트 이 있다. 2007비욘세 놀스는 Total Request Live와의 인터뷰에서 '나는 브리트니를 사랑하고 팬이에요. 특히 새 앨범 Blackout을 좋아해요'라고 말했다. 린제이 로한은 '언제나 브리트니 스피어스에게 영감을 받는다. 학창시절 그녀처럼 타블로이드에 오르기를 꿈꿔왔다'고 말하며 롤 모델로 꼽았다. 스피어스는 현대 음악가들에게 음악적 영감으로 언급되기도 했다. <hl> 마일리 사이러스는 자신의 히트곡 Party in the U.S.A. 브리트니에게 영감과 영향을 받은 곡이라고 밝혔다. <hl> 베리 매닐로우의 앨범 15 Minutes 역시 브리트니에게 영감을 얻었다고 언급되었다.")
110
 
111
  ```
112
 
113
+ ## Evaluation
114
 
115
 
116
+ - ***Metric (Question Generation)***: [raw metric file](https://huggingface.co/lmqg/mt5-small-koquad-qg-ae/raw/main/eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json)
117
 
118
+ | | Score | Type | Dataset |
119
+ |:-----------|--------:|:--------|:-----------------------------------------------------------------|
120
+ | BERTScore | 83.4 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
121
+ | Bleu_1 | 25.91 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
122
+ | Bleu_2 | 19.09 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
123
+ | Bleu_3 | 14.37 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
124
+ | Bleu_4 | 10.91 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
125
+ | METEOR | 27.52 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
126
+ | MoverScore | 82.54 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
127
+ | ROUGE_L | 25.83 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
128
 
129
 
130
+ - ***Metric (Question & Answer Generation)***: [raw metric file](https://huggingface.co/lmqg/mt5-small-koquad-qg-ae/raw/main/eval/metric.first.answer.paragraph.questions_answers.lmqg_qg_koquad.default.json)
131
 
132
+ | | Score | Type | Dataset |
133
+ |:--------------------------------|--------:|:--------|:-----------------------------------------------------------------|
134
+ | QAAlignedF1Score (BERTScore) | 80.36 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
135
+ | QAAlignedF1Score (MoverScore) | 82.55 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
136
+ | QAAlignedPrecision (BERTScore) | 77.34 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
137
+ | QAAlignedPrecision (MoverScore) | 78.93 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
138
+ | QAAlignedRecall (BERTScore) | 83.72 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
139
+ | QAAlignedRecall (MoverScore) | 86.69 | default | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) |
140
 
141
 
142
 
 
159
  - gradient_accumulation_steps: 4
160
  - label_smoothing: 0.15
161
 
162
+ The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-koquad-qg-ae/raw/main/trainer_config.json).
163
 
164
  ## Citation
165
  ```
 
166
  @inproceedings{ushio-etal-2022-generative,
167
  title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
168
  author = "Ushio, Asahi and