asahi417 commited on
Commit
47bd95d
1 Parent(s): 04dd32a

commit files to HF hub

Browse files
README.md ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ license: cc-by-4.0
4
+ metrics:
5
+ - bleu4
6
+ - meteor
7
+ - rouge-l
8
+ - bertscore
9
+ - moverscore
10
+ language: ru
11
+ datasets:
12
+ - lmqg/qg_ruquad
13
+ pipeline_tag: text2text-generation
14
+ tags:
15
+ - question generation
16
+ widget:
17
+ - text: "Нелишним будет отметить, что, развивая это направление, Д. И. Менделеев, поначалу априорно выдвинув идею о температуре, при которой высота мениска будет нулевой, <hl> в мае 1860 года <hl> провёл серию опытов."
18
+ example_title: "Question Generation Example 1"
19
+ - text: "Однако, франкоязычный <hl> Квебек <hl> практически никогда не включается в состав Латинской Америки."
20
+ example_title: "Question Generation Example 2"
21
+ - text: "Классическим примером международного синдиката XX века была группа компаний <hl> Де Бирс <hl> , которая в 1980-е годы контролировала до 90 % мировой торговли алмазами."
22
+ example_title: "Question Generation Example 3"
23
+ model-index:
24
+ - name: vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qg
25
+ results:
26
+ - task:
27
+ name: Text2text Generation
28
+ type: text2text-generation
29
+ dataset:
30
+ name: lmqg/qg_ruquad
31
+ type: default
32
+ args: default
33
+ metrics:
34
+ - name: BLEU4 (Question Generation)
35
+ type: bleu4_question_generation
36
+ value: 0.0
37
+ - name: ROUGE-L (Question Generation)
38
+ type: rouge_l_question_generation
39
+ value: 2.7
40
+ - name: METEOR (Question Generation)
41
+ type: meteor_question_generation
42
+ value: 2.63
43
+ - name: BERTScore (Question Generation)
44
+ type: bertscore_question_generation
45
+ value: 55.18
46
+ - name: MoverScore (Question Generation)
47
+ type: moverscore_question_generation
48
+ value: 46.92
49
+ ---
50
+
51
+ # Model Card of `vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qg`
52
+ This model is fine-tuned version of [vocabtrimmer/mt5-small-trimmed-ru-60000](https://huggingface.co/vocabtrimmer/mt5-small-trimmed-ru-60000) for question generation task on the [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
53
+
54
+
55
+ ### Overview
56
+ - **Language model:** [vocabtrimmer/mt5-small-trimmed-ru-60000](https://huggingface.co/vocabtrimmer/mt5-small-trimmed-ru-60000)
57
+ - **Language:** ru
58
+ - **Training data:** [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) (default)
59
+ - **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
60
+ - **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
61
+ - **Paper:** [https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)
62
+
63
+ ### Usage
64
+ - With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
65
+ ```python
66
+ from lmqg import TransformersQG
67
+
68
+ # initialize model
69
+ model = TransformersQG(language="ru", model="vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qg")
70
+
71
+ # model prediction
72
+ questions = model.generate_q(list_context="Нелишним будет отметить, что, развивая это направление, Д. И. Менделеев, поначалу априорно выдвинув идею о температуре, при которой высота мениска будет нулевой, в мае 1860 года провёл серию опытов.", list_answer="в мае 1860 года")
73
+
74
+ ```
75
+
76
+ - With `transformers`
77
+ ```python
78
+ from transformers import pipeline
79
+
80
+ pipe = pipeline("text2text-generation", "vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qg")
81
+ output = pipe("Нелишним будет отметить, что, развивая это направление, Д. И. Менделеев, поначалу априорно выдвинув идею о температуре, при которой высота мениска будет нулевой, <hl> в мае 1860 года <hl> провёл серию опытов.")
82
+
83
+ ```
84
+
85
+ ## Evaluation
86
+
87
+
88
+ - ***Metric (Question Generation)***: [raw metric file](https://huggingface.co/vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qg/raw/main/eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_ruquad.default.json)
89
+
90
+ | | Score | Type | Dataset |
91
+ |:-----------|--------:|:--------|:-----------------------------------------------------------------|
92
+ | BERTScore | 55.18 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
93
+ | Bleu_1 | 2.83 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
94
+ | Bleu_2 | 0.24 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
95
+ | Bleu_3 | 0 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
96
+ | Bleu_4 | 0 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
97
+ | METEOR | 2.63 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
98
+ | MoverScore | 46.92 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
99
+ | ROUGE_L | 2.7 | default | [lmqg/qg_ruquad](https://huggingface.co/datasets/lmqg/qg_ruquad) |
100
+
101
+
102
+
103
+ ## Training hyperparameters
104
+
105
+ The following hyperparameters were used during fine-tuning:
106
+ - dataset_path: lmqg/qg_ruquad
107
+ - dataset_name: default
108
+ - input_types: paragraph_answer
109
+ - output_types: question
110
+ - prefix_types: None
111
+ - model: vocabtrimmer/mt5-small-trimmed-ru-60000
112
+ - max_length: 512
113
+ - max_length_output: 32
114
+ - epoch: 15
115
+ - batch: 16
116
+ - lr: 0.001
117
+ - fp16: False
118
+ - random_seed: 1
119
+ - gradient_accumulation_steps: 4
120
+ - label_smoothing: 0.15
121
+
122
+ The full configuration can be found at [fine-tuning config file](https://huggingface.co/vocabtrimmer/mt5-small-trimmed-ru-60000-ruquad-qg/raw/main/trainer_config.json).
123
+
124
+ ## Citation
125
+ ```
126
+ @inproceedings{ushio-etal-2022-generative,
127
+ title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
128
+ author = "Ushio, Asahi and
129
+ Alva-Manchego, Fernando and
130
+ Camacho-Collados, Jose",
131
+ booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
132
+ month = dec,
133
+ year = "2022",
134
+ address = "Abu Dhabi, U.A.E.",
135
+ publisher = "Association for Computational Linguistics",
136
+ }
137
+
138
+ ```
eval/metric.first.answer.paragraph_answer.question.lmqg_qg_ruquad.default.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"validation": {"Bleu_1": 0.027557932263814127, "Bleu_2": 0.0027487162902328447, "Bleu_3": 5.475358703077925e-09, "Bleu_4": 7.954656170113785e-12}, "test": {"Bleu_1": 0.02817624765345468, "Bleu_2": 0.002340632956960454, "Bleu_3": 4.906083525994567e-09, "Bleu_4": 7.309588795172406e-12}}
eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_ruquad.default.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"validation": {"Bleu_1": 0.027656952298100123, "Bleu_2": 0.002776886272190007, "Bleu_3": 5.544118885310694e-09, "Bleu_4": 8.064356058532987e-12, "METEOR": 0.026114412425185165, "ROUGE_L": 0.0268238493996731, "BERTScore": 0.552118055010524, "MoverScore": 0.4692170396594667}, "test": {"Bleu_1": 0.028323574841049817, "Bleu_2": 0.0023632756596974522, "Bleu_3": 4.960805698363e-09, "Bleu_4": 7.396491058460421e-12, "METEOR": 0.0263261088204675, "ROUGE_L": 0.026992587962960068, "BERTScore": 0.5518454402655153, "MoverScore": 0.4691894897887193}}
eval/samples.test.hyp.paragraph_answer.question.lmqg_qg_ruquad.default.txt ADDED
The diff for this file is too large to render. See raw diff
 
eval/samples.validation.hyp.paragraph_answer.question.lmqg_qg_ruquad.default.txt ADDED
The diff for this file is too large to render. See raw diff