model update
Browse files- README.md +144 -0
- config.json +1 -1
- eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_itquad.default.json +1 -0
- eval/samples.test.hyp.paragraph_sentence.answer.lmqg_qg_itquad.default.txt +0 -0
- eval/samples.validation.hyp.paragraph_sentence.answer.lmqg_qg_itquad.default.txt +0 -0
- pytorch_model.bin +2 -2
- tokenizer_config.json +1 -1
- trainer_config.json +1 -0
README.md
ADDED
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
- answer extraction
|
16 |
+
widget:
|
17 |
+
- 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."
|
18 |
+
example_title: "Answering Extraction Example 1"
|
19 |
+
- 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."
|
20 |
+
example_title: "Answering Extraction Example 2"
|
21 |
+
model-index:
|
22 |
+
- name: lmqg/mt5-small-itquad-ae
|
23 |
+
results:
|
24 |
+
- task:
|
25 |
+
name: Text2text Generation
|
26 |
+
type: text2text-generation
|
27 |
+
dataset:
|
28 |
+
name: lmqg/qg_itquad
|
29 |
+
type: default
|
30 |
+
args: default
|
31 |
+
metrics:
|
32 |
+
- name: BLEU4 (Answer Extraction)
|
33 |
+
type: bleu4_answer_extraction
|
34 |
+
value: 24.72
|
35 |
+
- name: ROUGE-L (Answer Extraction)
|
36 |
+
type: rouge_l_answer_extraction
|
37 |
+
value: 43.93
|
38 |
+
- name: METEOR (Answer Extraction)
|
39 |
+
type: meteor_answer_extraction
|
40 |
+
value: 40.39
|
41 |
+
- name: BERTScore (Answer Extraction)
|
42 |
+
type: bertscore_answer_extraction
|
43 |
+
value: 90.01
|
44 |
+
- name: MoverScore (Answer Extraction)
|
45 |
+
type: moverscore_answer_extraction
|
46 |
+
value: 80.28
|
47 |
+
- name: AnswerF1Score (Answer Extraction)
|
48 |
+
type: answer_f1_score__answer_extraction
|
49 |
+
value: 70.41
|
50 |
+
- name: AnswerExactMatch (Answer Extraction)
|
51 |
+
type: answer_exact_match_answer_extraction
|
52 |
+
value: 55.07
|
53 |
+
---
|
54 |
+
|
55 |
+
# Model Card of `lmqg/mt5-small-itquad-ae`
|
56 |
+
This model is fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) for answer extraction on the [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
|
57 |
+
|
58 |
+
|
59 |
+
### Overview
|
60 |
+
- **Language model:** [google/mt5-small](https://huggingface.co/google/mt5-small)
|
61 |
+
- **Language:** it
|
62 |
+
- **Training data:** [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) (default)
|
63 |
+
- **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
|
64 |
+
- **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
|
65 |
+
- **Paper:** [https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)
|
66 |
+
|
67 |
+
### Usage
|
68 |
+
- With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
|
69 |
+
```python
|
70 |
+
from lmqg import TransformersQG
|
71 |
+
|
72 |
+
# initialize model
|
73 |
+
model = TransformersQG(language="it", model="lmqg/mt5-small-itquad-ae")
|
74 |
+
|
75 |
+
# model prediction
|
76 |
+
answers = model.generate_a("Dopo il 1971 , l' OPEC ha tardato ad adeguare i prezzi per riflettere tale deprezzamento.")
|
77 |
+
|
78 |
+
```
|
79 |
+
|
80 |
+
- With `transformers`
|
81 |
+
```python
|
82 |
+
from transformers import pipeline
|
83 |
+
|
84 |
+
pipe = pipeline("text2text-generation", "lmqg/mt5-small-itquad-ae")
|
85 |
+
output = pipe("<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.")
|
86 |
+
|
87 |
+
```
|
88 |
+
|
89 |
+
## Evaluation
|
90 |
+
|
91 |
+
|
92 |
+
- ***Metric (Answer Extraction)***: [raw metric file](https://huggingface.co/lmqg/mt5-small-itquad-ae/raw/main/eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_itquad.default.json)
|
93 |
+
|
94 |
+
| | Score | Type | Dataset |
|
95 |
+
|:-----------------|--------:|:--------|:-----------------------------------------------------------------|
|
96 |
+
| AnswerExactMatch | 55.07 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
|
97 |
+
| AnswerF1Score | 70.41 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
|
98 |
+
| BERTScore | 90.01 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
|
99 |
+
| Bleu_1 | 38.56 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
|
100 |
+
| Bleu_2 | 32.74 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
|
101 |
+
| Bleu_3 | 28.58 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
|
102 |
+
| Bleu_4 | 24.72 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
|
103 |
+
| METEOR | 40.39 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
|
104 |
+
| MoverScore | 80.28 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
|
105 |
+
| ROUGE_L | 43.93 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
+
## Training hyperparameters
|
110 |
+
|
111 |
+
The following hyperparameters were used during fine-tuning:
|
112 |
+
- dataset_path: lmqg/qg_itquad
|
113 |
+
- dataset_name: default
|
114 |
+
- input_types: ['paragraph_sentence']
|
115 |
+
- output_types: ['answer']
|
116 |
+
- prefix_types: None
|
117 |
+
- model: google/mt5-small
|
118 |
+
- max_length: 512
|
119 |
+
- max_length_output: 32
|
120 |
+
- epoch: 17
|
121 |
+
- batch: 32
|
122 |
+
- lr: 0.0005
|
123 |
+
- fp16: False
|
124 |
+
- random_seed: 1
|
125 |
+
- gradient_accumulation_steps: 2
|
126 |
+
- label_smoothing: 0.15
|
127 |
+
|
128 |
+
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-itquad-ae/raw/main/trainer_config.json).
|
129 |
+
|
130 |
+
## Citation
|
131 |
+
```
|
132 |
+
@inproceedings{ushio-etal-2022-generative,
|
133 |
+
title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
|
134 |
+
author = "Ushio, Asahi and
|
135 |
+
Alva-Manchego, Fernando and
|
136 |
+
Camacho-Collados, Jose",
|
137 |
+
booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
|
138 |
+
month = dec,
|
139 |
+
year = "2022",
|
140 |
+
address = "Abu Dhabi, U.A.E.",
|
141 |
+
publisher = "Association for Computational Linguistics",
|
142 |
+
}
|
143 |
+
|
144 |
+
```
|
config.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
{
|
2 |
-
"_name_or_path": "lmqg_output/mt5-small-itquad-ae/
|
3 |
"add_prefix": false,
|
4 |
"architectures": [
|
5 |
"MT5ForConditionalGeneration"
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "lmqg_output/mt5-small-itquad-ae/model_dpyopu/epoch_16",
|
3 |
"add_prefix": false,
|
4 |
"architectures": [
|
5 |
"MT5ForConditionalGeneration"
|
eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_itquad.default.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"validation": {"Bleu_1": 0.3802766938630551, "Bleu_2": 0.3208412646309787, "Bleu_3": 0.2815563762772013, "Bleu_4": 0.2457599094842878, "METEOR": 0.42438095997897396, "ROUGE_L": 0.42772970170711316, "BERTScore": 0.9146979711288878, "MoverScore": 0.8332605175058013, "AnswerF1Score": 74.65627256450345, "AnswerExactMatch": 62.16322775660402}, "test": {"Bleu_1": 0.38564932190428647, "Bleu_2": 0.3274055672789062, "Bleu_3": 0.28575000665066835, "Bleu_4": 0.24719088743211617, "METEOR": 0.4038959685112302, "ROUGE_L": 0.4392674966747319, "BERTScore": 0.9000634355212279, "MoverScore": 0.8027686285931673, "AnswerF1Score": 70.40764755484545, "AnswerExactMatch": 55.06636877382048}}
|
eval/samples.test.hyp.paragraph_sentence.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_sentence.answer.lmqg_qg_itquad.default.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
pytorch_model.bin
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e72e4a426c5dd730e517a2a35be7d1e7a864305cc1ba09d6546baecfbe500e35
|
3 |
+
size 1200727429
|
tokenizer_config.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
"additional_special_tokens": null,
|
3 |
"eos_token": "</s>",
|
4 |
"extra_ids": 0,
|
5 |
-
"name_or_path": "lmqg_output/mt5-small-itquad-ae/
|
6 |
"pad_token": "<pad>",
|
7 |
"sp_model_kwargs": {},
|
8 |
"special_tokens_map_file": "/home/asahiushio/.cache/huggingface/transformers/685ac0ca8568ec593a48b61b0a3c272beee9bc194a3c7241d15dcadb5f875e53.f76030f3ec1b96a8199b2593390c610e76ca8028ef3d24680000619ffb646276",
|
|
|
2 |
"additional_special_tokens": null,
|
3 |
"eos_token": "</s>",
|
4 |
"extra_ids": 0,
|
5 |
+
"name_or_path": "lmqg_output/mt5-small-itquad-ae/model_dpyopu/epoch_16",
|
6 |
"pad_token": "<pad>",
|
7 |
"sp_model_kwargs": {},
|
8 |
"special_tokens_map_file": "/home/asahiushio/.cache/huggingface/transformers/685ac0ca8568ec593a48b61b0a3c272beee9bc194a3c7241d15dcadb5f875e53.f76030f3ec1b96a8199b2593390c610e76ca8028ef3d24680000619ffb646276",
|
trainer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"dataset_path": "lmqg/qg_itquad", "dataset_name": "default", "input_types": ["paragraph_sentence"], "output_types": ["answer"], "prefix_types": null, "model": "google/mt5-small", "max_length": 512, "max_length_output": 32, "epoch": 17, "batch": 32, "lr": 0.0005, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 2, "label_smoothing": 0.15}
|