commit files to HF hub
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: en
|
11 |
+
datasets:
|
12 |
+
- lmqg/qg_zhquad
|
13 |
+
pipeline_tag: text2text-generation
|
14 |
+
tags:
|
15 |
+
- answer extraction
|
16 |
+
widget:
|
17 |
+
- text: "<hl> Beyonce further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records. <hl> Her performance in the film received praise from critics, and she garnered several nominations for her portrayal of James, including a Satellite Award nomination for Best Supporting Actress, and a NAACP Image Award nomination for Outstanding Supporting Actress."
|
18 |
+
example_title: "Answering Extraction Example 1"
|
19 |
+
- text: "Beyonce further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records. <hl> Her performance in the film received praise from critics, and she garnered several nominations for her portrayal of James, including a Satellite Award nomination for Best Supporting Actress, and a NAACP Image Award nomination for Outstanding Supporting Actress. <hl>"
|
20 |
+
example_title: "Answering Extraction Example 2"
|
21 |
+
model-index:
|
22 |
+
- name: lmqg/mt5-small-zhquad-ae
|
23 |
+
results:
|
24 |
+
- task:
|
25 |
+
name: Text2text Generation
|
26 |
+
type: text2text-generation
|
27 |
+
dataset:
|
28 |
+
name: lmqg/qg_zhquad
|
29 |
+
type: default
|
30 |
+
args: default
|
31 |
+
metrics:
|
32 |
+
- name: BLEU4 (Answer Extraction)
|
33 |
+
type: bleu4_answer_extraction
|
34 |
+
value: 82.12
|
35 |
+
- name: ROUGE-L (Answer Extraction)
|
36 |
+
type: rouge_l_answer_extraction
|
37 |
+
value: 95.7
|
38 |
+
- name: METEOR (Answer Extraction)
|
39 |
+
type: meteor_answer_extraction
|
40 |
+
value: 70.98
|
41 |
+
- name: BERTScore (Answer Extraction)
|
42 |
+
type: bertscore_answer_extraction
|
43 |
+
value: 99.78
|
44 |
+
- name: MoverScore (Answer Extraction)
|
45 |
+
type: moverscore_answer_extraction
|
46 |
+
value: 98.8
|
47 |
+
- name: AnswerF1Score (Answer Extraction)
|
48 |
+
type: answer_f1_score__answer_extraction
|
49 |
+
value: 95.17
|
50 |
+
- name: AnswerExactMatch (Answer Extraction)
|
51 |
+
type: answer_exact_match_answer_extraction
|
52 |
+
value: 95.08
|
53 |
+
---
|
54 |
+
|
55 |
+
# Model Card of `lmqg/mt5-small-zhquad-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_zhquad](https://huggingface.co/datasets/lmqg/qg_zhquad) (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:** en
|
62 |
+
- **Training data:** [lmqg/qg_zhquad](https://huggingface.co/datasets/lmqg/qg_zhquad) (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="en", model="lmqg/mt5-small-zhquad-ae")
|
74 |
+
|
75 |
+
# model prediction
|
76 |
+
answers = model.generate_a("William Turner was an English painter who specialised in watercolour landscapes")
|
77 |
+
|
78 |
+
```
|
79 |
+
|
80 |
+
- With `transformers`
|
81 |
+
```python
|
82 |
+
from transformers import pipeline
|
83 |
+
|
84 |
+
pipe = pipeline("text2text-generation", "lmqg/mt5-small-zhquad-ae")
|
85 |
+
output = pipe("<hl> Beyonce further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records. <hl> Her performance in the film received praise from critics, and she garnered several nominations for her portrayal of James, including a Satellite Award nomination for Best Supporting Actress, and a NAACP Image Award nomination for Outstanding Supporting Actress.")
|
86 |
+
|
87 |
+
```
|
88 |
+
|
89 |
+
## Evaluation
|
90 |
+
|
91 |
+
|
92 |
+
- ***Metric (Answer Extraction)***: [raw metric file](https://huggingface.co/lmqg/mt5-small-zhquad-ae/raw/main/eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_zhquad.default.json)
|
93 |
+
|
94 |
+
| | Score | Type | Dataset |
|
95 |
+
|:-----------------|--------:|:--------|:-----------------------------------------------------------------|
|
96 |
+
| AnswerExactMatch | 95.08 | default | [lmqg/qg_zhquad](https://huggingface.co/datasets/lmqg/qg_zhquad) |
|
97 |
+
| AnswerF1Score | 95.17 | default | [lmqg/qg_zhquad](https://huggingface.co/datasets/lmqg/qg_zhquad) |
|
98 |
+
| BERTScore | 99.78 | default | [lmqg/qg_zhquad](https://huggingface.co/datasets/lmqg/qg_zhquad) |
|
99 |
+
| Bleu_1 | 92.07 | default | [lmqg/qg_zhquad](https://huggingface.co/datasets/lmqg/qg_zhquad) |
|
100 |
+
| Bleu_2 | 88.98 | default | [lmqg/qg_zhquad](https://huggingface.co/datasets/lmqg/qg_zhquad) |
|
101 |
+
| Bleu_3 | 85.68 | default | [lmqg/qg_zhquad](https://huggingface.co/datasets/lmqg/qg_zhquad) |
|
102 |
+
| Bleu_4 | 82.12 | default | [lmqg/qg_zhquad](https://huggingface.co/datasets/lmqg/qg_zhquad) |
|
103 |
+
| METEOR | 70.98 | default | [lmqg/qg_zhquad](https://huggingface.co/datasets/lmqg/qg_zhquad) |
|
104 |
+
| MoverScore | 98.8 | default | [lmqg/qg_zhquad](https://huggingface.co/datasets/lmqg/qg_zhquad) |
|
105 |
+
| ROUGE_L | 95.7 | default | [lmqg/qg_zhquad](https://huggingface.co/datasets/lmqg/qg_zhquad) |
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
+
## Training hyperparameters
|
110 |
+
|
111 |
+
The following hyperparameters were used during fine-tuning:
|
112 |
+
- dataset_path: lmqg/qg_zhquad
|
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: 4
|
121 |
+
- batch: 16
|
122 |
+
- lr: 0.0005
|
123 |
+
- fp16: False
|
124 |
+
- random_seed: 1
|
125 |
+
- gradient_accumulation_steps: 4
|
126 |
+
- label_smoothing: 0.15
|
127 |
+
|
128 |
+
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-zhquad-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 |
+
```
|
eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_zhquad.default.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"validation": {"Bleu_1": 0.912896580140053, "Bleu_2": 0.8804701193017836, "Bleu_3": 0.8467998054794517, "Bleu_4": 0.8113598119994743, "METEOR": 0.7055339995152433, "ROUGE_L": 0.950296585648165, "BERTScore": 0.9965133804569203, "MoverScore": 0.9843137525598916, "AnswerF1Score": 94.37559263627745, "AnswerExactMatch": 94.22049538610976}, "test": {"Bleu_1": 0.9206505036707819, "Bleu_2": 0.889804563393523, "Bleu_3": 0.85680409086929, "Bleu_4": 0.8212311960361648, "METEOR": 0.7097847456378461, "ROUGE_L": 0.9569663634480098, "BERTScore": 0.9977623556187397, "MoverScore": 0.9879534864147735, "AnswerF1Score": 95.17148870232893, "AnswerExactMatch": 95.082564351627}}
|
eval/samples.test.hyp.paragraph_sentence.answer.lmqg_qg_zhquad.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_zhquad.default.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|