--- license: cc-by-4.0 metrics: - bleu4 - meteor - rouge-l - bertscore - moverscore language: en datasets: - lmqg/qg_squad pipeline_tag: text2text-generation tags: - question generation widget: - text: " Beyonce further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records." example_title: "Question Generation Example 1" - text: "Beyonce further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records." example_title: "Question Generation Example 2" - text: "Beyonce further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records ." example_title: "Question Generation Example 3" model-index: - name: lmqg/bart-large-squad results: - task: name: Text2text Generation type: text2text-generation dataset: name: lmqg/qg_squad type: default args: default metrics: - name: BLEU4 type: bleu4 value: 0.26168385362299557 - name: ROUGE-L type: rouge-l value: 0.5384959163821219 - name: METEOR type: meteor value: 0.27073122286541956 - name: BERTScore type: bertscore value: 0.9100413219045603 - name: MoverScore type: moverscore value: 0.6499011626820898 - name: QAAlignedF1Score (BERTScore) type: qa_aligned_f1_score_bertscore value: 0.9553719665829591 - name: QAAlignedRecall (BERTScore) type: qa_aligned_recall_bertscore value: 0.9553719676636558 - name: QAAlignedPrecision (BERTScore) type: qa_aligned_precision_bertscore value: 0.9553719676636558 - name: QAAlignedF1Score (MoverScore) type: qa_aligned_f1_score_moverscore value: 0.7082452551815105 - name: QAAlignedRecall (MoverScore) type: qa_aligned_recall_moverscore value: 0.7082445720362622 - name: QAAlignedPrecision (MoverScore) type: qa_aligned_precision_moverscore value: 0.7082445720362622 - task: name: Text2text Generation type: text2text-generation dataset: name: lmqg/qg_squadshifts type: reddit args: reddit metrics: - name: BLEU4 type: bleu4 value: 0.059525104157825456 - name: ROUGE-L type: rouge-l value: 0.22365090580055863 - name: METEOR type: meteor value: 0.21499800504546457 - name: BERTScore type: bertscore value: 0.9095144685254328 - name: MoverScore type: moverscore value: 0.6059332247878408 - task: name: Text2text Generation type: text2text-generation dataset: name: lmqg/qg_squadshifts type: new_wiki args: new_wiki metrics: - name: BLEU4 type: bleu4 value: 0.11118273173452982 - name: ROUGE-L type: rouge-l value: 0.2967546690273089 - name: METEOR type: meteor value: 0.27315087810722966 - name: BERTScore type: bertscore value: 0.9322739617807421 - name: MoverScore type: moverscore value: 0.6623000084761579 - task: name: Text2text Generation type: text2text-generation dataset: name: lmqg/qg_subjqa type: tripadvisor args: tripadvisor metrics: - name: BLEU4 type: bleu4 value: 8.380171318718442e-07 - name: ROUGE-L type: rouge-l value: 0.1402922852924756 - name: METEOR type: meteor value: 0.1372146070365174 - name: BERTScore type: bertscore value: 0.8891002409937424 - name: MoverScore type: moverscore value: 0.5604572211470809 - task: name: Text2text Generation type: text2text-generation dataset: name: lmqg/qg_squadshifts type: nyt args: nyt metrics: - name: BLEU4 type: bleu4 value: 0.08117757543966063 - name: ROUGE-L type: rouge-l value: 0.25292097720734297 - name: METEOR type: meteor value: 0.25254205113198686 - name: BERTScore type: bertscore value: 0.9249009759439454 - name: MoverScore type: moverscore value: 0.6406329128556304 - task: name: Text2text Generation type: text2text-generation dataset: name: lmqg/qg_subjqa type: restaurants args: restaurants metrics: - name: BLEU4 type: bleu4 value: 1.1301750984972448e-06 - name: ROUGE-L type: rouge-l value: 0.13083168975354642 - name: METEOR type: meteor value: 0.12419733006916912 - name: BERTScore type: bertscore value: 0.8797711839570719 - name: MoverScore type: moverscore value: 0.5542757411268555 - task: name: Text2text Generation type: text2text-generation dataset: name: lmqg/qg_subjqa type: electronics args: electronics metrics: - name: BLEU4 type: bleu4 value: 0.00866799444965211 - name: ROUGE-L type: rouge-l value: 0.1601628874804186 - name: METEOR type: meteor value: 0.15348605312210778 - name: BERTScore type: bertscore value: 0.8783386920680519 - name: MoverScore type: moverscore value: 0.5634845371093992 - task: name: Text2text Generation type: text2text-generation dataset: name: lmqg/qg_subjqa type: books args: books metrics: - name: BLEU4 type: bleu4 value: 0.006278914808207679 - name: ROUGE-L type: rouge-l value: 0.12368226019088967 - name: METEOR type: meteor value: 0.11576293675813865 - name: BERTScore type: bertscore value: 0.8807110440044503 - name: MoverScore type: moverscore value: 0.5555905941686486 - task: name: Text2text Generation type: text2text-generation dataset: name: lmqg/qg_subjqa type: movies args: movies metrics: - name: BLEU4 type: bleu4 value: 1.0121579426501661e-06 - name: ROUGE-L type: rouge-l value: 0.12508697028506718 - name: METEOR type: meteor value: 0.11862284941640638 - name: BERTScore type: bertscore value: 0.8748829724726739 - name: MoverScore type: moverscore value: 0.5528899173535703 - task: name: Text2text Generation type: text2text-generation dataset: name: lmqg/qg_subjqa type: grocery args: grocery metrics: - name: BLEU4 type: bleu4 value: 0.00528043272450429 - name: ROUGE-L type: rouge-l value: 0.12343711316491492 - name: METEOR type: meteor value: 0.15133496445452477 - name: BERTScore type: bertscore value: 0.8778951253890991 - name: MoverScore type: moverscore value: 0.5701949938103265 - task: name: Text2text Generation type: text2text-generation dataset: name: lmqg/qg_squadshifts type: amazon args: amazon metrics: - name: BLEU4 type: bleu4 value: 0.06530369842068952 - name: ROUGE-L type: rouge-l value: 0.25030985091008146 - name: METEOR type: meteor value: 0.2229994442645732 - name: BERTScore type: bertscore value: 0.9092814804525936 - name: MoverScore type: moverscore value: 0.6086538514008419 --- # Model Card of `lmqg/bart-large-squad` This model is fine-tuned version of [facebook/bart-large](https://huggingface.co/facebook/bart-large) for question generation task on the [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation). Please cite our paper if you use the model ([https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)). ``` @inproceedings{ushio-etal-2022-generative, title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration", author = "Ushio, Asahi and Alva-Manchego, Fernando and Camacho-Collados, Jose", booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing", month = dec, year = "2022", address = "Abu Dhabi, U.A.E.", publisher = "Association for Computational Linguistics", } ``` ### Overview - **Language model:** [facebook/bart-large](https://huggingface.co/facebook/bart-large) - **Language:** en - **Training data:** [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) (default) - **Online Demo:** [https://autoqg.net/](https://autoqg.net/) - **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation) - **Paper:** [https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992) ### Usage - With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-) ```python from lmqg import TransformersQG # initialize model model = TransformersQG(language='en', model='lmqg/bart-large-squad') # model prediction question = model.generate_q(list_context=["William Turner was an English painter who specialised in watercolour landscapes"], list_answer=["William Turner"]) ``` - With `transformers` ```python from transformers import pipeline # initialize model pipe = pipeline("text2text-generation", 'lmqg/bart-large-squad') # question generation question = pipe(' Beyonce further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records.') ``` ## Evaluation Metrics ### Metrics | Dataset | Type | BLEU4 | ROUGE-L | METEOR | BERTScore | MoverScore | Link | |:--------|:-----|------:|--------:|-------:|----------:|-----------:|-----:| | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) | default | 0.262 | 0.538 | 0.271 | 0.91 | 0.65 | [link](https://huggingface.co/lmqg/bart-large-squad/raw/main/eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_squad.default.json) | ### Metrics (QAG) | Dataset | Type | QA Aligned F1 Score (BERTScore) | QA Aligned F1 Score (MoverScore) | Link | |:--------|:-----|--------------------------------:|---------------------------------:|-----:| | [lmqg/qg_squad](https://huggingface.co/datasets/lmqg/qg_squad) | default | 0.955 | 0.708 | [link](https://huggingface.co/lmqg/bart-large-squad/raw/main/eval/metric.first.answer.paragraph.questions_answers.lmqg_qg_squad.default.json) | ### Out-of-domain Metrics | Dataset | Type | BLEU4 | ROUGE-L | METEOR | BERTScore | MoverScore | Link | |:--------|:-----|------:|--------:|-------:|----------:|-----------:|-----:| | [lmqg/qg_squadshifts](https://huggingface.co/datasets/lmqg/qg_squadshifts) | reddit | 0.06 | 0.224 | 0.215 | 0.91 | 0.606 | [link](https://huggingface.co/lmqg/bart-large-squad/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_squadshifts.reddit.json) | | [lmqg/qg_squadshifts](https://huggingface.co/datasets/lmqg/qg_squadshifts) | new_wiki | 0.111 | 0.297 | 0.273 | 0.932 | 0.662 | [link](https://huggingface.co/lmqg/bart-large-squad/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_squadshifts.new_wiki.json) | | [lmqg/qg_subjqa](https://huggingface.co/datasets/lmqg/qg_subjqa) | tripadvisor | 0.0 | 0.14 | 0.137 | 0.889 | 0.56 | [link](https://huggingface.co/lmqg/bart-large-squad/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_subjqa.tripadvisor.json) | | [lmqg/qg_squadshifts](https://huggingface.co/datasets/lmqg/qg_squadshifts) | nyt | 0.081 | 0.253 | 0.253 | 0.925 | 0.641 | [link](https://huggingface.co/lmqg/bart-large-squad/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_squadshifts.nyt.json) | | [lmqg/qg_subjqa](https://huggingface.co/datasets/lmqg/qg_subjqa) | restaurants | 0.0 | 0.131 | 0.124 | 0.88 | 0.554 | [link](https://huggingface.co/lmqg/bart-large-squad/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_subjqa.restaurants.json) | | [lmqg/qg_subjqa](https://huggingface.co/datasets/lmqg/qg_subjqa) | electronics | 0.009 | 0.16 | 0.153 | 0.878 | 0.563 | [link](https://huggingface.co/lmqg/bart-large-squad/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_subjqa.electronics.json) | | [lmqg/qg_subjqa](https://huggingface.co/datasets/lmqg/qg_subjqa) | books | 0.006 | 0.124 | 0.116 | 0.881 | 0.556 | [link](https://huggingface.co/lmqg/bart-large-squad/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_subjqa.books.json) | | [lmqg/qg_subjqa](https://huggingface.co/datasets/lmqg/qg_subjqa) | movies | 0.0 | 0.125 | 0.119 | 0.875 | 0.553 | [link](https://huggingface.co/lmqg/bart-large-squad/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_subjqa.movies.json) | | [lmqg/qg_subjqa](https://huggingface.co/datasets/lmqg/qg_subjqa) | grocery | 0.005 | 0.123 | 0.151 | 0.878 | 0.57 | [link](https://huggingface.co/lmqg/bart-large-squad/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_subjqa.grocery.json) | | [lmqg/qg_squadshifts](https://huggingface.co/datasets/lmqg/qg_squadshifts) | amazon | 0.065 | 0.25 | 0.223 | 0.909 | 0.609 | [link](https://huggingface.co/lmqg/bart-large-squad/raw/main/eval_ood/metric.first.sentence.paragraph_answer.question.lmqg_qg_squadshifts.amazon.json) | ## Training hyperparameters The following hyperparameters were used during fine-tuning: - dataset_path: lmqg/qg_squad - dataset_name: default - input_types: ['paragraph_answer'] - output_types: ['question'] - prefix_types: None - model: facebook/bart-large - max_length: 512 - max_length_output: 32 - epoch: 4 - batch: 32 - lr: 5e-05 - fp16: False - random_seed: 1 - gradient_accumulation_steps: 4 - label_smoothing: 0.15 The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/bart-large-squad/raw/main/trainer_config.json). ## Citation ``` @inproceedings{ushio-etal-2022-generative, title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration", author = "Ushio, Asahi and Alva-Manchego, Fernando and Camacho-Collados, Jose", booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing", month = dec, year = "2022", address = "Abu Dhabi, U.A.E.", publisher = "Association for Computational Linguistics", } ```