asahi417 commited on
Commit
e38e009
1 Parent(s): 2f4a8e3

commit files to HF hub

Browse files
README.md ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ ---
3
+ license: cc-by-4.0
4
+ metrics:
5
+ - bleu4
6
+ - meteor
7
+ - rouge-l
8
+ - bertscore
9
+ - moverscore
10
+ language: it
11
+ datasets:
12
+ - lmqg/qg_itquad
13
+ pipeline_tag: text2text-generation
14
+ tags:
15
+ - question answering
16
+ widget:
17
+ - text: "question: Quale batterio ha il nome del paese che colpisce di più nel suo nome?, context: Il complesso M. tubercolosi (MTBC) comprende altri quattro micobatteri causa di tubercolosi: M. bovis, M. africanum, M. canetti e M. microti. M. africanum non è molto diffuso, ma è una causa significativa di tubercolosi in alcune parti dell' Africa. M. bovis era una volta una causa comune della tubercolosi, ma l' introduzione del latte pastorizzato ha quasi completamente eliminato questo problema di salute pubblica nei paesi sviluppati. M. canetti è raro e sembra essere limitato al Corno d' Africa, anche se alcuni casi sono stati osservati negli emigranti africani. M. microti è anche raro ed è visto quasi solo in persone immunodeficienti, anche se la sua prevalenza può essere significativamente sottovalutata."
18
+ example_title: "Question Answering Example 1"
19
+ model-index:
20
+ - name: vocabtrimmer/mt5-small-trimmed-it-10000-itquad-qa
21
+ results:
22
+ - task:
23
+ name: Text2text Generation
24
+ type: text2text-generation
25
+ dataset:
26
+ name: lmqg/qg_itquad
27
+ type: default
28
+ args: default
29
+ metrics:
30
+ - name: BLEU4 (Question Answering)
31
+ type: bleu4_question_answering
32
+ value: 13.38
33
+ - name: ROUGE-L (Question Answering)
34
+ type: rouge_l_question_answering
35
+ value: 35.34
36
+ - name: METEOR (Question Answering)
37
+ type: meteor_question_answering
38
+ value: 32.02
39
+ - name: BERTScore (Question Answering)
40
+ type: bertscore_question_answering
41
+ value: 91.96
42
+ - name: MoverScore (Question Answering)
43
+ type: moverscore_question_answering
44
+ value: 78.62
45
+ - name: AnswerF1Score (Question Answering)
46
+ type: answer_f1_score__question_answering
47
+ value: 61.45
48
+ - name: AnswerExactMatch (Question Answering)
49
+ type: answer_exact_match_question_answering
50
+ value: 46.8
51
+ ---
52
+
53
+ # Model Card of `vocabtrimmer/mt5-small-trimmed-it-10000-itquad-qa`
54
+ This model is fine-tuned version of [vocabtrimmer/mt5-small-trimmed-it-10000](https://huggingface.co/vocabtrimmer/mt5-small-trimmed-it-10000) for question answering task on the [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
55
+
56
+
57
+ ### Overview
58
+ - **Language model:** [vocabtrimmer/mt5-small-trimmed-it-10000](https://huggingface.co/vocabtrimmer/mt5-small-trimmed-it-10000)
59
+ - **Language:** it
60
+ - **Training data:** [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) (default)
61
+ - **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
62
+ - **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
63
+ - **Paper:** [https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)
64
+
65
+ ### Usage
66
+ - With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
67
+ ```python
68
+ from lmqg import TransformersQG
69
+
70
+ # initialize model
71
+ model = TransformersQG(language="it", model="vocabtrimmer/mt5-small-trimmed-it-10000-itquad-qa")
72
+
73
+ # model prediction
74
+ answers = model.answer_q(list_question="Quale batterio ha il nome del paese che colpisce di più nel suo nome?", list_context=" Il complesso M. tubercolosi (MTBC) comprende altri quattro micobatteri causa di tubercolosi: M. bovis, M. africanum, M. canetti e M. microti. M. africanum non è molto diffuso, ma è una causa significativa di tubercolosi in alcune parti dell' Africa. M. bovis era una volta una causa comune della tubercolosi, ma l' introduzione del latte pastorizzato ha quasi completamente eliminato questo problema di salute pubblica nei paesi sviluppati. M. canetti è raro e sembra essere limitato al Corno d' Africa, anche se alcuni casi sono stati osservati negli emigranti africani. M. microti è anche raro ed è visto quasi solo in persone immunodeficienti, anche se la sua prevalenza può essere significativamente sottovalutata.")
75
+
76
+ ```
77
+
78
+ - With `transformers`
79
+ ```python
80
+ from transformers import pipeline
81
+
82
+ pipe = pipeline("text2text-generation", "vocabtrimmer/mt5-small-trimmed-it-10000-itquad-qa")
83
+ output = pipe("question: Quale batterio ha il nome del paese che colpisce di più nel suo nome?, context: Il complesso M. tubercolosi (MTBC) comprende altri quattro micobatteri causa di tubercolosi: M. bovis, M. africanum, M. canetti e M. microti. M. africanum non è molto diffuso, ma è una causa significativa di tubercolosi in alcune parti dell' Africa. M. bovis era una volta una causa comune della tubercolosi, ma l' introduzione del latte pastorizzato ha quasi completamente eliminato questo problema di salute pubblica nei paesi sviluppati. M. canetti è raro e sembra essere limitato al Corno d' Africa, anche se alcuni casi sono stati osservati negli emigranti africani. M. microti è anche raro ed è visto quasi solo in persone immunodeficienti, anche se la sua prevalenza può essere significativamente sottovalutata.")
84
+
85
+ ```
86
+
87
+ ## Evaluation
88
+
89
+
90
+ - ***Metric (Question Answering)***: [raw metric file](https://huggingface.co/vocabtrimmer/mt5-small-trimmed-it-10000-itquad-qa/raw/main/eval/metric.first.answer.paragraph_question.answer.lmqg_qg_itquad.default.json)
91
+
92
+ | | Score | Type | Dataset |
93
+ |:-----------------|--------:|:--------|:-----------------------------------------------------------------|
94
+ | AnswerExactMatch | 46.8 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
95
+ | AnswerF1Score | 61.45 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
96
+ | BERTScore | 91.96 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
97
+ | Bleu_1 | 25.43 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
98
+ | Bleu_2 | 19.97 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
99
+ | Bleu_3 | 16.35 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
100
+ | Bleu_4 | 13.38 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
101
+ | METEOR | 32.02 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
102
+ | MoverScore | 78.62 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
103
+ | ROUGE_L | 35.34 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
104
+
105
+
106
+
107
+ ## Training hyperparameters
108
+
109
+ The following hyperparameters were used during fine-tuning:
110
+ - dataset_path: lmqg/qg_itquad
111
+ - dataset_name: default
112
+ - input_types: ['paragraph_question']
113
+ - output_types: ['answer']
114
+ - prefix_types: None
115
+ - model: vocabtrimmer/mt5-small-trimmed-it-10000
116
+ - max_length: 512
117
+ - max_length_output: 32
118
+ - epoch: 15
119
+ - batch: 32
120
+ - lr: 0.0005
121
+ - fp16: False
122
+ - random_seed: 1
123
+ - gradient_accumulation_steps: 2
124
+ - label_smoothing: 0.15
125
+
126
+ The full configuration can be found at [fine-tuning config file](https://huggingface.co/vocabtrimmer/mt5-small-trimmed-it-10000-itquad-qa/raw/main/trainer_config.json).
127
+
128
+ ## Citation
129
+ ```
130
+ @inproceedings{ushio-etal-2022-generative,
131
+ title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
132
+ author = "Ushio, Asahi and
133
+ Alva-Manchego, Fernando and
134
+ Camacho-Collados, Jose",
135
+ booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
136
+ month = dec,
137
+ year = "2022",
138
+ address = "Abu Dhabi, U.A.E.",
139
+ publisher = "Association for Computational Linguistics",
140
+ }
141
+
142
+ ```
eval/metric.first.answer.paragraph_question.answer.lmqg_qg_itquad.default.json ADDED
@@ -0,0 +1 @@
 
1
+ {"validation": {"Bleu_1": 0.2607245543415656, "Bleu_2": 0.20326964387861937, "Bleu_3": 0.16534111354004846, "Bleu_4": 0.13354392676819124, "METEOR": 0.3400859259227173, "ROUGE_L": 0.3530582318957219, "BERTScore": 0.930419608271064, "MoverScore": 0.812546801139855, "AnswerF1Score": 65.44802488667791, "AnswerExactMatch": 52.713891444342224}, "test": {"Bleu_1": 0.25430431966178263, "Bleu_2": 0.19965745092437287, "Bleu_3": 0.16354406152154402, "Bleu_4": 0.13381625492092308, "METEOR": 0.3202429040863493, "ROUGE_L": 0.35339171335489605, "BERTScore": 0.9195870688638701, "MoverScore": 0.7862035918950931, "AnswerF1Score": 61.45115361953939, "AnswerExactMatch": 46.7998422920226}}
eval/samples.test.hyp.paragraph_question.answer.lmqg_qg_itquad.default.txt ADDED
The diff for this file is too large to render. See raw diff
eval/samples.validation.hyp.paragraph_question.answer.lmqg_qg_itquad.default.txt ADDED
The diff for this file is too large to render. See raw diff