StellarMilk commited on
Commit
35d61a2
1 Parent(s): 315ee13

commit files to HF hub

Browse files
README.md ADDED
@@ -0,0 +1,114 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ - StellarMilk/squad_newsqa
13
+ pipeline_tag: text2text-generation
14
+ tags:
15
+ - questions and answers generation
16
+ widget:
17
+ - text: "generate question and answer: Beyonce further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records."
18
+ example_title: "Questions & Answers Generation Example 1"
19
+ model-index:
20
+ - name: StellarMilk/t5-small-squad-newsqa-qag-trained
21
+ results:
22
+ - task:
23
+ name: Text2text Generation
24
+ type: text2text-generation
25
+ dataset:
26
+ name: StellarMilk/squad_newsqa
27
+ type: default
28
+ args: default
29
+ metrics:
30
+ - name: BLEU4 (Question & Answer Generation)
31
+ type: bleu4_question_answer_generation
32
+ value: 5.67
33
+ ---
34
+
35
+ # Model Card of `StellarMilk/t5-small-squad-newsqa-qag-trained`
36
+ This model is fine-tuned version of [t5-small](https://huggingface.co/t5-small) for question & answer pair generation task on the [StellarMilk/squad_newsqa](https://huggingface.co/datasets/StellarMilk/squad_newsqa) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
37
+
38
+
39
+ ### Overview
40
+ - **Language model:** [t5-small](https://huggingface.co/t5-small)
41
+ - **Language:** en
42
+ - **Training data:** [StellarMilk/squad_newsqa](https://huggingface.co/datasets/StellarMilk/squad_newsqa) (default)
43
+ - **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
44
+ - **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
45
+ - **Paper:** [https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)
46
+
47
+ ### Usage
48
+ - With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
49
+ ```python
50
+ from lmqg import TransformersQG
51
+
52
+ # initialize model
53
+ model = TransformersQG(language="en", model="StellarMilk/t5-small-squad-newsqa-qag-trained")
54
+
55
+ # model prediction
56
+ question_answer_pairs = model.generate_qa("William Turner was an English painter who specialised in watercolour landscapes")
57
+
58
+ ```
59
+
60
+ - With `transformers`
61
+ ```python
62
+ from transformers import pipeline
63
+
64
+ pipe = pipeline("text2text-generation", "StellarMilk/t5-small-squad-newsqa-qag-trained")
65
+ output = pipe("generate question and answer: Beyonce further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records.")
66
+
67
+ ```
68
+
69
+ ## Evaluation
70
+
71
+
72
+ - ***Metric (Question & Answer Generation)***: [raw metric file](https://huggingface.co/StellarMilk/t5-small-squad-newsqa-qag-trained/raw/main/eval/metric.first.answer.paragraph.questions_answers.StellarMilk_squad_newsqa.default.json)
73
+
74
+ | Score | Type | Dataset |
75
+ |---------|--------|-----------|
76
+
77
+
78
+
79
+ ## Training hyperparameters
80
+
81
+ The following hyperparameters were used during fine-tuning:
82
+ - dataset_path: StellarMilk/squad_newsqa
83
+ - dataset_name: default
84
+ - input_types: ['paragraph']
85
+ - output_types: ['questions_answers']
86
+ - prefix_types: ['qag']
87
+ - model: t5-small
88
+ - max_length: 512
89
+ - max_length_output: 512
90
+ - epoch: 3
91
+ - batch: 2
92
+ - lr: 1e-05
93
+ - fp16: False
94
+ - random_seed: 1
95
+ - gradient_accumulation_steps: 2
96
+ - label_smoothing: 0.15
97
+
98
+ The full configuration can be found at [fine-tuning config file](https://huggingface.co/StellarMilk/t5-small-squad-newsqa-qag-trained/raw/main/trainer_config.json).
99
+
100
+ ## Citation
101
+ ```
102
+ @inproceedings{ushio-etal-2022-generative,
103
+ title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
104
+ author = "Ushio, Asahi and
105
+ Alva-Manchego, Fernando and
106
+ Camacho-Collados, Jose",
107
+ booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
108
+ month = dec,
109
+ year = "2022",
110
+ address = "Abu Dhabi, U.A.E.",
111
+ publisher = "Association for Computational Linguistics",
112
+ }
113
+
114
+ ```
eval/metric.first.answer.paragraph.questions_answers.StellarMilk_squad_newsqa.default.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"validation": {"Bleu_1": 0.2931779573819033, "Bleu_2": 0.1679642439217249, "Bleu_3": 0.09900018031960674, "Bleu_4": 0.0658890416713825}, "test": {"Bleu_1": 0.27017063100588157, "Bleu_2": 0.15127545074771495, "Bleu_3": 0.08683136335169285, "Bleu_4": 0.05672527099123468}}
eval/samples.test.hyp.paragraph.questions_answers.StellarMilk_squad_newsqa.default.txt ADDED
The diff for this file is too large to render. See raw diff
 
eval/samples.validation.hyp.paragraph.questions_answers.StellarMilk_squad_newsqa.default.txt ADDED
The diff for this file is too large to render. See raw diff
 
trainer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"dataset_path": "StellarMilk/squad_newsqa", "dataset_name": "default", "input_types": ["paragraph"], "output_types": ["questions_answers"], "prefix_types": ["qag"], "model": "t5-small", "max_length": 512, "max_length_output": 512, "epoch": 3, "batch": 2, "lr": 1e-05, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 2, "label_smoothing": 0.15}