model update
Browse files- README.md +118 -0
- eval/{metric.first.answer.paragraph_answer.question.asahi417_qg_frquad.default.json → metric.first.answer.paragraph_answer.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.first.answer.paragraph_sentence.question.asahi417_qg_frquad.default.json → metric.first.answer.paragraph_sentence.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.first.answer.sentence_answer.question.asahi417_qg_frquad.default.json → metric.first.answer.sentence_answer.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.first.sentence.paragraph_answer.question.asahi417_qg_frquad.default.json → metric.first.sentence.paragraph_answer.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.first.sentence.paragraph_sentence.question.asahi417_qg_frquad.default.json → metric.first.sentence.paragraph_sentence.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.first.sentence.sentence_answer.question.asahi417_qg_frquad.default.json → metric.first.sentence.sentence_answer.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.last.sentence.paragraph_answer.question.asahi417_qg_frquad.default.json → metric.last.sentence.paragraph_answer.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.last.sentence.paragraph_sentence.question.asahi417_qg_frquad.default.json → metric.last.sentence.paragraph_sentence.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.last.sentence.sentence_answer.question.asahi417_qg_frquad.default.json → metric.last.sentence.sentence_answer.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.long.sentence.paragraph_answer.question.asahi417_qg_frquad.default.json → metric.long.sentence.paragraph_answer.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.long.sentence.paragraph_sentence.question.asahi417_qg_frquad.default.json → metric.long.sentence.paragraph_sentence.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.long.sentence.sentence_answer.question.asahi417_qg_frquad.default.json → metric.long.sentence.sentence_answer.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.middle.sentence.paragraph_answer.question.asahi417_qg_frquad.default.json → metric.middle.sentence.paragraph_answer.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.middle.sentence.paragraph_sentence.question.asahi417_qg_frquad.default.json → metric.middle.sentence.paragraph_sentence.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.middle.sentence.sentence_answer.question.asahi417_qg_frquad.default.json → metric.middle.sentence.sentence_answer.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.short.sentence.paragraph_answer.question.asahi417_qg_frquad.default.json → metric.short.sentence.paragraph_answer.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.short.sentence.paragraph_sentence.question.asahi417_qg_frquad.default.json → metric.short.sentence.paragraph_sentence.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{metric.short.sentence.sentence_answer.question.asahi417_qg_frquad.default.json → metric.short.sentence.sentence_answer.question.lmqg_qg_frquad.default.json} +0 -0
- eval/{samples.test.hyp.paragraph_answer.question.asahi417_qg_frquad.default.txt → samples.test.hyp.paragraph_answer.question.lmqg_qg_frquad.default.txt} +0 -0
- eval/{samples.test.hyp.paragraph_sentence.question.asahi417_qg_frquad.default.txt → samples.test.hyp.paragraph_sentence.question.lmqg_qg_frquad.default.txt} +0 -0
- eval/{samples.test.hyp.sentence_answer.question.asahi417_qg_frquad.default.txt → samples.test.hyp.sentence_answer.question.lmqg_qg_frquad.default.txt} +0 -0
- eval/{samples.validation.hyp.paragraph_answer.question.asahi417_qg_frquad.default.txt → samples.validation.hyp.paragraph_answer.question.lmqg_qg_frquad.default.txt} +0 -0
- eval/{samples.validation.hyp.paragraph_sentence.question.asahi417_qg_frquad.default.txt → samples.validation.hyp.paragraph_sentence.question.lmqg_qg_frquad.default.txt} +0 -0
- eval/{samples.validation.hyp.sentence_answer.question.asahi417_qg_frquad.default.txt → samples.validation.hyp.sentence_answer.question.lmqg_qg_frquad.default.txt} +0 -0
- trainer_config.json +1 -1
README.md
ADDED
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
license: cc-by-4.0
|
4 |
+
metrics:
|
5 |
+
- bleu4
|
6 |
+
- meteor
|
7 |
+
- rouge-l
|
8 |
+
- bertscore
|
9 |
+
- moverscore
|
10 |
+
language: fr
|
11 |
+
datasets:
|
12 |
+
- lmqg/qg_frquad
|
13 |
+
pipeline_tag: text2text-generation
|
14 |
+
tags:
|
15 |
+
- question generation
|
16 |
+
- answer extraction
|
17 |
+
widget:
|
18 |
+
- text: "generate question: Créateur » (Maker), lui aussi au singulier, « <hl> le Suprême Berger <hl> » (The Great Shepherd) ; de l'autre, des réminiscences de la théologie de l'Antiquité : le tonnerre, voix de Jupiter, « Et souvent ta voix gronde en un tonnerre terrifiant », etc."
|
19 |
+
example_title: "Question Generation Example 1"
|
20 |
+
- text: "generate question: Ce black dog peut être lié à des évènements traumatisants issus du monde extérieur, tels que son renvoi de l'Amirauté après la catastrophe des Dardanelles, lors de la <hl> Grande Guerre <hl> de 14-18, ou son rejet par l'électorat en juillet 1945."
|
21 |
+
example_title: "Question Generation Example 2"
|
22 |
+
- text: "generate question: contre <hl> Normie Smith <hl> et 15 000 dollars le 28 novembre 1938."
|
23 |
+
example_title: "Question Generation Example 3"
|
24 |
+
- text: "Pourtant, la strophe spensérienne, utilisée cinq fois avant que ne commence le chœur, constitue en soi un vecteur dont les répétitions structurelles, selon Ricks, relèvent du pur lyrisme tout en constituant une menace potentielle. Après les huit sages pentamètres iambiques, l'alexandrin final <hl> permet une pause <hl>, « véritable illusion d'optique » qu'accentuent les nombreuses expressions archaïsantes telles que did swoon, did seem, did go, did receive, did make, qui doublent le prétérit en un temps composé et paraissent à la fois « très précautionneuses et très peu pressées »."
|
25 |
+
example_title: "Answer Extraction Example 1"
|
26 |
+
- text: "Néanmoins, une fois encore, l'arithmétique modulaire est insuffisante pour venir à bout du théorème. Dirichlet utilise de nombreuses techniques analytiques, comme les séries entières et l'analyse complexe. Le fruit de ces travaux donne naissance à une nouvelle branche des mathématiques : la théorie analytique des nombres. L'un des points cruciaux de cette théorie provient de l'unique article de <hl> Bernhard Riemann <hl> en théorie des nombres : Sur le nombre de nombres premiers inférieurs à une taille donnée. Il conjecture une localisation des racines de sa fonction ζ. La recherche de la position des racines, initiée par Dirichlet, devient une préoccupation centrale et reste l'une des conjectures pressenties comme les plus difficiles des mathématiques de notre époque."
|
27 |
+
example_title: "Answer Extraction Example 2"
|
28 |
+
model-index:
|
29 |
+
- name: lmqg/mt5-small-frquad-multitask
|
30 |
+
results:
|
31 |
+
- task:
|
32 |
+
name: Text2text Generation
|
33 |
+
type: text2text-generation
|
34 |
+
dataset:
|
35 |
+
name: lmqg/qg_frquad
|
36 |
+
type: default
|
37 |
+
args: default
|
38 |
+
metrics:
|
39 |
+
- name: BLEU4
|
40 |
+
type: bleu4
|
41 |
+
value: 0.0774587808669847
|
42 |
+
- name: ROUGE-L
|
43 |
+
type: rouge-l
|
44 |
+
value: 0.28060033794696104
|
45 |
+
- name: METEOR
|
46 |
+
type: meteor
|
47 |
+
value: 0.17623658069800158
|
48 |
+
- name: BERTScore
|
49 |
+
type: bertscore
|
50 |
+
value: 0.7990349418715752
|
51 |
+
- name: MoverScore
|
52 |
+
type: moverscore
|
53 |
+
value: 0.5644356433018314
|
54 |
+
---
|
55 |
+
|
56 |
+
# Language Models Fine-tuning on Question Generation: `lmqg/mt5-small-frquad-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_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) (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:** fr
|
64 |
+
- **Training data:** [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) (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-frquad-multitask'
|
75 |
+
pipe = pipeline("text2text-generation", model_path)
|
76 |
+
|
77 |
+
# Question Generation
|
78 |
+
input_text = 'generate question: Créateur » (Maker), lui aussi au singulier, « <hl> le Suprême Berger <hl> » (The Great Shepherd) ; de l'autre, des réminiscences de la théologie de l'Antiquité : le tonnerre, voix de Jupiter, « Et souvent ta voix gronde en un tonnerre terrifiant », etc.'
|
79 |
+
question = pipe(input_text)
|
80 |
+
# Answer Extraction
|
81 |
+
answer = pipe('extract answers: Pourtant, la strophe spensérienne, utilisée cinq fois avant que ne commence le chœur, constitue en soi un vecteur dont les répétitions structurelles, selon Ricks, relèvent du pur lyrisme tout en constituant une menace potentielle. Après les huit sages pentamètres iambiques, l'alexandrin final <hl> permet une pause <hl>, « véritable illusion d'optique » qu'accentuent les nombreuses expressions archaïsantes telles que did swoon, did seem, did go, did receive, did make, qui doublent le prétérit en un temps composé et paraissent à la fois « très précautionneuses et très peu pressées ».')
|
82 |
+
```
|
83 |
+
|
84 |
+
## Evaluation Metrics
|
85 |
+
|
86 |
+
|
87 |
+
### Metrics
|
88 |
+
|
89 |
+
| Dataset | Type | BLEU4 | ROUGE-L | METEOR | BERTScore | MoverScore | Link |
|
90 |
+
|:--------|:-----|------:|--------:|-------:|----------:|-----------:|-----:|
|
91 |
+
| [lmqg/qg_frquad](https://huggingface.co/datasets/lmqg/qg_frquad) | default | 0.0774587808669847 | 0.28060033794696104 | 0.17623658069800158 | 0.7990349418715752 | 0.5644356433018314 | [link](https://huggingface.co/lmqg/mt5-small-frquad-multitask/raw/main/eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_frquad.default.json) |
|
92 |
+
|
93 |
+
|
94 |
+
|
95 |
+
|
96 |
+
## Training hyperparameters
|
97 |
+
|
98 |
+
The following hyperparameters were used during fine-tuning:
|
99 |
+
- dataset_path: lmqg/qg_frquad
|
100 |
+
- dataset_name: default
|
101 |
+
- input_types: ['paragraph_answer', 'paragraph_sentence']
|
102 |
+
- output_types: ['question', 'answer']
|
103 |
+
- prefix_types: ['qg', 'ae']
|
104 |
+
- model: google/mt5-small
|
105 |
+
- max_length: 512
|
106 |
+
- max_length_output: 32
|
107 |
+
- epoch: 18
|
108 |
+
- batch: 64
|
109 |
+
- lr: 0.0005
|
110 |
+
- fp16: False
|
111 |
+
- random_seed: 1
|
112 |
+
- gradient_accumulation_steps: 1
|
113 |
+
- label_smoothing: 0.15
|
114 |
+
|
115 |
+
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-frquad-multitask/raw/main/trainer_config.json).
|
116 |
+
|
117 |
+
## Citation
|
118 |
+
TBA
|
eval/{metric.first.answer.paragraph_answer.question.asahi417_qg_frquad.default.json → metric.first.answer.paragraph_answer.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.first.answer.paragraph_sentence.question.asahi417_qg_frquad.default.json → metric.first.answer.paragraph_sentence.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.first.answer.sentence_answer.question.asahi417_qg_frquad.default.json → metric.first.answer.sentence_answer.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.first.sentence.paragraph_answer.question.asahi417_qg_frquad.default.json → metric.first.sentence.paragraph_answer.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.first.sentence.paragraph_sentence.question.asahi417_qg_frquad.default.json → metric.first.sentence.paragraph_sentence.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.first.sentence.sentence_answer.question.asahi417_qg_frquad.default.json → metric.first.sentence.sentence_answer.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.last.sentence.paragraph_answer.question.asahi417_qg_frquad.default.json → metric.last.sentence.paragraph_answer.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.last.sentence.paragraph_sentence.question.asahi417_qg_frquad.default.json → metric.last.sentence.paragraph_sentence.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.last.sentence.sentence_answer.question.asahi417_qg_frquad.default.json → metric.last.sentence.sentence_answer.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.long.sentence.paragraph_answer.question.asahi417_qg_frquad.default.json → metric.long.sentence.paragraph_answer.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.long.sentence.paragraph_sentence.question.asahi417_qg_frquad.default.json → metric.long.sentence.paragraph_sentence.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.long.sentence.sentence_answer.question.asahi417_qg_frquad.default.json → metric.long.sentence.sentence_answer.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.middle.sentence.paragraph_answer.question.asahi417_qg_frquad.default.json → metric.middle.sentence.paragraph_answer.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.middle.sentence.paragraph_sentence.question.asahi417_qg_frquad.default.json → metric.middle.sentence.paragraph_sentence.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.middle.sentence.sentence_answer.question.asahi417_qg_frquad.default.json → metric.middle.sentence.sentence_answer.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.short.sentence.paragraph_answer.question.asahi417_qg_frquad.default.json → metric.short.sentence.paragraph_answer.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.short.sentence.paragraph_sentence.question.asahi417_qg_frquad.default.json → metric.short.sentence.paragraph_sentence.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{metric.short.sentence.sentence_answer.question.asahi417_qg_frquad.default.json → metric.short.sentence.sentence_answer.question.lmqg_qg_frquad.default.json}
RENAMED
File without changes
|
eval/{samples.test.hyp.paragraph_answer.question.asahi417_qg_frquad.default.txt → samples.test.hyp.paragraph_answer.question.lmqg_qg_frquad.default.txt}
RENAMED
File without changes
|
eval/{samples.test.hyp.paragraph_sentence.question.asahi417_qg_frquad.default.txt → samples.test.hyp.paragraph_sentence.question.lmqg_qg_frquad.default.txt}
RENAMED
File without changes
|
eval/{samples.test.hyp.sentence_answer.question.asahi417_qg_frquad.default.txt → samples.test.hyp.sentence_answer.question.lmqg_qg_frquad.default.txt}
RENAMED
File without changes
|
eval/{samples.validation.hyp.paragraph_answer.question.asahi417_qg_frquad.default.txt → samples.validation.hyp.paragraph_answer.question.lmqg_qg_frquad.default.txt}
RENAMED
File without changes
|
eval/{samples.validation.hyp.paragraph_sentence.question.asahi417_qg_frquad.default.txt → samples.validation.hyp.paragraph_sentence.question.lmqg_qg_frquad.default.txt}
RENAMED
File without changes
|
eval/{samples.validation.hyp.sentence_answer.question.asahi417_qg_frquad.default.txt → samples.validation.hyp.sentence_answer.question.lmqg_qg_frquad.default.txt}
RENAMED
File without changes
|
trainer_config.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"dataset_path": "
|
|
|
1 |
+
{"dataset_path": "lmqg/qg_frquad", "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": 18, "batch": 64, "lr": 0.0005, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 1, "label_smoothing": 0.15}
|