asahi417 commited on
Commit
f57801d
1 Parent(s): 2df2cd0

model update

Browse files
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-base-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: 22.67
35
+ - name: ROUGE-L (Answer Extraction)
36
+ type: rouge_l_answer_extraction
37
+ value: 42.58
38
+ - name: METEOR (Answer Extraction)
39
+ type: meteor_answer_extraction
40
+ value: 37.72
41
+ - name: BERTScore (Answer Extraction)
42
+ type: bertscore_answer_extraction
43
+ value: 89.26
44
+ - name: MoverScore (Answer Extraction)
45
+ type: moverscore_answer_extraction
46
+ value: 78.79
47
+ - name: AnswerF1Score (Answer Extraction)
48
+ type: answer_f1_score__answer_extraction
49
+ value: 68.09
50
+ - name: AnswerExactMatch (Answer Extraction)
51
+ type: answer_exact_match_answer_extraction
52
+ value: 52.15
53
+ ---
54
+
55
+ # Model Card of `lmqg/mt5-base-itquad-ae`
56
+ This model is fine-tuned version of [google/mt5-base](https://huggingface.co/google/mt5-base) 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-base](https://huggingface.co/google/mt5-base)
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-base-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-base-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-base-itquad-ae/raw/main/eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_itquad.default.json)
93
+
94
+ | | Score | Type | Dataset |
95
+ |:-----------------|--------:|:--------|:-----------------------------------------------------------------|
96
+ | AnswerExactMatch | 52.15 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
97
+ | AnswerF1Score | 68.09 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
98
+ | BERTScore | 89.26 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
99
+ | Bleu_1 | 36.69 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
100
+ | Bleu_2 | 30.79 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
101
+ | Bleu_3 | 26.51 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
102
+ | Bleu_4 | 22.67 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
103
+ | METEOR | 37.72 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
104
+ | MoverScore | 78.79 | default | [lmqg/qg_itquad](https://huggingface.co/datasets/lmqg/qg_itquad) |
105
+ | ROUGE_L | 42.58 | 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-base
118
+ - max_length: 512
119
+ - max_length_output: 32
120
+ - epoch: 16
121
+ - batch: 8
122
+ - lr: 0.001
123
+ - fp16: False
124
+ - random_seed: 1
125
+ - gradient_accumulation_steps: 8
126
+ - label_smoothing: 0.15
127
+
128
+ The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-base-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-base-itquad-ae/best_model",
3
  "add_prefix": false,
4
  "architectures": [
5
  "MT5ForConditionalGeneration"
 
1
  {
2
+ "_name_or_path": "lmqg_output/mt5-base-itquad-ae/model_ijgkkr/epoch_15",
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.3613615374466616, "Bleu_2": 0.29979101174184014, "Bleu_3": 0.2572079920111839, "Bleu_4": 0.2188756857549235, "METEOR": 0.40334586128894945, "ROUGE_L": 0.42268562907901547, "BERTScore": 0.9108938501626626, "MoverScore": 0.8239377626899412, "AnswerF1Score": 73.43484666575796, "AnswerExactMatch": 60.38901301090814}, "test": {"Bleu_1": 0.36694598112592064, "Bleu_2": 0.3079147476086298, "Bleu_3": 0.26509275277318584, "Bleu_4": 0.22667978095566216, "METEOR": 0.3771853045500855, "ROUGE_L": 0.4258455498245661, "BERTScore": 0.8926223951298486, "MoverScore": 0.7878688802080305, "AnswerF1Score": 68.09132800296655, "AnswerExactMatch": 52.14877119200946}}
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:11fd732ecd6eb381ab277cb04de584c21d12eb771848241e5dfdc6d74eba7fb7
3
- size 2329630901
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a440bdd452e6235c8e234ac136c8dadfc7ce0b7069c58e612e3f848455127e9
3
+ size 2329634869
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-base-itquad-ae/best_model",
6
  "pad_token": "<pad>",
7
  "sp_model_kwargs": {},
8
  "special_tokens_map_file": "/home/patrick/.cache/torch/transformers/685ac0ca8568ec593a48b61b0a3c272beee9bc194a3c7241d15dcadb5f875e53.f76030f3ec1b96a8199b2593390c610e76ca8028ef3d24680000619ffb646276",
 
2
  "additional_special_tokens": null,
3
  "eos_token": "</s>",
4
  "extra_ids": 0,
5
+ "name_or_path": "lmqg_output/mt5-base-itquad-ae/model_ijgkkr/epoch_15",
6
  "pad_token": "<pad>",
7
  "sp_model_kwargs": {},
8
  "special_tokens_map_file": "/home/patrick/.cache/torch/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-base", "max_length": 512, "max_length_output": 32, "epoch": 16, "batch": 8, "lr": 0.001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 8, "label_smoothing": 0.15}