asahi417 commited on
Commit
158c81d
1 Parent(s): 201d943

model update

Browse files
Files changed (26) hide show
  1. README.md +118 -0
  2. eval/{metric.first.answer.paragraph_answer.question.asahi417_qg_itquad.default.json → metric.first.answer.paragraph_answer.question.lmqg_qg_itquad.default.json} +0 -0
  3. eval/{metric.first.answer.paragraph_sentence.question.asahi417_qg_itquad.default.json → metric.first.answer.paragraph_sentence.question.lmqg_qg_itquad.default.json} +0 -0
  4. eval/{metric.first.answer.sentence_answer.question.asahi417_qg_itquad.default.json → metric.first.answer.sentence_answer.question.lmqg_qg_itquad.default.json} +0 -0
  5. eval/{metric.first.sentence.paragraph_answer.question.asahi417_qg_itquad.default.json → metric.first.sentence.paragraph_answer.question.lmqg_qg_itquad.default.json} +0 -0
  6. eval/{metric.first.sentence.paragraph_sentence.question.asahi417_qg_itquad.default.json → metric.first.sentence.paragraph_sentence.question.lmqg_qg_itquad.default.json} +0 -0
  7. eval/{metric.first.sentence.sentence_answer.question.asahi417_qg_itquad.default.json → metric.first.sentence.sentence_answer.question.lmqg_qg_itquad.default.json} +0 -0
  8. eval/{metric.last.sentence.paragraph_answer.question.asahi417_qg_itquad.default.json → metric.last.sentence.paragraph_answer.question.lmqg_qg_itquad.default.json} +0 -0
  9. eval/{metric.last.sentence.paragraph_sentence.question.asahi417_qg_itquad.default.json → metric.last.sentence.paragraph_sentence.question.lmqg_qg_itquad.default.json} +0 -0
  10. eval/{metric.last.sentence.sentence_answer.question.asahi417_qg_itquad.default.json → metric.last.sentence.sentence_answer.question.lmqg_qg_itquad.default.json} +0 -0
  11. eval/{metric.long.sentence.paragraph_answer.question.asahi417_qg_itquad.default.json → metric.long.sentence.paragraph_answer.question.lmqg_qg_itquad.default.json} +0 -0
  12. eval/{metric.long.sentence.paragraph_sentence.question.asahi417_qg_itquad.default.json → metric.long.sentence.paragraph_sentence.question.lmqg_qg_itquad.default.json} +0 -0
  13. eval/{metric.long.sentence.sentence_answer.question.asahi417_qg_itquad.default.json → metric.long.sentence.sentence_answer.question.lmqg_qg_itquad.default.json} +0 -0
  14. eval/{metric.middle.sentence.paragraph_answer.question.asahi417_qg_itquad.default.json → metric.middle.sentence.paragraph_answer.question.lmqg_qg_itquad.default.json} +0 -0
  15. eval/{metric.middle.sentence.paragraph_sentence.question.asahi417_qg_itquad.default.json → metric.middle.sentence.paragraph_sentence.question.lmqg_qg_itquad.default.json} +0 -0
  16. eval/{metric.middle.sentence.sentence_answer.question.asahi417_qg_itquad.default.json → metric.middle.sentence.sentence_answer.question.lmqg_qg_itquad.default.json} +0 -0
  17. eval/{metric.short.sentence.paragraph_answer.question.asahi417_qg_itquad.default.json → metric.short.sentence.paragraph_answer.question.lmqg_qg_itquad.default.json} +0 -0
  18. eval/{metric.short.sentence.paragraph_sentence.question.asahi417_qg_itquad.default.json → metric.short.sentence.paragraph_sentence.question.lmqg_qg_itquad.default.json} +0 -0
  19. eval/{metric.short.sentence.sentence_answer.question.asahi417_qg_itquad.default.json → metric.short.sentence.sentence_answer.question.lmqg_qg_itquad.default.json} +0 -0
  20. eval/{samples.test.hyp.paragraph_answer.question.asahi417_qg_itquad.default.txt → samples.test.hyp.paragraph_answer.question.lmqg_qg_itquad.default.txt} +0 -0
  21. eval/{samples.test.hyp.paragraph_sentence.question.asahi417_qg_itquad.default.txt → samples.test.hyp.paragraph_sentence.question.lmqg_qg_itquad.default.txt} +0 -0
  22. eval/{samples.test.hyp.sentence_answer.question.asahi417_qg_itquad.default.txt → samples.test.hyp.sentence_answer.question.lmqg_qg_itquad.default.txt} +0 -0
  23. eval/{samples.validation.hyp.paragraph_answer.question.asahi417_qg_itquad.default.txt → samples.validation.hyp.paragraph_answer.question.lmqg_qg_itquad.default.txt} +0 -0
  24. eval/{samples.validation.hyp.paragraph_sentence.question.asahi417_qg_itquad.default.txt → samples.validation.hyp.paragraph_sentence.question.lmqg_qg_itquad.default.txt} +0 -0
  25. eval/{samples.validation.hyp.sentence_answer.question.asahi417_qg_itquad.default.txt → samples.validation.hyp.sentence_answer.question.lmqg_qg_itquad.default.txt} +0 -0
  26. 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: it
11
+ datasets:
12
+ - lmqg/qg_itquad
13
+ pipeline_tag: text2text-generation
14
+ tags:
15
+ - question generation
16
+ - answer extraction
17
+ widget:
18
+ - text: "generate question: <hl> Dopo il 1971 <hl> , l' OPEC ha tardato ad adeguare i prezzi per riflettere tale deprezzamento."
19
+ example_title: "Question Generation Example 1"
20
+ - text: "generate question: L' individuazione del petrolio e lo sviluppo di nuovi giacimenti richiedeva in genere <hl> da cinque a dieci anni <hl> prima di una produzione significativa."
21
+ example_title: "Question Generation Example 2"
22
+ - text: "generate question: il <hl> Giappone <hl> è stato il paese più dipendente dal petrolio arabo."
23
+ example_title: "Question Generation Example 3"
24
+ - text: "<hl> Il 6 ottobre 1973 , la Siria e l' Egitto, con il sostegno di altre nazioni arabe, lanciarono un attacco a sorpresa su Israele, su Yom Kippur. <hl> Questo rinnovo delle ostilità nel conflitto arabo-israeliano ha liberato la pressione economica sottostante sui prezzi del petrolio. All' epoca, l' Iran era il secondo esportatore mondiale di petrolio e un vicino alleato degli Stati Uniti. Settimane più tardi, lo scià d' Iran ha detto in un' intervista: Naturalmente[il prezzo del petrolio] sta andando a salire Certamente! E come! Avete[Paesi occidentali] aumentato il prezzo del grano che ci vendete del 300 per cento, e lo stesso per zucchero e cemento."
25
+ example_title: "Answer Extraction Example 1"
26
+ - text: "<hl> Furono introdotti autocarri compatti, come la Toyota Hilux e il Datsun Truck, seguiti dal camion Mazda (venduto come il Ford Courier), e l' Isuzu costruito Chevrolet LUV. <hl> Mitsubishi rebranded il suo Forte come Dodge D-50 pochi anni dopo la crisi petrolifera. Mazda, Mitsubishi e Isuzu avevano partnership congiunte rispettivamente con Ford, Chrysler e GM. In seguito i produttori americani introdussero le loro sostituzioni nazionali (Ford Ranger, Dodge Dakota e la Chevrolet S10/GMC S-15), ponendo fine alla loro politica di importazione vincolata."
27
+ example_title: "Answer Extraction Example 2"
28
+ model-index:
29
+ - name: lmqg/mt5-small-itquad-multitask
30
+ results:
31
+ - task:
32
+ name: Text2text Generation
33
+ type: text2text-generation
34
+ dataset:
35
+ name: lmqg/qg_itquad
36
+ type: default
37
+ args: default
38
+ metrics:
39
+ - name: BLEU4
40
+ type: bleu4
41
+ value: 0.07247588693912974
42
+ - name: ROUGE-L
43
+ type: rouge-l
44
+ value: 0.2183840870793931
45
+ - name: METEOR
46
+ type: meteor
47
+ value: 0.17495288244686244
48
+ - name: BERTScore
49
+ type: bertscore
50
+ value: 0.8061110932516495
51
+ - name: MoverScore
52
+ type: moverscore
53
+ value: 0.5662580131358668
54
+ ---
55
+
56
+ # Language Models Fine-tuning on Question Generation: `lmqg/mt5-small-itquad-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_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) (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:** it
64
+ - **Training data:** [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) (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-itquad-multitask'
75
+ pipe = pipeline("text2text-generation", model_path)
76
+
77
+ # Question Generation
78
+ input_text = 'generate question: <hl> Dopo il 1971 <hl> , l' OPEC ha tardato ad adeguare i prezzi per riflettere tale deprezzamento.'
79
+ question = pipe(input_text)
80
+ # Answer Extraction
81
+ answer = pipe('extract answers: <hl> Il 6 ottobre 1973 , la Siria e l' Egitto, con il sostegno di altre nazioni arabe, lanciarono un attacco a sorpresa su Israele, su Yom Kippur. <hl> Questo rinnovo delle ostilità nel conflitto arabo-israeliano ha liberato la pressione economica sottostante sui prezzi del petrolio. All' epoca, l' Iran era il secondo esportatore mondiale di petrolio e un vicino alleato degli Stati Uniti. Settimane più tardi, lo scià d' Iran ha detto in un' intervista: Naturalmente[il prezzo del petrolio] sta andando a salire Certamente! E come! Avete[Paesi occidentali] aumentato il prezzo del grano che ci vendete del 300 per cento, e lo stesso per zucchero e cemento.')
82
+ ```
83
+
84
+ ## Evaluation Metrics
85
+
86
+
87
+ ### Metrics
88
+
89
+ | Dataset | Type | BLEU4 | ROUGE-L | METEOR | BERTScore | MoverScore | Link |
90
+ |:--------|:-----|------:|--------:|-------:|----------:|-----------:|-----:|
91
+ | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) | default | 0.07247588693912974 | 0.2183840870793931 | 0.17495288244686244 | 0.8061110932516495 | 0.5662580131358668 | [link](https://huggingface.co/lmqg/mt5-small-itquad-multitask/raw/main/eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_itquad.default.json) |
92
+
93
+
94
+
95
+
96
+ ## Training hyperparameters
97
+
98
+ The following hyperparameters were used during fine-tuning:
99
+ - dataset_path: lmqg/qg_itquad
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: 13
108
+ - batch: 16
109
+ - lr: 0.001
110
+ - fp16: False
111
+ - random_seed: 1
112
+ - gradient_accumulation_steps: 4
113
+ - label_smoothing: 0.15
114
+
115
+ The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-itquad-multitask/raw/main/trainer_config.json).
116
+
117
+ ## Citation
118
+ TBA
eval/{metric.first.answer.paragraph_answer.question.asahi417_qg_itquad.default.json → metric.first.answer.paragraph_answer.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.first.answer.paragraph_sentence.question.asahi417_qg_itquad.default.json → metric.first.answer.paragraph_sentence.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.first.answer.sentence_answer.question.asahi417_qg_itquad.default.json → metric.first.answer.sentence_answer.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.first.sentence.paragraph_answer.question.asahi417_qg_itquad.default.json → metric.first.sentence.paragraph_answer.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.first.sentence.paragraph_sentence.question.asahi417_qg_itquad.default.json → metric.first.sentence.paragraph_sentence.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.first.sentence.sentence_answer.question.asahi417_qg_itquad.default.json → metric.first.sentence.sentence_answer.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.last.sentence.paragraph_answer.question.asahi417_qg_itquad.default.json → metric.last.sentence.paragraph_answer.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.last.sentence.paragraph_sentence.question.asahi417_qg_itquad.default.json → metric.last.sentence.paragraph_sentence.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.last.sentence.sentence_answer.question.asahi417_qg_itquad.default.json → metric.last.sentence.sentence_answer.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.long.sentence.paragraph_answer.question.asahi417_qg_itquad.default.json → metric.long.sentence.paragraph_answer.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.long.sentence.paragraph_sentence.question.asahi417_qg_itquad.default.json → metric.long.sentence.paragraph_sentence.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.long.sentence.sentence_answer.question.asahi417_qg_itquad.default.json → metric.long.sentence.sentence_answer.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.middle.sentence.paragraph_answer.question.asahi417_qg_itquad.default.json → metric.middle.sentence.paragraph_answer.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.middle.sentence.paragraph_sentence.question.asahi417_qg_itquad.default.json → metric.middle.sentence.paragraph_sentence.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.middle.sentence.sentence_answer.question.asahi417_qg_itquad.default.json → metric.middle.sentence.sentence_answer.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.short.sentence.paragraph_answer.question.asahi417_qg_itquad.default.json → metric.short.sentence.paragraph_answer.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.short.sentence.paragraph_sentence.question.asahi417_qg_itquad.default.json → metric.short.sentence.paragraph_sentence.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{metric.short.sentence.sentence_answer.question.asahi417_qg_itquad.default.json → metric.short.sentence.sentence_answer.question.lmqg_qg_itquad.default.json} RENAMED
File without changes
eval/{samples.test.hyp.paragraph_answer.question.asahi417_qg_itquad.default.txt → samples.test.hyp.paragraph_answer.question.lmqg_qg_itquad.default.txt} RENAMED
File without changes
eval/{samples.test.hyp.paragraph_sentence.question.asahi417_qg_itquad.default.txt → samples.test.hyp.paragraph_sentence.question.lmqg_qg_itquad.default.txt} RENAMED
File without changes
eval/{samples.test.hyp.sentence_answer.question.asahi417_qg_itquad.default.txt → samples.test.hyp.sentence_answer.question.lmqg_qg_itquad.default.txt} RENAMED
File without changes
eval/{samples.validation.hyp.paragraph_answer.question.asahi417_qg_itquad.default.txt → samples.validation.hyp.paragraph_answer.question.lmqg_qg_itquad.default.txt} RENAMED
File without changes
eval/{samples.validation.hyp.paragraph_sentence.question.asahi417_qg_itquad.default.txt → samples.validation.hyp.paragraph_sentence.question.lmqg_qg_itquad.default.txt} RENAMED
File without changes
eval/{samples.validation.hyp.sentence_answer.question.asahi417_qg_itquad.default.txt → samples.validation.hyp.sentence_answer.question.lmqg_qg_itquad.default.txt} RENAMED
File without changes
trainer_config.json CHANGED
@@ -1 +1 @@
1
- {"dataset_path": "asahi417/qg_itquad", "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": 13, "batch": 16, "lr": 0.001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 4, "label_smoothing": 0.15}
 
1
+ {"dataset_path": "lmqg/qg_itquad", "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": 13, "batch": 16, "lr": 0.001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 4, "label_smoothing": 0.15}