asahi417 commited on
Commit
ce447da
1 Parent(s): af41199

model update

Browse files
Files changed (26) hide show
  1. README.md +111 -0
  2. eval/{metric.first.answer.paragraph_answer.question.asahi417_qg_koquad.default.json → metric.first.answer.paragraph_answer.question.lmqg_qg_koquad.default.json} +0 -0
  3. eval/{metric.first.answer.paragraph_sentence.question.asahi417_qg_koquad.default.json → metric.first.answer.paragraph_sentence.question.lmqg_qg_koquad.default.json} +0 -0
  4. eval/{metric.first.answer.sentence_answer.question.asahi417_qg_koquad.default.json → metric.first.answer.sentence_answer.question.lmqg_qg_koquad.default.json} +0 -0
  5. eval/{metric.first.sentence.paragraph_answer.question.asahi417_qg_koquad.default.json → metric.first.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json} +0 -0
  6. eval/{metric.first.sentence.paragraph_sentence.question.asahi417_qg_koquad.default.json → metric.first.sentence.paragraph_sentence.question.lmqg_qg_koquad.default.json} +0 -0
  7. eval/{metric.first.sentence.sentence_answer.question.asahi417_qg_koquad.default.json → metric.first.sentence.sentence_answer.question.lmqg_qg_koquad.default.json} +0 -0
  8. eval/{metric.last.sentence.paragraph_answer.question.asahi417_qg_koquad.default.json → metric.last.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json} +0 -0
  9. eval/{metric.last.sentence.paragraph_sentence.question.asahi417_qg_koquad.default.json → metric.last.sentence.paragraph_sentence.question.lmqg_qg_koquad.default.json} +0 -0
  10. eval/{metric.last.sentence.sentence_answer.question.asahi417_qg_koquad.default.json → metric.last.sentence.sentence_answer.question.lmqg_qg_koquad.default.json} +0 -0
  11. eval/{metric.long.sentence.paragraph_answer.question.asahi417_qg_koquad.default.json → metric.long.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json} +0 -0
  12. eval/{metric.long.sentence.paragraph_sentence.question.asahi417_qg_koquad.default.json → metric.long.sentence.paragraph_sentence.question.lmqg_qg_koquad.default.json} +0 -0
  13. eval/{metric.long.sentence.sentence_answer.question.asahi417_qg_koquad.default.json → metric.long.sentence.sentence_answer.question.lmqg_qg_koquad.default.json} +0 -0
  14. eval/{metric.middle.sentence.paragraph_answer.question.asahi417_qg_koquad.default.json → metric.middle.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json} +0 -0
  15. eval/{metric.middle.sentence.paragraph_sentence.question.asahi417_qg_koquad.default.json → metric.middle.sentence.paragraph_sentence.question.lmqg_qg_koquad.default.json} +0 -0
  16. eval/{metric.middle.sentence.sentence_answer.question.asahi417_qg_koquad.default.json → metric.middle.sentence.sentence_answer.question.lmqg_qg_koquad.default.json} +0 -0
  17. eval/{metric.short.sentence.paragraph_answer.question.asahi417_qg_koquad.default.json → metric.short.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json} +0 -0
  18. eval/{metric.short.sentence.paragraph_sentence.question.asahi417_qg_koquad.default.json → metric.short.sentence.paragraph_sentence.question.lmqg_qg_koquad.default.json} +0 -0
  19. eval/{metric.short.sentence.sentence_answer.question.asahi417_qg_koquad.default.json → metric.short.sentence.sentence_answer.question.lmqg_qg_koquad.default.json} +0 -0
  20. eval/{samples.test.hyp.paragraph_answer.question.asahi417_qg_koquad.default.txt → samples.test.hyp.paragraph_answer.question.lmqg_qg_koquad.default.txt} +0 -0
  21. eval/{samples.test.hyp.paragraph_sentence.question.asahi417_qg_koquad.default.txt → samples.test.hyp.paragraph_sentence.question.lmqg_qg_koquad.default.txt} +0 -0
  22. eval/{samples.test.hyp.sentence_answer.question.asahi417_qg_koquad.default.txt → samples.test.hyp.sentence_answer.question.lmqg_qg_koquad.default.txt} +0 -0
  23. eval/{samples.validation.hyp.paragraph_answer.question.asahi417_qg_koquad.default.txt → samples.validation.hyp.paragraph_answer.question.lmqg_qg_koquad.default.txt} +0 -0
  24. eval/{samples.validation.hyp.paragraph_sentence.question.asahi417_qg_koquad.default.txt → samples.validation.hyp.paragraph_sentence.question.lmqg_qg_koquad.default.txt} +0 -0
  25. eval/{samples.validation.hyp.sentence_answer.question.asahi417_qg_koquad.default.txt → samples.validation.hyp.sentence_answer.question.lmqg_qg_koquad.default.txt} +0 -0
  26. trainer_config.json +1 -1
README.md ADDED
@@ -0,0 +1,111 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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/qg_koquad
13
+ pipeline_tag: text2text-generation
14
+ tags:
15
+ - question generation
16
+ widget:
17
+ - text: "generate question: 1990년 영화 《 <hl> 남부군 <hl> 》에서 단역으로 영화배우 첫 데뷔에 이어 같은 해 KBS 드라마 《지구인》에서 단역으로 출연하였고 이듬해 MBC 《여명의 눈동자》를 통해 단역으로 출연하였다."
18
+ example_title: "Question Generation Example 1"
19
+ - text: "generate question: 백신이 없기때문에 예방책은 <hl> 살충제 <hl> 를 사용하면서 서식 장소(찻찬 받침, 배수로, 고인 물의 열린 저장소, 버려진 타이어 등)의 수를 줄임으로써 매개체를 통제할 수 있다."
20
+ example_title: "Question Generation Example 2"
21
+ - text: "generate question: <hl> 원테이크 촬영 <hl> 이기 때문에 한 사람이 실수를 하면 처음부터 다시 찍어야 하는 상황이 발생한다."
22
+ example_title: "Question Generation Example 3"
23
+ model-index:
24
+ - name: lmqg/mt5-small-koquad
25
+ results:
26
+ - task:
27
+ name: Text2text Generation
28
+ type: text2text-generation
29
+ dataset:
30
+ name: lmqg/qg_koquad
31
+ type: default
32
+ args: default
33
+ metrics:
34
+ - name: BLEU4
35
+ type: bleu4
36
+ value: 0.10570915349557093
37
+ - name: ROUGE-L
38
+ type: rouge-l
39
+ value: 0.2564353531078813
40
+ - name: METEOR
41
+ type: meteor
42
+ value: 0.2752329744142515
43
+ - name: BERTScore
44
+ type: bertscore
45
+ value: 0.8288608218241639
46
+ - name: MoverScore
47
+ type: moverscore
48
+ value: 0.8249013345139385
49
+ ---
50
+
51
+ # Language Models Fine-tuning on Question Generation: `lmqg/mt5-small-koquad`
52
+ This model is fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) for question generation task on the
53
+ [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) (dataset_name: default).
54
+
55
+
56
+ ### Overview
57
+ - **Language model:** [google/mt5-small](https://huggingface.co/google/mt5-small)
58
+ - **Language:** ko
59
+ - **Training data:** [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) (default)
60
+ - **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
61
+ - **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
62
+ - **Paper:** [TBA](TBA)
63
+
64
+ ### Usage
65
+ ```python
66
+
67
+ from transformers import pipeline
68
+
69
+ model_path = 'lmqg/mt5-small-koquad'
70
+ pipe = pipeline("text2text-generation", model_path)
71
+
72
+ # Question Generation
73
+ input_text = 'generate question: 1990년 영화 《 <hl> 남부군 <hl> 》에서 단역으로 영화배우 첫 데뷔에 이어 같은 해 KBS 드라마 《지구인》에서 단역으로 출연하였고 이듬해 MBC 《여명의 눈동자》를 통해 단역으로 출연하였다.'
74
+ question = pipe(input_text)
75
+ ```
76
+
77
+ ## Evaluation Metrics
78
+
79
+
80
+ ### Metrics
81
+
82
+ | Dataset | Type | BLEU4 | ROUGE-L | METEOR | BERTScore | MoverScore | Link |
83
+ |:--------|:-----|------:|--------:|-------:|----------:|-----------:|-----:|
84
+ | [lmqg/qg_koquad](https://huggingface.co/datasets/lmqg/qg_koquad) | default | 0.10570915349557093 | 0.2564353531078813 | 0.2752329744142515 | 0.8288608218241639 | 0.8249013345139385 | [link](https://huggingface.co/lmqg/mt5-small-koquad/raw/main/eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json) |
85
+
86
+
87
+
88
+
89
+ ## Training hyperparameters
90
+
91
+ The following hyperparameters were used during fine-tuning:
92
+ - dataset_path: lmqg/qg_koquad
93
+ - dataset_name: default
94
+ - input_types: ['paragraph_answer']
95
+ - output_types: ['question']
96
+ - prefix_types: None
97
+ - model: google/mt5-small
98
+ - max_length: 512
99
+ - max_length_output: 32
100
+ - epoch: 7
101
+ - batch: 16
102
+ - lr: 0.001
103
+ - fp16: False
104
+ - random_seed: 1
105
+ - gradient_accumulation_steps: 4
106
+ - label_smoothing: 0.15
107
+
108
+ The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-koquad/raw/main/trainer_config.json).
109
+
110
+ ## Citation
111
+ TBA
eval/{metric.first.answer.paragraph_answer.question.asahi417_qg_koquad.default.json → metric.first.answer.paragraph_answer.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.first.answer.paragraph_sentence.question.asahi417_qg_koquad.default.json → metric.first.answer.paragraph_sentence.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.first.answer.sentence_answer.question.asahi417_qg_koquad.default.json → metric.first.answer.sentence_answer.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.first.sentence.paragraph_answer.question.asahi417_qg_koquad.default.json → metric.first.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.first.sentence.paragraph_sentence.question.asahi417_qg_koquad.default.json → metric.first.sentence.paragraph_sentence.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.first.sentence.sentence_answer.question.asahi417_qg_koquad.default.json → metric.first.sentence.sentence_answer.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.last.sentence.paragraph_answer.question.asahi417_qg_koquad.default.json → metric.last.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.last.sentence.paragraph_sentence.question.asahi417_qg_koquad.default.json → metric.last.sentence.paragraph_sentence.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.last.sentence.sentence_answer.question.asahi417_qg_koquad.default.json → metric.last.sentence.sentence_answer.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.long.sentence.paragraph_answer.question.asahi417_qg_koquad.default.json → metric.long.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.long.sentence.paragraph_sentence.question.asahi417_qg_koquad.default.json → metric.long.sentence.paragraph_sentence.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.long.sentence.sentence_answer.question.asahi417_qg_koquad.default.json → metric.long.sentence.sentence_answer.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.middle.sentence.paragraph_answer.question.asahi417_qg_koquad.default.json → metric.middle.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.middle.sentence.paragraph_sentence.question.asahi417_qg_koquad.default.json → metric.middle.sentence.paragraph_sentence.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.middle.sentence.sentence_answer.question.asahi417_qg_koquad.default.json → metric.middle.sentence.sentence_answer.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.short.sentence.paragraph_answer.question.asahi417_qg_koquad.default.json → metric.short.sentence.paragraph_answer.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.short.sentence.paragraph_sentence.question.asahi417_qg_koquad.default.json → metric.short.sentence.paragraph_sentence.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{metric.short.sentence.sentence_answer.question.asahi417_qg_koquad.default.json → metric.short.sentence.sentence_answer.question.lmqg_qg_koquad.default.json} RENAMED
File without changes
eval/{samples.test.hyp.paragraph_answer.question.asahi417_qg_koquad.default.txt → samples.test.hyp.paragraph_answer.question.lmqg_qg_koquad.default.txt} RENAMED
File without changes
eval/{samples.test.hyp.paragraph_sentence.question.asahi417_qg_koquad.default.txt → samples.test.hyp.paragraph_sentence.question.lmqg_qg_koquad.default.txt} RENAMED
File without changes
eval/{samples.test.hyp.sentence_answer.question.asahi417_qg_koquad.default.txt → samples.test.hyp.sentence_answer.question.lmqg_qg_koquad.default.txt} RENAMED
File without changes
eval/{samples.validation.hyp.paragraph_answer.question.asahi417_qg_koquad.default.txt → samples.validation.hyp.paragraph_answer.question.lmqg_qg_koquad.default.txt} RENAMED
File without changes
eval/{samples.validation.hyp.paragraph_sentence.question.asahi417_qg_koquad.default.txt → samples.validation.hyp.paragraph_sentence.question.lmqg_qg_koquad.default.txt} RENAMED
File without changes
eval/{samples.validation.hyp.sentence_answer.question.asahi417_qg_koquad.default.txt → samples.validation.hyp.sentence_answer.question.lmqg_qg_koquad.default.txt} RENAMED
File without changes
trainer_config.json CHANGED
@@ -1 +1 @@
1
- {"dataset_path": "asahi417/qg_koquad", "dataset_name": "default", "input_types": ["paragraph_answer"], "output_types": ["question"], "prefix_types": null, "model": "google/mt5-small", "max_length": 512, "max_length_output": 32, "epoch": 7, "batch": 16, "lr": 0.001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 4, "label_smoothing": 0.15}
 
1
+ {"dataset_path": "lmqg/qg_koquad", "dataset_name": "default", "input_types": ["paragraph_answer"], "output_types": ["question"], "prefix_types": null, "model": "google/mt5-small", "max_length": 512, "max_length_output": 32, "epoch": 7, "batch": 16, "lr": 0.001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 4, "label_smoothing": 0.15}