model update
Browse files- README.md +158 -0
- config.json +1 -1
- eval/metric.first.answer.paragraph.questions_answers.lmqg_qag_koquad.default.json +1 -0
- eval/samples.test.hyp.paragraph.questions_answers.lmqg_qag_koquad.default.txt +0 -0
- eval/samples.validation.hyp.paragraph.questions_answers.lmqg_qag_koquad.default.txt +0 -0
- pytorch_model.bin +2 -2
- tokenizer_config.json +1 -1
- trainer_config.json +1 -0
README.md
ADDED
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
license: cc-by-4.0
|
4 |
+
metrics:
|
5 |
+
- bleu4
|
6 |
+
- meteor
|
7 |
+
- rouge-l
|
8 |
+
- bertscore
|
9 |
+
- moverscore
|
10 |
+
language: ko
|
11 |
+
datasets:
|
12 |
+
- lmqg/qag_koquad
|
13 |
+
pipeline_tag: text2text-generation
|
14 |
+
tags:
|
15 |
+
- questions and answers generation
|
16 |
+
widget:
|
17 |
+
- text: "1990년 영화 《 남부군 》에서 단역으로 영화배우 첫 데뷔에 이어 같은 해 KBS 드라마 《지구인》에서 단역으로 출연하였고 이듬해 MBC 《여명의 눈동자》를 통해 단역으로 출연하였다."
|
18 |
+
example_title: "Questions & Answers Generation Example 1"
|
19 |
+
model-index:
|
20 |
+
- name: lmqg/mt5-small-koquad-qag
|
21 |
+
results:
|
22 |
+
- task:
|
23 |
+
name: Text2text Generation
|
24 |
+
type: text2text-generation
|
25 |
+
dataset:
|
26 |
+
name: lmqg/qag_koquad
|
27 |
+
type: default
|
28 |
+
args: default
|
29 |
+
metrics:
|
30 |
+
- name: BLEU4 (Question & Answer Generation)
|
31 |
+
type: bleu4_question_answer_generation
|
32 |
+
value: 0.71
|
33 |
+
- name: ROUGE-L (Question & Answer Generation)
|
34 |
+
type: rouge_l_question_answer_generation
|
35 |
+
value: 8.06
|
36 |
+
- name: METEOR (Question & Answer Generation)
|
37 |
+
type: meteor_question_answer_generation
|
38 |
+
value: 12.95
|
39 |
+
- name: BERTScore (Question & Answer Generation)
|
40 |
+
type: bertscore_question_answer_generation
|
41 |
+
value: 58.39
|
42 |
+
- name: MoverScore (Question & Answer Generation)
|
43 |
+
type: moverscore_question_answer_generation
|
44 |
+
value: 58.81
|
45 |
+
- name: QAAlignedF1Score-BERTScore (Question & Answer Generation)
|
46 |
+
type: qa_aligned_f1_score_bertscore_question_answer_generation
|
47 |
+
value: 74.23
|
48 |
+
- name: QAAlignedRecall-BERTScore (Question & Answer Generation)
|
49 |
+
type: qa_aligned_recall_bertscore_question_answer_generation
|
50 |
+
value: 74.2
|
51 |
+
- name: QAAlignedPrecision-BERTScore (Question & Answer Generation)
|
52 |
+
type: qa_aligned_precision_bertscore_question_answer_generation
|
53 |
+
value: 74.29
|
54 |
+
- name: QAAlignedF1Score-MoverScore (Question & Answer Generation)
|
55 |
+
type: qa_aligned_f1_score_moverscore_question_answer_generation
|
56 |
+
value: 75.06
|
57 |
+
- name: QAAlignedRecall-MoverScore (Question & Answer Generation)
|
58 |
+
type: qa_aligned_recall_moverscore_question_answer_generation
|
59 |
+
value: 75.04
|
60 |
+
- name: QAAlignedPrecision-MoverScore (Question & Answer Generation)
|
61 |
+
type: qa_aligned_precision_moverscore_question_answer_generation
|
62 |
+
value: 75.14
|
63 |
+
---
|
64 |
+
|
65 |
+
# Model Card of `lmqg/mt5-small-koquad-qag`
|
66 |
+
This model is fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) for question & answer pair generation task on the [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
|
67 |
+
|
68 |
+
|
69 |
+
### Overview
|
70 |
+
- **Language model:** [google/mt5-small](https://huggingface.co/google/mt5-small)
|
71 |
+
- **Language:** ko
|
72 |
+
- **Training data:** [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) (default)
|
73 |
+
- **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
|
74 |
+
- **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
|
75 |
+
- **Paper:** [https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)
|
76 |
+
|
77 |
+
### Usage
|
78 |
+
- With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
|
79 |
+
```python
|
80 |
+
from lmqg import TransformersQG
|
81 |
+
|
82 |
+
# initialize model
|
83 |
+
model = TransformersQG(language="ko", model="lmqg/mt5-small-koquad-qag")
|
84 |
+
|
85 |
+
# model prediction
|
86 |
+
question_answer_pairs = model.generate_qa("1990년 영화 《 남부군 》에서 단역으로 영화배우 첫 데뷔에 이어 같은 해 KBS 드라마 《지구인》에서 단역으로 출연하였고 이듬해 MBC 《여명의 눈동자》를 통해 단역으로 출연하였다.")
|
87 |
+
|
88 |
+
```
|
89 |
+
|
90 |
+
- With `transformers`
|
91 |
+
```python
|
92 |
+
from transformers import pipeline
|
93 |
+
|
94 |
+
pipe = pipeline("text2text-generation", "lmqg/mt5-small-koquad-qag")
|
95 |
+
output = pipe("1990년 영화 《 남부군 》에서 단역으로 영화배우 첫 데뷔에 이어 같은 해 KBS 드라마 《지구인》에서 단역으로 출연하였고 이듬해 MBC 《여명의 눈동자》를 통해 단역으로 출연하였다.")
|
96 |
+
|
97 |
+
```
|
98 |
+
|
99 |
+
## Evaluation
|
100 |
+
|
101 |
+
|
102 |
+
- ***Metric (Question & Answer Generation)***: [raw metric file](https://huggingface.co/lmqg/mt5-small-koquad-qag/raw/main/eval/metric.first.answer.paragraph.questions_answers.lmqg_qag_koquad.default.json)
|
103 |
+
|
104 |
+
| | Score | Type | Dataset |
|
105 |
+
|:--------------------------------|--------:|:--------|:-------------------------------------------------------------------|
|
106 |
+
| BERTScore | 58.39 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
107 |
+
| Bleu_1 | 4.09 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
108 |
+
| Bleu_2 | 2.09 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
109 |
+
| Bleu_3 | 1.17 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
110 |
+
| Bleu_4 | 0.71 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
111 |
+
| METEOR | 12.95 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
112 |
+
| MoverScore | 58.81 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
113 |
+
| QAAlignedF1Score (BERTScore) | 74.23 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
114 |
+
| QAAlignedF1Score (MoverScore) | 75.06 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
115 |
+
| QAAlignedPrecision (BERTScore) | 74.29 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
116 |
+
| QAAlignedPrecision (MoverScore) | 75.14 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
117 |
+
| QAAlignedRecall (BERTScore) | 74.2 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
118 |
+
| QAAlignedRecall (MoverScore) | 75.04 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
119 |
+
| ROUGE_L | 8.06 | default | [lmqg/qag_koquad](https://huggingface.co/datasets/lmqg/qag_koquad) |
|
120 |
+
|
121 |
+
|
122 |
+
|
123 |
+
## Training hyperparameters
|
124 |
+
|
125 |
+
The following hyperparameters were used during fine-tuning:
|
126 |
+
- dataset_path: lmqg/qag_koquad
|
127 |
+
- dataset_name: default
|
128 |
+
- input_types: ['paragraph']
|
129 |
+
- output_types: ['questions_answers']
|
130 |
+
- prefix_types: None
|
131 |
+
- model: google/mt5-small
|
132 |
+
- max_length: 512
|
133 |
+
- max_length_output: 256
|
134 |
+
- epoch: 13
|
135 |
+
- batch: 8
|
136 |
+
- lr: 0.0005
|
137 |
+
- fp16: False
|
138 |
+
- random_seed: 1
|
139 |
+
- gradient_accumulation_steps: 16
|
140 |
+
- label_smoothing: 0.0
|
141 |
+
|
142 |
+
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-koquad-qag/raw/main/trainer_config.json).
|
143 |
+
|
144 |
+
## Citation
|
145 |
+
```
|
146 |
+
@inproceedings{ushio-etal-2022-generative,
|
147 |
+
title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
|
148 |
+
author = "Ushio, Asahi and
|
149 |
+
Alva-Manchego, Fernando and
|
150 |
+
Camacho-Collados, Jose",
|
151 |
+
booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
|
152 |
+
month = dec,
|
153 |
+
year = "2022",
|
154 |
+
address = "Abu Dhabi, U.A.E.",
|
155 |
+
publisher = "Association for Computational Linguistics",
|
156 |
+
}
|
157 |
+
|
158 |
+
```
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "lmqg_output/mt5-small-koquad-qag/
|
3 |
"add_prefix": false,
|
4 |
"architectures": [
|
5 |
"MT5ForConditionalGeneration"
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "lmqg_output/mt5-small-koquad-qag/model_mzgdpa/epoch_5",
|
3 |
"add_prefix": false,
|
4 |
"architectures": [
|
5 |
"MT5ForConditionalGeneration"
|
eval/metric.first.answer.paragraph.questions_answers.lmqg_qag_koquad.default.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"validation": {"Bleu_1": 0.20720502657508894, "Bleu_2": 0.12973359463297998, "Bleu_3": 0.07736389639682253, "Bleu_4": 0.05002422519479112, "METEOR": 0.20084513698908732, "ROUGE_L": 0.2328243351207967, "BERTScore": 0.7121946530416607, "MoverScore": 0.6559541024331569, "QAAlignedF1Score (BERTScore)": 0.7675924272601385, "QAAlignedRecall (BERTScore)": 0.745755535757304, "QAAlignedPrecision (BERTScore)": 0.7914428979179097, "QAAlignedF1Score (MoverScore)": 0.790290732358258, "QAAlignedRecall (MoverScore)": 0.7572321940950104, "QAAlignedPrecision (MoverScore)": 0.8282231121807863}, "test": {"Bleu_1": 0.040932977657776856, "Bleu_2": 0.020861251455809058, "Bleu_3": 0.011692083309161437, "Bleu_4": 0.007073299521744108, "METEOR": 0.129459498216136, "ROUGE_L": 0.0806453671612055, "BERTScore": 0.5839372786489063, "MoverScore": 0.5881119031553251, "QAAlignedF1Score (BERTScore)": 0.7423411454198516, "QAAlignedRecall (BERTScore)": 0.7420430708538479, "QAAlignedPrecision (BERTScore)": 0.742871617137688, "QAAlignedF1Score (MoverScore)": 0.7505986412090764, "QAAlignedRecall (MoverScore)": 0.750358323011417, "QAAlignedPrecision (MoverScore)": 0.7514380757963297}}
|
eval/samples.test.hyp.paragraph.questions_answers.lmqg_qag_koquad.default.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
eval/samples.validation.hyp.paragraph.questions_answers.lmqg_qag_koquad.default.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:18c530da5a59d5cb6b570b00e52ac5d6752462cbf0b50ba17afb3843c82f3028
|
3 |
+
size 1200727429
|
tokenizer_config.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
"additional_special_tokens": null,
|
3 |
"eos_token": "</s>",
|
4 |
"extra_ids": 0,
|
5 |
-
"name_or_path": "lmqg_output/mt5-small-koquad-qag/
|
6 |
"pad_token": "<pad>",
|
7 |
"sp_model_kwargs": {},
|
8 |
"special_tokens_map_file": "/home/c.c2042013/.cache/huggingface/transformers/685ac0ca8568ec593a48b61b0a3c272beee9bc194a3c7241d15dcadb5f875e53.f76030f3ec1b96a8199b2593390c610e76ca8028ef3d24680000619ffb646276",
|
|
|
2 |
"additional_special_tokens": null,
|
3 |
"eos_token": "</s>",
|
4 |
"extra_ids": 0,
|
5 |
+
"name_or_path": "lmqg_output/mt5-small-koquad-qag/model_mzgdpa/epoch_5",
|
6 |
"pad_token": "<pad>",
|
7 |
"sp_model_kwargs": {},
|
8 |
"special_tokens_map_file": "/home/c.c2042013/.cache/huggingface/transformers/685ac0ca8568ec593a48b61b0a3c272beee9bc194a3c7241d15dcadb5f875e53.f76030f3ec1b96a8199b2593390c610e76ca8028ef3d24680000619ffb646276",
|
trainer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"dataset_path": "lmqg/qag_koquad", "dataset_name": "default", "input_types": ["paragraph"], "output_types": ["questions_answers"], "prefix_types": null, "model": "google/mt5-small", "max_length": 512, "max_length_output": 256, "epoch": 13, "batch": 8, "lr": 0.0005, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 16, "label_smoothing": 0.0}
|