model update
Browse files- README.md +135 -0
- config.json +1 -1
- eval/metric.first.answer.paragraph.questions_answers.lmqg_qag_itquad.default.json +1 -0
- eval/samples.test.hyp.paragraph.questions_answers.lmqg_qag_itquad.default.txt +0 -0
- eval/samples.validation.hyp.paragraph.questions_answers.lmqg_qag_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,135 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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/qag_itquad
|
| 13 |
+
pipeline_tag: text2text-generation
|
| 14 |
+
tags:
|
| 15 |
+
- questions and answers generation
|
| 16 |
+
widget:
|
| 17 |
+
- text: "Dopo il 1971 , l' OPEC ha tardato ad adeguare i prezzi per riflettere tale deprezzamento."
|
| 18 |
+
example_title: "Questions & Answers Generation Example 1"
|
| 19 |
+
model-index:
|
| 20 |
+
- name: lmqg/mbart-large-cc25-itquad-qag
|
| 21 |
+
results:
|
| 22 |
+
- task:
|
| 23 |
+
name: Text2text Generation
|
| 24 |
+
type: text2text-generation
|
| 25 |
+
dataset:
|
| 26 |
+
name: lmqg/qag_itquad
|
| 27 |
+
type: default
|
| 28 |
+
args: default
|
| 29 |
+
metrics:
|
| 30 |
+
- name: QAAlignedF1Score-BERTScore (Question & Answer Generation)
|
| 31 |
+
type: qa_aligned_f1_score_bertscore_question_answer_generation
|
| 32 |
+
value: 72.96
|
| 33 |
+
- name: QAAlignedRecall-BERTScore (Question & Answer Generation)
|
| 34 |
+
type: qa_aligned_recall_bertscore_question_answer_generation
|
| 35 |
+
value: 71.83
|
| 36 |
+
- name: QAAlignedPrecision-BERTScore (Question & Answer Generation)
|
| 37 |
+
type: qa_aligned_precision_bertscore_question_answer_generation
|
| 38 |
+
value: 74.2
|
| 39 |
+
- name: QAAlignedF1Score-MoverScore (Question & Answer Generation)
|
| 40 |
+
type: qa_aligned_f1_score_moverscore_question_answer_generation
|
| 41 |
+
value: 51.25
|
| 42 |
+
- name: QAAlignedRecall-MoverScore (Question & Answer Generation)
|
| 43 |
+
type: qa_aligned_recall_moverscore_question_answer_generation
|
| 44 |
+
value: 50.21
|
| 45 |
+
- name: QAAlignedPrecision-MoverScore (Question & Answer Generation)
|
| 46 |
+
type: qa_aligned_precision_moverscore_question_answer_generation
|
| 47 |
+
value: 52.44
|
| 48 |
+
---
|
| 49 |
+
|
| 50 |
+
# Model Card of `lmqg/mbart-large-cc25-itquad-qag`
|
| 51 |
+
This model is fine-tuned version of [facebook/mbart-large-cc25](https://huggingface.co/facebook/mbart-large-cc25) for question & answer pair generation task on the [lmqg/qag_itquad](https://huggingface.co/datasets/lmqg/qag_itquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
### Overview
|
| 55 |
+
- **Language model:** [facebook/mbart-large-cc25](https://huggingface.co/facebook/mbart-large-cc25)
|
| 56 |
+
- **Language:** it
|
| 57 |
+
- **Training data:** [lmqg/qag_itquad](https://huggingface.co/datasets/lmqg/qag_itquad) (default)
|
| 58 |
+
- **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
|
| 59 |
+
- **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
|
| 60 |
+
- **Paper:** [https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)
|
| 61 |
+
|
| 62 |
+
### Usage
|
| 63 |
+
- With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
|
| 64 |
+
```python
|
| 65 |
+
from lmqg import TransformersQG
|
| 66 |
+
|
| 67 |
+
# initialize model
|
| 68 |
+
model = TransformersQG(language="it", model="lmqg/mbart-large-cc25-itquad-qag")
|
| 69 |
+
|
| 70 |
+
# model prediction
|
| 71 |
+
question_answer_pairs = model.generate_qa("Dopo il 1971 , l' OPEC ha tardato ad adeguare i prezzi per riflettere tale deprezzamento.")
|
| 72 |
+
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
- With `transformers`
|
| 76 |
+
```python
|
| 77 |
+
from transformers import pipeline
|
| 78 |
+
|
| 79 |
+
pipe = pipeline("text2text-generation", "lmqg/mbart-large-cc25-itquad-qag")
|
| 80 |
+
output = pipe("Dopo il 1971 , l' OPEC ha tardato ad adeguare i prezzi per riflettere tale deprezzamento.")
|
| 81 |
+
|
| 82 |
+
```
|
| 83 |
+
|
| 84 |
+
## Evaluation
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
- ***Metric (Question & Answer Generation)***: [raw metric file](https://huggingface.co/lmqg/mbart-large-cc25-itquad-qag/raw/main/eval/metric.first.answer.paragraph.questions_answers.lmqg_qag_itquad.default.json)
|
| 88 |
+
|
| 89 |
+
| | Score | Type | Dataset |
|
| 90 |
+
|:--------------------------------|--------:|:--------|:-------------------------------------------------------------------|
|
| 91 |
+
| QAAlignedF1Score (BERTScore) | 72.96 | default | [lmqg/qag_itquad](https://huggingface.co/datasets/lmqg/qag_itquad) |
|
| 92 |
+
| QAAlignedF1Score (MoverScore) | 51.25 | default | [lmqg/qag_itquad](https://huggingface.co/datasets/lmqg/qag_itquad) |
|
| 93 |
+
| QAAlignedPrecision (BERTScore) | 74.2 | default | [lmqg/qag_itquad](https://huggingface.co/datasets/lmqg/qag_itquad) |
|
| 94 |
+
| QAAlignedPrecision (MoverScore) | 52.44 | default | [lmqg/qag_itquad](https://huggingface.co/datasets/lmqg/qag_itquad) |
|
| 95 |
+
| QAAlignedRecall (BERTScore) | 71.83 | default | [lmqg/qag_itquad](https://huggingface.co/datasets/lmqg/qag_itquad) |
|
| 96 |
+
| QAAlignedRecall (MoverScore) | 50.21 | default | [lmqg/qag_itquad](https://huggingface.co/datasets/lmqg/qag_itquad) |
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
|
| 100 |
+
## Training hyperparameters
|
| 101 |
+
|
| 102 |
+
The following hyperparameters were used during fine-tuning:
|
| 103 |
+
- dataset_path: lmqg/qag_itquad
|
| 104 |
+
- dataset_name: default
|
| 105 |
+
- input_types: ['paragraph']
|
| 106 |
+
- output_types: ['questions_answers']
|
| 107 |
+
- prefix_types: None
|
| 108 |
+
- model: facebook/mbart-large-cc25
|
| 109 |
+
- max_length: 512
|
| 110 |
+
- max_length_output: 256
|
| 111 |
+
- epoch: 14
|
| 112 |
+
- batch: 8
|
| 113 |
+
- lr: 0.0001
|
| 114 |
+
- fp16: False
|
| 115 |
+
- random_seed: 1
|
| 116 |
+
- gradient_accumulation_steps: 16
|
| 117 |
+
- label_smoothing: 0.15
|
| 118 |
+
|
| 119 |
+
The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mbart-large-cc25-itquad-qag/raw/main/trainer_config.json).
|
| 120 |
+
|
| 121 |
+
## Citation
|
| 122 |
+
```
|
| 123 |
+
@inproceedings{ushio-etal-2022-generative,
|
| 124 |
+
title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
|
| 125 |
+
author = "Ushio, Asahi and
|
| 126 |
+
Alva-Manchego, Fernando and
|
| 127 |
+
Camacho-Collados, Jose",
|
| 128 |
+
booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
|
| 129 |
+
month = dec,
|
| 130 |
+
year = "2022",
|
| 131 |
+
address = "Abu Dhabi, U.A.E.",
|
| 132 |
+
publisher = "Association for Computational Linguistics",
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
```
|
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "lmqg_output/mbart-large-cc25-itquad-qag/
|
| 3 |
"_num_labels": 3,
|
| 4 |
"activation_dropout": 0.0,
|
| 5 |
"activation_function": "gelu",
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "lmqg_output/mbart-large-cc25-itquad-qag/model_iovmpj/epoch_5",
|
| 3 |
"_num_labels": 3,
|
| 4 |
"activation_dropout": 0.0,
|
| 5 |
"activation_function": "gelu",
|
eval/metric.first.answer.paragraph.questions_answers.lmqg_qag_itquad.default.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"validation": {"Bleu_1": 0.13542104061231505, "Bleu_2": 0.06463206722552836, "Bleu_3": 0.037527509456603755, "Bleu_4": 0.024149605383889588, "METEOR": 0.19637667004148632, "ROUGE_L": 0.1794824087703433, "BERTScore": 0.7184275808038225, "MoverScore": 0.5217052610229042, "QAAlignedF1Score (BERTScore)": 0.7276849783195997, "QAAlignedRecall (BERTScore)": 0.736117797855707, "QAAlignedPrecision (BERTScore)": 0.7199664947047292, "QAAlignedF1Score (MoverScore)": 0.5072712200324073, "QAAlignedRecall (MoverScore)": 0.513133939102146, "QAAlignedPrecision (MoverScore)": 0.5021306806188025}, "test": {"Bleu_1": 0.2028246379360438, "Bleu_2": 0.11573898832621304, "Bleu_3": 0.0720727821284893, "Bleu_4": 0.048660815663715204, "METEOR": 0.1550108751815631, "ROUGE_L": 0.19751677816796323, "BERTScore": 0.7635607211222831, "MoverScore": 0.5331782063975097, "QAAlignedF1Score (BERTScore)": 0.7296107903023021, "QAAlignedRecall (BERTScore)": 0.7183084581772343, "QAAlignedPrecision (BERTScore)": 0.7420292418872366, "QAAlignedF1Score (MoverScore)": 0.5125459244623932, "QAAlignedRecall (MoverScore)": 0.502108717608002, "QAAlignedPrecision (MoverScore)": 0.5243794013209974}}
|
eval/samples.test.hyp.paragraph.questions_answers.lmqg_qag_itquad.default.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
eval/samples.validation.hyp.paragraph.questions_answers.lmqg_qag_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:c64a4d21592f47da1d3ade5f555aec4110f8a229156713f406fe872d27e33e14
|
| 3 |
+
size 2444583801
|
tokenizer_config.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
| 12 |
"single_word": false
|
| 13 |
},
|
| 14 |
"model_max_length": 1024,
|
| 15 |
-
"name_or_path": "lmqg_output/mbart-large-cc25-itquad-qag/
|
| 16 |
"pad_token": "<pad>",
|
| 17 |
"sep_token": "</s>",
|
| 18 |
"special_tokens_map_file": null,
|
|
|
|
| 12 |
"single_word": false
|
| 13 |
},
|
| 14 |
"model_max_length": 1024,
|
| 15 |
+
"name_or_path": "lmqg_output/mbart-large-cc25-itquad-qag/model_iovmpj/epoch_5",
|
| 16 |
"pad_token": "<pad>",
|
| 17 |
"sep_token": "</s>",
|
| 18 |
"special_tokens_map_file": null,
|
trainer_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"dataset_path": "lmqg/qag_itquad", "dataset_name": "default", "input_types": ["paragraph"], "output_types": ["questions_answers"], "prefix_types": null, "model": "facebook/mbart-large-cc25", "max_length": 512, "max_length_output": 256, "epoch": 14, "batch": 8, "lr": 0.0001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 16, "label_smoothing": 0.15}
|