model update
Browse files- README.md +117 -0
- eval/{metric.first.answer.paragraph_answer.question.asahi417_qg_esquad.default.json → metric.first.answer.paragraph_answer.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.first.answer.paragraph_sentence.question.asahi417_qg_esquad.default.json → metric.first.answer.paragraph_sentence.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.first.answer.sentence_answer.question.asahi417_qg_esquad.default.json → metric.first.answer.sentence_answer.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.first.sentence.paragraph_answer.question.asahi417_qg_esquad.default.json → metric.first.sentence.paragraph_answer.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.first.sentence.paragraph_sentence.question.asahi417_qg_esquad.default.json → metric.first.sentence.paragraph_sentence.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.first.sentence.sentence_answer.question.asahi417_qg_esquad.default.json → metric.first.sentence.sentence_answer.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.last.sentence.paragraph_answer.question.asahi417_qg_esquad.default.json → metric.last.sentence.paragraph_answer.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.last.sentence.paragraph_sentence.question.asahi417_qg_esquad.default.json → metric.last.sentence.paragraph_sentence.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.last.sentence.sentence_answer.question.asahi417_qg_esquad.default.json → metric.last.sentence.sentence_answer.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.long.sentence.paragraph_answer.question.asahi417_qg_esquad.default.json → metric.long.sentence.paragraph_answer.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.long.sentence.paragraph_sentence.question.asahi417_qg_esquad.default.json → metric.long.sentence.paragraph_sentence.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.long.sentence.sentence_answer.question.asahi417_qg_esquad.default.json → metric.long.sentence.sentence_answer.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.middle.sentence.paragraph_answer.question.asahi417_qg_esquad.default.json → metric.middle.sentence.paragraph_answer.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.middle.sentence.paragraph_sentence.question.asahi417_qg_esquad.default.json → metric.middle.sentence.paragraph_sentence.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.middle.sentence.sentence_answer.question.asahi417_qg_esquad.default.json → metric.middle.sentence.sentence_answer.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.short.sentence.paragraph_answer.question.asahi417_qg_esquad.default.json → metric.short.sentence.paragraph_answer.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.short.sentence.paragraph_sentence.question.asahi417_qg_esquad.default.json → metric.short.sentence.paragraph_sentence.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{metric.short.sentence.sentence_answer.question.asahi417_qg_esquad.default.json → metric.short.sentence.sentence_answer.question.lmqg_qg_esquad.default.json} +0 -0
- eval/{samples.test.hyp.paragraph_answer.question.asahi417_qg_esquad.default.txt → samples.test.hyp.paragraph_answer.question.lmqg_qg_esquad.default.txt} +0 -0
- eval/{samples.test.hyp.paragraph_sentence.question.asahi417_qg_esquad.default.txt → samples.test.hyp.paragraph_sentence.question.lmqg_qg_esquad.default.txt} +0 -0
- eval/{samples.test.hyp.sentence_answer.question.asahi417_qg_esquad.default.txt → samples.test.hyp.sentence_answer.question.lmqg_qg_esquad.default.txt} +0 -0
- eval/{samples.validation.hyp.paragraph_answer.question.asahi417_qg_esquad.default.txt → samples.validation.hyp.paragraph_answer.question.lmqg_qg_esquad.default.txt} +0 -0
- eval/{samples.validation.hyp.paragraph_sentence.question.asahi417_qg_esquad.default.txt → samples.validation.hyp.paragraph_sentence.question.lmqg_qg_esquad.default.txt} +0 -0
- eval/{samples.validation.hyp.sentence_answer.question.asahi417_qg_esquad.default.txt → samples.validation.hyp.sentence_answer.question.lmqg_qg_esquad.default.txt} +0 -0
- trainer_config.json +1 -1
README.md
ADDED
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
license: cc-by-4.0
|
4 |
+
metrics:
|
5 |
+
- bleu4
|
6 |
+
- meteor
|
7 |
+
- rouge-l
|
8 |
+
- bertscore
|
9 |
+
- moverscore
|
10 |
+
language: es
|
11 |
+
datasets:
|
12 |
+
- lmqg/qg_esquad
|
13 |
+
pipeline_tag: text2text-generation
|
14 |
+
tags:
|
15 |
+
- question generation
|
16 |
+
- answer extraction
|
17 |
+
widget:
|
18 |
+
- text: "generate question: del <hl> Ministerio de Desarrollo Urbano <hl> , Gobierno de la India."
|
19 |
+
example_title: "Question Generation Example 1"
|
20 |
+
- text: "generate question: a <hl> noviembre <hl> , que es también la estación lluviosa."
|
21 |
+
example_title: "Question Generation Example 2"
|
22 |
+
- text: "generate question: como <hl> el gobierno de Abbott <hl> que asumió el cargo el 18 de septiembre de 2013."
|
23 |
+
example_title: "Question Generation Example 3"
|
24 |
+
- text: "<hl> En la diáspora somalí, múltiples eventos islámicos de recaudación de fondos se llevan a cabo cada año en ciudades como Birmingham, Londres, Toronto y Minneapolis, donde los académicos y profesionales somalíes dan conferencias y responden preguntas de la audiencia. <hl> El propósito de estos eventos es recaudar dinero para nuevas escuelas o universidades en Somalia, para ayudar a los somalíes que han sufrido como consecuencia de inundaciones y / o sequías, o para reunir fondos para la creación de nuevas mezquitas como."
|
25 |
+
example_title: "Answer Extraction Example 1"
|
26 |
+
- text: "<hl> Los estudiosos y los histori a dores están divididos en cuanto a qué evento señala el final de la era helenística. <hl> El período helenístico se puede ver que termina con la conquista final del corazón griego por Roma en 146 a. C. tras la guerra aquea, con la derrota final del reino ptolemaico en la batalla de Actium en 31 a. Helenístico se distingue de helénico en que el primero abarca toda la esfera de influencia griega antigua directa, mientras que el segundo se refiere a la propia Grecia."
|
27 |
+
example_title: "Answer Extraction Example 2"
|
28 |
+
model-index:
|
29 |
+
- name: lmqg/mt5-small-esquad-multitask
|
30 |
+
results:
|
31 |
+
- task:
|
32 |
+
name: Text2text Generation
|
33 |
+
type: text2text-generation
|
34 |
+
dataset:
|
35 |
+
name: lmqg/qg_esquad
|
36 |
+
type: default
|
37 |
+
args: default
|
38 |
+
metrics:
|
39 |
+
- name: BLEU4
|
40 |
+
type: bleu4
|
41 |
+
value: 0.08785998455701795
|
42 |
+
- name: ROUGE-L
|
43 |
+
type: rouge-l
|
44 |
+
value: 0.231305383218115
|
45 |
+
- name: METEOR
|
46 |
+
type: meteor
|
47 |
+
value: 0.21658762330370077
|
48 |
+
- name: BERTScore
|
49 |
+
type: bertscore
|
50 |
+
value: 0.8339217841152116
|
51 |
+
- name: MoverScore
|
52 |
+
type: moverscore
|
53 |
+
value: 0.583354319136371
|
54 |
+
---
|
55 |
+
|
56 |
+
# Language Models Fine-tuning on Question Generation: `lmqg/mt5-small-esquad-multitask`
|
57 |
+
This model is fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) for question generation task on the
|
58 |
+
[lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) (dataset_name: default).
|
59 |
+
This model is fine-tuned on the answer extraction task as well as the question generation.
|
60 |
+
|
61 |
+
### Overview
|
62 |
+
- **Language model:** [google/mt5-small](https://huggingface.co/google/mt5-small)
|
63 |
+
- **Language:** es
|
64 |
+
- **Training data:** [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) (default)
|
65 |
+
- **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
|
66 |
+
- **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
|
67 |
+
- **Paper:** [TBA](TBA)
|
68 |
+
|
69 |
+
### Usage
|
70 |
+
```python
|
71 |
+
|
72 |
+
from transformers import pipeline
|
73 |
+
|
74 |
+
model_path = 'lmqg/mt5-small-esquad-multitask'
|
75 |
+
pipe = pipeline("text2text-generation", model_path)
|
76 |
+
|
77 |
+
# Question Generation
|
78 |
+
question = pipe('generate question: del <hl> Ministerio de Desarrollo Urbano <hl> , Gobierno de la India.')
|
79 |
+
# Answer Extraction
|
80 |
+
answer = pipe('extract answers: <hl> En la diáspora somalí, múltiples eventos islámicos de recaudación de fondos se llevan a cabo cada año en ciudades como Birmingham, Londres, Toronto y Minneapolis, donde los académicos y profesionales somalíes dan conferencias y responden preguntas de la audiencia. <hl> El propósito de estos eventos es recaudar dinero para nuevas escuelas o universidades en Somalia, para ayudar a los somalíes que han sufrido como consecuencia de inundaciones y / o sequías, o para reunir fondos para la creación de nuevas mezquitas como.')
|
81 |
+
```
|
82 |
+
|
83 |
+
## Evaluation Metrics
|
84 |
+
|
85 |
+
|
86 |
+
### Metrics
|
87 |
+
|
88 |
+
| Dataset | Type | BLEU4 | ROUGE-L | METEOR | BERTScore | MoverScore | Link |
|
89 |
+
|:--------|:-----|------:|--------:|-------:|----------:|-----------:|-----:|
|
90 |
+
| [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) | default | 0.08785998455701795 | 0.231305383218115 | 0.21658762330370077 | 0.8339217841152116 | 0.583354319136371 | [link](https://huggingface.co/lmqg/mt5-small-esquad-multitask/raw/main/eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_esquad.default.json) |
|
91 |
+
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
## Training hyperparameters
|
96 |
+
|
97 |
+
The following hyperparameters were used during fine-tuning:
|
98 |
+
- dataset_path: lmqg/qg_esquad
|
99 |
+
- dataset_name: default
|
100 |
+
- input_types: ['paragraph_answer', 'paragraph_sentence']
|
101 |
+
- output_types: ['question', 'answer']
|
102 |
+
- prefix_types: ['qg', 'ae']
|
103 |
+
- model: google/mt5-small
|
104 |
+
- max_length: 512
|
105 |
+
- max_length_output: 32
|
106 |
+
- epoch: 5
|
107 |
+
- batch: 16
|
108 |
+
- lr: 0.001
|
109 |
+
- fp16: False
|
110 |
+
- random_seed: 1
|
111 |
+
- gradient_accumulation_steps: 4
|
112 |
+
- label_smoothing: 0.15
|
113 |
+
|
114 |
+
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-esquad-multitask/raw/main/trainer_config.json).
|
115 |
+
|
116 |
+
## Citation
|
117 |
+
TBA
|
eval/{metric.first.answer.paragraph_answer.question.asahi417_qg_esquad.default.json → metric.first.answer.paragraph_answer.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.first.answer.paragraph_sentence.question.asahi417_qg_esquad.default.json → metric.first.answer.paragraph_sentence.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.first.answer.sentence_answer.question.asahi417_qg_esquad.default.json → metric.first.answer.sentence_answer.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.first.sentence.paragraph_answer.question.asahi417_qg_esquad.default.json → metric.first.sentence.paragraph_answer.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.first.sentence.paragraph_sentence.question.asahi417_qg_esquad.default.json → metric.first.sentence.paragraph_sentence.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.first.sentence.sentence_answer.question.asahi417_qg_esquad.default.json → metric.first.sentence.sentence_answer.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.last.sentence.paragraph_answer.question.asahi417_qg_esquad.default.json → metric.last.sentence.paragraph_answer.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.last.sentence.paragraph_sentence.question.asahi417_qg_esquad.default.json → metric.last.sentence.paragraph_sentence.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.last.sentence.sentence_answer.question.asahi417_qg_esquad.default.json → metric.last.sentence.sentence_answer.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.long.sentence.paragraph_answer.question.asahi417_qg_esquad.default.json → metric.long.sentence.paragraph_answer.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.long.sentence.paragraph_sentence.question.asahi417_qg_esquad.default.json → metric.long.sentence.paragraph_sentence.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.long.sentence.sentence_answer.question.asahi417_qg_esquad.default.json → metric.long.sentence.sentence_answer.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.middle.sentence.paragraph_answer.question.asahi417_qg_esquad.default.json → metric.middle.sentence.paragraph_answer.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.middle.sentence.paragraph_sentence.question.asahi417_qg_esquad.default.json → metric.middle.sentence.paragraph_sentence.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.middle.sentence.sentence_answer.question.asahi417_qg_esquad.default.json → metric.middle.sentence.sentence_answer.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.short.sentence.paragraph_answer.question.asahi417_qg_esquad.default.json → metric.short.sentence.paragraph_answer.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.short.sentence.paragraph_sentence.question.asahi417_qg_esquad.default.json → metric.short.sentence.paragraph_sentence.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{metric.short.sentence.sentence_answer.question.asahi417_qg_esquad.default.json → metric.short.sentence.sentence_answer.question.lmqg_qg_esquad.default.json}
RENAMED
File without changes
|
eval/{samples.test.hyp.paragraph_answer.question.asahi417_qg_esquad.default.txt → samples.test.hyp.paragraph_answer.question.lmqg_qg_esquad.default.txt}
RENAMED
File without changes
|
eval/{samples.test.hyp.paragraph_sentence.question.asahi417_qg_esquad.default.txt → samples.test.hyp.paragraph_sentence.question.lmqg_qg_esquad.default.txt}
RENAMED
File without changes
|
eval/{samples.test.hyp.sentence_answer.question.asahi417_qg_esquad.default.txt → samples.test.hyp.sentence_answer.question.lmqg_qg_esquad.default.txt}
RENAMED
File without changes
|
eval/{samples.validation.hyp.paragraph_answer.question.asahi417_qg_esquad.default.txt → samples.validation.hyp.paragraph_answer.question.lmqg_qg_esquad.default.txt}
RENAMED
File without changes
|
eval/{samples.validation.hyp.paragraph_sentence.question.asahi417_qg_esquad.default.txt → samples.validation.hyp.paragraph_sentence.question.lmqg_qg_esquad.default.txt}
RENAMED
File without changes
|
eval/{samples.validation.hyp.sentence_answer.question.asahi417_qg_esquad.default.txt → samples.validation.hyp.sentence_answer.question.lmqg_qg_esquad.default.txt}
RENAMED
File without changes
|
trainer_config.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"dataset_path": "
|
|
|
1 |
+
{"dataset_path": "lmqg/qg_esquad", "dataset_name": "default", "input_types": ["paragraph_answer", "paragraph_sentence"], "output_types": ["question", "answer"], "prefix_types": ["qg", "ae"], "model": "google/mt5-small", "max_length": 512, "max_length_output": 32, "epoch": 5, "batch": 16, "lr": 0.001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 4, "label_smoothing": 0.15}
|