asahi417 commited on
Commit
1a9fd6d
1 Parent(s): 6adc6c9

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: es
11
+ datasets:
12
+ - lmqg/qg_esquad
13
+ pipeline_tag: text2text-generation
14
+ tags:
15
+ - answer extraction
16
+ widget:
17
+ - 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."
18
+ example_title: "Answering Extraction Example 1"
19
+ - 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."
20
+ example_title: "Answering Extraction Example 2"
21
+ model-index:
22
+ - name: lmqg/mt5-base-esquad-ae
23
+ results:
24
+ - task:
25
+ name: Text2text Generation
26
+ type: text2text-generation
27
+ dataset:
28
+ name: lmqg/qg_esquad
29
+ type: default
30
+ args: default
31
+ metrics:
32
+ - name: BLEU4 (Answer Extraction)
33
+ type: bleu4_answer_extraction
34
+ value: 32.14
35
+ - name: ROUGE-L (Answer Extraction)
36
+ type: rouge_l_answer_extraction
37
+ value: 49.6
38
+ - name: METEOR (Answer Extraction)
39
+ type: meteor_answer_extraction
40
+ value: 42.73
41
+ - name: BERTScore (Answer Extraction)
42
+ type: bertscore_answer_extraction
43
+ value: 90.66
44
+ - name: MoverScore (Answer Extraction)
45
+ type: moverscore_answer_extraction
46
+ value: 81.22
47
+ - name: AnswerF1Score (Answer Extraction)
48
+ type: answer_f1_score__answer_extraction
49
+ value: 74.84
50
+ - name: AnswerExactMatch (Answer Extraction)
51
+ type: answer_exact_match_answer_extraction
52
+ value: 57.81
53
+ ---
54
+
55
+ # Model Card of `lmqg/mt5-base-esquad-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_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) (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:** es
62
+ - **Training data:** [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) (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="es", model="lmqg/mt5-base-esquad-ae")
74
+
75
+ # model prediction
76
+ answers = model.generate_a("a noviembre , que es también la estación lluviosa.")
77
+
78
+ ```
79
+
80
+ - With `transformers`
81
+ ```python
82
+ from transformers import pipeline
83
+
84
+ pipe = pipeline("text2text-generation", "lmqg/mt5-base-esquad-ae")
85
+ output = pipe("<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.")
86
+
87
+ ```
88
+
89
+ ## Evaluation
90
+
91
+
92
+ - ***Metric (Answer Extraction)***: [raw metric file](https://huggingface.co/lmqg/mt5-base-esquad-ae/raw/main/eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_esquad.default.json)
93
+
94
+ | | Score | Type | Dataset |
95
+ |:-----------------|--------:|:--------|:-----------------------------------------------------------------|
96
+ | AnswerExactMatch | 57.81 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
97
+ | AnswerF1Score | 74.84 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
98
+ | BERTScore | 90.66 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
99
+ | Bleu_1 | 43.7 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
100
+ | Bleu_2 | 38.74 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
101
+ | Bleu_3 | 35.16 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
102
+ | Bleu_4 | 32.14 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
103
+ | METEOR | 42.73 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
104
+ | MoverScore | 81.22 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
105
+ | ROUGE_L | 49.6 | default | [lmqg/qg_esquad](https://huggingface.co/datasets/lmqg/qg_esquad) |
106
+
107
+
108
+
109
+ ## Training hyperparameters
110
+
111
+ The following hyperparameters were used during fine-tuning:
112
+ - dataset_path: lmqg/qg_esquad
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: 17
121
+ - batch: 8
122
+ - lr: 0.0005
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-esquad-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-esquad-ae/best_model",
3
  "add_prefix": false,
4
  "architectures": [
5
  "MT5ForConditionalGeneration"
 
1
  {
2
+ "_name_or_path": "lmqg_output/mt5-base-esquad-ae/model_dpyopu/epoch_16",
3
  "add_prefix": false,
4
  "architectures": [
5
  "MT5ForConditionalGeneration"
eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_esquad.default.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"validation": {"Bleu_1": 0.40853406174984674, "Bleu_2": 0.35834646234311845, "Bleu_3": 0.3209838868566487, "Bleu_4": 0.28884498719107776, "METEOR": 0.41278965340368423, "ROUGE_L": 0.4831091284096542, "BERTScore": 0.8949728992431933, "MoverScore": 0.792099807195368, "AnswerF1Score": 71.7714381034085, "AnswerExactMatch": 53.27341532639546}, "test": {"Bleu_1": 0.4369659495899258, "Bleu_2": 0.38736587456940197, "Bleu_3": 0.3516262151158511, "Bleu_4": 0.32141889927170764, "METEOR": 0.42728689744216825, "ROUGE_L": 0.4960022641560713, "BERTScore": 0.906569547273127, "MoverScore": 0.8121839178723711, "AnswerF1Score": 74.83852797572133, "AnswerExactMatch": 57.81456953642384}}
eval/samples.test.hyp.paragraph_sentence.answer.lmqg_qg_esquad.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_esquad.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:f44a2881c1bbdc331db5ceaa27869ce325ee21b3beda9a85f3505ee6ad0b536e
3
- size 2329630901
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:46318cb36c903b9bd546ec912dce66ac709d090e2fb0655acd3b6b746ed77c9a
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-esquad-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-esquad-ae/model_dpyopu/epoch_16",
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_esquad", "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": 17, "batch": 8, "lr": 0.0005, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 8, "label_smoothing": 0.15}