model update
Browse files- README.md +144 -0
- config.json +1 -1
- eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_squad.default.json +1 -0
- eval/samples.test.hyp.paragraph_sentence.answer.lmqg_qg_squad.default.txt +0 -0
- eval/samples.validation.hyp.paragraph_sentence.answer.lmqg_qg_squad.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: en
|
11 |
+
datasets:
|
12 |
+
- lmqg/qg_squad
|
13 |
+
pipeline_tag: text2text-generation
|
14 |
+
tags:
|
15 |
+
- answer extraction
|
16 |
+
widget:
|
17 |
+
- text: "extract answers: <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: "extract answers: 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/t5-large-squad-ae
|
23 |
+
results:
|
24 |
+
- task:
|
25 |
+
name: Text2text Generation
|
26 |
+
type: text2text-generation
|
27 |
+
dataset:
|
28 |
+
name: lmqg/qg_squad
|
29 |
+
type: default
|
30 |
+
args: default
|
31 |
+
metrics:
|
32 |
+
- name: BLEU4 (Answer Extraction)
|
33 |
+
type: bleu4_answer_extraction
|
34 |
+
value: 55.66
|
35 |
+
- name: ROUGE-L (Answer Extraction)
|
36 |
+
type: rouge_l_answer_extraction
|
37 |
+
value: 69.67
|
38 |
+
- name: METEOR (Answer Extraction)
|
39 |
+
type: meteor_answer_extraction
|
40 |
+
value: 43.06
|
41 |
+
- name: BERTScore (Answer Extraction)
|
42 |
+
type: bertscore_answer_extraction
|
43 |
+
value: 91.91
|
44 |
+
- name: MoverScore (Answer Extraction)
|
45 |
+
type: moverscore_answer_extraction
|
46 |
+
value: 82.82
|
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: 59.77
|
53 |
+
---
|
54 |
+
|
55 |
+
# Model Card of `lmqg/t5-large-squad-ae`
|
56 |
+
This model is fine-tuned version of [t5-large](https://huggingface.co/t5-large) for answer extraction on the [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
|
57 |
+
|
58 |
+
|
59 |
+
### Overview
|
60 |
+
- **Language model:** [t5-large](https://huggingface.co/t5-large)
|
61 |
+
- **Language:** en
|
62 |
+
- **Training data:** [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) (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/t5-large-squad-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/t5-large-squad-ae")
|
85 |
+
output = pipe("extract answers: <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/t5-large-squad-ae/raw/main/eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_squad.default.json)
|
93 |
+
|
94 |
+
| | Score | Type | Dataset |
|
95 |
+
|:-----------------|--------:|:--------|:---------------------------------------------------------------|
|
96 |
+
| AnswerExactMatch | 59.77 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
|
97 |
+
| AnswerF1Score | 70.41 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
|
98 |
+
| BERTScore | 91.91 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
|
99 |
+
| Bleu_1 | 65.48 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
|
100 |
+
| Bleu_2 | 62.11 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
|
101 |
+
| Bleu_3 | 58.71 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
|
102 |
+
| Bleu_4 | 55.66 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
|
103 |
+
| METEOR | 43.06 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
|
104 |
+
| MoverScore | 82.82 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
|
105 |
+
| ROUGE_L | 69.67 | default | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) |
|
106 |
+
|
107 |
+
|
108 |
+
|
109 |
+
## Training hyperparameters
|
110 |
+
|
111 |
+
The following hyperparameters were used during fine-tuning:
|
112 |
+
- dataset_path: lmqg/qg_squad
|
113 |
+
- dataset_name: default
|
114 |
+
- input_types: ['paragraph_sentence']
|
115 |
+
- output_types: ['answer']
|
116 |
+
- prefix_types: ['ae']
|
117 |
+
- model: t5-large
|
118 |
+
- max_length: 512
|
119 |
+
- max_length_output: 32
|
120 |
+
- epoch: 9
|
121 |
+
- batch: 4
|
122 |
+
- lr: 0.0001
|
123 |
+
- fp16: False
|
124 |
+
- random_seed: 1
|
125 |
+
- gradient_accumulation_steps: 32
|
126 |
+
- label_smoothing: 0.0
|
127 |
+
|
128 |
+
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/t5-large-squad-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/t5-large-squad-
|
3 |
"add_prefix": true,
|
4 |
"architectures": [
|
5 |
"T5ForConditionalGeneration"
|
|
|
1 |
{
|
2 |
+
"_name_or_path": "lmqg_output/t5-large-squad-answer-extraction/model_dpyopu/epoch_8",
|
3 |
"add_prefix": true,
|
4 |
"architectures": [
|
5 |
"T5ForConditionalGeneration"
|
eval/metric.first.answer.paragraph_sentence.answer.lmqg_qg_squad.default.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"validation": {"Bleu_1": 0.6092786558604, "Bleu_2": 0.5752857781791739, "Bleu_3": 0.5409398353010405, "Bleu_4": 0.5088834730749616, "METEOR": 0.4044118256706168, "ROUGE_L": 0.6559758184242263, "BERTScore": 0.915732828428301, "MoverScore": 0.797161540973188, "AnswerF1Score": 66.48735591160741, "AnswerExactMatch": 53.074739829706715}, "test": {"Bleu_1": 0.6548460814625446, "Bleu_2": 0.6210863550939794, "Bleu_3": 0.5871105868832052, "Bleu_4": 0.5565669770193598, "METEOR": 0.43057968365185656, "ROUGE_L": 0.6967481728431596, "BERTScore": 0.9190753414804128, "MoverScore": 0.828223524086094, "AnswerF1Score": 70.40520439016043, "AnswerExactMatch": 59.77098593921024}}
|
eval/samples.test.hyp.paragraph_sentence.answer.lmqg_qg_squad.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_squad.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:2d264eafe36e89defd20628dad2d134fe4a0c25ea22199287b564064e663ae79
|
3 |
+
size 2950737921
|
tokenizer_config.json
CHANGED
@@ -104,7 +104,7 @@
|
|
104 |
"eos_token": "</s>",
|
105 |
"extra_ids": 100,
|
106 |
"model_max_length": 512,
|
107 |
-
"name_or_path": "lmqg_output/t5-large-squad-
|
108 |
"pad_token": "<pad>",
|
109 |
"special_tokens_map_file": null,
|
110 |
"tokenizer_class": "T5Tokenizer",
|
|
|
104 |
"eos_token": "</s>",
|
105 |
"extra_ids": 100,
|
106 |
"model_max_length": 512,
|
107 |
+
"name_or_path": "lmqg_output/t5-large-squad-answer-extraction/model_dpyopu/epoch_8",
|
108 |
"pad_token": "<pad>",
|
109 |
"special_tokens_map_file": null,
|
110 |
"tokenizer_class": "T5Tokenizer",
|
trainer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"dataset_path": "lmqg/qg_squad", "dataset_name": "default", "input_types": ["paragraph_sentence"], "output_types": ["answer"], "prefix_types": ["ae"], "model": "t5-large", "max_length": 512, "max_length_output": 32, "epoch": 9, "batch": 4, "lr": 0.0001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 32, "label_smoothing": 0.0}
|