asahi417 commited on
Commit
b0da56f
1 Parent(s): 85235e0

model update

Browse files
Files changed (26) hide show
  1. README.md +118 -0
  2. eval/{metric.first.answer.paragraph_answer.question.asahi417_qg_dequad.default.json → metric.first.answer.paragraph_answer.question.lmqg_qg_dequad.default.json} +0 -0
  3. eval/{metric.first.answer.paragraph_sentence.question.asahi417_qg_dequad.default.json → metric.first.answer.paragraph_sentence.question.lmqg_qg_dequad.default.json} +0 -0
  4. eval/{metric.first.answer.sentence_answer.question.asahi417_qg_dequad.default.json → metric.first.answer.sentence_answer.question.lmqg_qg_dequad.default.json} +0 -0
  5. eval/{metric.first.sentence.paragraph_answer.question.asahi417_qg_dequad.default.json → metric.first.sentence.paragraph_answer.question.lmqg_qg_dequad.default.json} +0 -0
  6. eval/{metric.first.sentence.paragraph_sentence.question.asahi417_qg_dequad.default.json → metric.first.sentence.paragraph_sentence.question.lmqg_qg_dequad.default.json} +0 -0
  7. eval/{metric.first.sentence.sentence_answer.question.asahi417_qg_dequad.default.json → metric.first.sentence.sentence_answer.question.lmqg_qg_dequad.default.json} +0 -0
  8. eval/{metric.last.sentence.paragraph_answer.question.asahi417_qg_dequad.default.json → metric.last.sentence.paragraph_answer.question.lmqg_qg_dequad.default.json} +0 -0
  9. eval/{metric.last.sentence.paragraph_sentence.question.asahi417_qg_dequad.default.json → metric.last.sentence.paragraph_sentence.question.lmqg_qg_dequad.default.json} +0 -0
  10. eval/{metric.last.sentence.sentence_answer.question.asahi417_qg_dequad.default.json → metric.last.sentence.sentence_answer.question.lmqg_qg_dequad.default.json} +0 -0
  11. eval/{metric.long.sentence.paragraph_answer.question.asahi417_qg_dequad.default.json → metric.long.sentence.paragraph_answer.question.lmqg_qg_dequad.default.json} +0 -0
  12. eval/{metric.long.sentence.paragraph_sentence.question.asahi417_qg_dequad.default.json → metric.long.sentence.paragraph_sentence.question.lmqg_qg_dequad.default.json} +0 -0
  13. eval/{metric.long.sentence.sentence_answer.question.asahi417_qg_dequad.default.json → metric.long.sentence.sentence_answer.question.lmqg_qg_dequad.default.json} +0 -0
  14. eval/{metric.middle.sentence.paragraph_answer.question.asahi417_qg_dequad.default.json → metric.middle.sentence.paragraph_answer.question.lmqg_qg_dequad.default.json} +0 -0
  15. eval/{metric.middle.sentence.paragraph_sentence.question.asahi417_qg_dequad.default.json → metric.middle.sentence.paragraph_sentence.question.lmqg_qg_dequad.default.json} +0 -0
  16. eval/{metric.middle.sentence.sentence_answer.question.asahi417_qg_dequad.default.json → metric.middle.sentence.sentence_answer.question.lmqg_qg_dequad.default.json} +0 -0
  17. eval/{metric.short.sentence.paragraph_answer.question.asahi417_qg_dequad.default.json → metric.short.sentence.paragraph_answer.question.lmqg_qg_dequad.default.json} +0 -0
  18. eval/{metric.short.sentence.paragraph_sentence.question.asahi417_qg_dequad.default.json → metric.short.sentence.paragraph_sentence.question.lmqg_qg_dequad.default.json} +0 -0
  19. eval/{metric.short.sentence.sentence_answer.question.asahi417_qg_dequad.default.json → metric.short.sentence.sentence_answer.question.lmqg_qg_dequad.default.json} +0 -0
  20. eval/{samples.test.hyp.paragraph_answer.question.asahi417_qg_dequad.default.txt → samples.test.hyp.paragraph_answer.question.lmqg_qg_dequad.default.txt} +0 -0
  21. eval/{samples.test.hyp.paragraph_sentence.question.asahi417_qg_dequad.default.txt → samples.test.hyp.paragraph_sentence.question.lmqg_qg_dequad.default.txt} +0 -0
  22. eval/{samples.test.hyp.sentence_answer.question.asahi417_qg_dequad.default.txt → samples.test.hyp.sentence_answer.question.lmqg_qg_dequad.default.txt} +0 -0
  23. eval/{samples.validation.hyp.paragraph_answer.question.asahi417_qg_dequad.default.txt → samples.validation.hyp.paragraph_answer.question.lmqg_qg_dequad.default.txt} +0 -0
  24. eval/{samples.validation.hyp.paragraph_sentence.question.asahi417_qg_dequad.default.txt → samples.validation.hyp.paragraph_sentence.question.lmqg_qg_dequad.default.txt} +0 -0
  25. eval/{samples.validation.hyp.sentence_answer.question.asahi417_qg_dequad.default.txt → samples.validation.hyp.sentence_answer.question.lmqg_qg_dequad.default.txt} +0 -0
  26. trainer_config.json +1 -1
README.md ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_dequad
13
+ pipeline_tag: text2text-generation
14
+ tags:
15
+ - question generation
16
+ - answer extraction
17
+ widget:
18
+ - text: "generate question: <hl> Beyonce <hl> further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records."
19
+ example_title: "Question Generation Example 1"
20
+ - text: "generate question: Beyonce further expanded her acting career, starring as blues singer <hl> Etta James <hl> in the 2008 musical biopic, Cadillac Records."
21
+ example_title: "Question Generation Example 2"
22
+ - text: "generate question: Beyonce further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, <hl> Cadillac Records <hl> ."
23
+ example_title: "Question Generation Example 3"
24
+ - 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."
25
+ example_title: "Answer Extraction Example 1"
26
+ - 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>"
27
+ example_title: "Answer Extraction Example 2"
28
+ model-index:
29
+ - name: lmqg/mt5-small-dequad-multitask
30
+ results:
31
+ - task:
32
+ name: Text2text Generation
33
+ type: text2text-generation
34
+ dataset:
35
+ name: lmqg/qg_dequad
36
+ type: default
37
+ args: default
38
+ metrics:
39
+ - name: BLEU4
40
+ type: bleu4
41
+ value: 0.008153318257935705
42
+ - name: ROUGE-L
43
+ type: rouge-l
44
+ value: 0.10153326763371277
45
+ - name: METEOR
46
+ type: meteor
47
+ value: 0.12181097136639749
48
+ - name: BERTScore
49
+ type: bertscore
50
+ value: 0.8038890473051649
51
+ - name: MoverScore
52
+ type: moverscore
53
+ value: 0.551016955735025
54
+ ---
55
+
56
+ # Language Models Fine-tuning on Question Generation: `lmqg/mt5-small-dequad-multitask`
57
+ This model is fine-tuned version of [google/mt5-small](https://huggingface.co/google/mt5-small) for question generation task on the
58
+ [lmqg/qg_dequad](https://huggingface.co/datasets/lmqg/qg_dequad) (dataset_name: default).
59
+ This model is fine-tuned on the answer extraction task as well as the question generation.
60
+
61
+ ### Overview
62
+ - **Language model:** [google/mt5-small](https://huggingface.co/google/mt5-small)
63
+ - **Language:** en
64
+ - **Training data:** [lmqg/qg_dequad](https://huggingface.co/datasets/lmqg/qg_dequad) (default)
65
+ - **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
66
+ - **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
67
+ - **Paper:** [TBA](TBA)
68
+
69
+ ### Usage
70
+ ```python
71
+
72
+ from transformers import pipeline
73
+
74
+ model_path = 'lmqg/mt5-small-dequad-multitask'
75
+ pipe = pipeline("text2text-generation", model_path)
76
+
77
+ # Question Generation
78
+ input_text = 'generate question: <hl> Beyonce <hl> further expanded her acting career, starring as blues singer Etta James in the 2008 musical biopic, Cadillac Records.'
79
+ question = pipe(input_text)
80
+ # Answer Extraction
81
+ answer = 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.')
82
+ ```
83
+
84
+ ## Evaluation Metrics
85
+
86
+
87
+ ### Metrics
88
+
89
+ | Dataset | Type | BLEU4 | ROUGE-L | METEOR | BERTScore | MoverScore | Link |
90
+ |:--------|:-----|------:|--------:|-------:|----------:|-----------:|-----:|
91
+ | [lmqg/qg_dequad](https://huggingface.co/datasets/lmqg/qg_dequad) | default | 0.008153318257935705 | 0.10153326763371277 | 0.12181097136639749 | 0.8038890473051649 | 0.551016955735025 | [link](https://huggingface.co/lmqg/mt5-small-dequad-multitask/raw/main/eval/metric.first.sentence.paragraph_answer.question.lmqg_qg_dequad.default.json) |
92
+
93
+
94
+
95
+
96
+ ## Training hyperparameters
97
+
98
+ The following hyperparameters were used during fine-tuning:
99
+ - dataset_path: lmqg/qg_dequad
100
+ - dataset_name: default
101
+ - input_types: ['paragraph_answer', 'paragraph_sentence']
102
+ - output_types: ['question', 'answer']
103
+ - prefix_types: ['qg', 'ae']
104
+ - model: google/mt5-small
105
+ - max_length: 512
106
+ - max_length_output: 32
107
+ - epoch: 15
108
+ - batch: 16
109
+ - lr: 0.001
110
+ - fp16: False
111
+ - random_seed: 1
112
+ - gradient_accumulation_steps: 4
113
+ - label_smoothing: 0.15
114
+
115
+ The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mt5-small-dequad-multitask/raw/main/trainer_config.json).
116
+
117
+ ## Citation
118
+ TBA
eval/{metric.first.answer.paragraph_answer.question.asahi417_qg_dequad.default.json → metric.first.answer.paragraph_answer.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.first.answer.paragraph_sentence.question.asahi417_qg_dequad.default.json → metric.first.answer.paragraph_sentence.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.first.answer.sentence_answer.question.asahi417_qg_dequad.default.json → metric.first.answer.sentence_answer.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.first.sentence.paragraph_answer.question.asahi417_qg_dequad.default.json → metric.first.sentence.paragraph_answer.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.first.sentence.paragraph_sentence.question.asahi417_qg_dequad.default.json → metric.first.sentence.paragraph_sentence.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.first.sentence.sentence_answer.question.asahi417_qg_dequad.default.json → metric.first.sentence.sentence_answer.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.last.sentence.paragraph_answer.question.asahi417_qg_dequad.default.json → metric.last.sentence.paragraph_answer.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.last.sentence.paragraph_sentence.question.asahi417_qg_dequad.default.json → metric.last.sentence.paragraph_sentence.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.last.sentence.sentence_answer.question.asahi417_qg_dequad.default.json → metric.last.sentence.sentence_answer.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.long.sentence.paragraph_answer.question.asahi417_qg_dequad.default.json → metric.long.sentence.paragraph_answer.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.long.sentence.paragraph_sentence.question.asahi417_qg_dequad.default.json → metric.long.sentence.paragraph_sentence.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.long.sentence.sentence_answer.question.asahi417_qg_dequad.default.json → metric.long.sentence.sentence_answer.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.middle.sentence.paragraph_answer.question.asahi417_qg_dequad.default.json → metric.middle.sentence.paragraph_answer.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.middle.sentence.paragraph_sentence.question.asahi417_qg_dequad.default.json → metric.middle.sentence.paragraph_sentence.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.middle.sentence.sentence_answer.question.asahi417_qg_dequad.default.json → metric.middle.sentence.sentence_answer.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.short.sentence.paragraph_answer.question.asahi417_qg_dequad.default.json → metric.short.sentence.paragraph_answer.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.short.sentence.paragraph_sentence.question.asahi417_qg_dequad.default.json → metric.short.sentence.paragraph_sentence.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{metric.short.sentence.sentence_answer.question.asahi417_qg_dequad.default.json → metric.short.sentence.sentence_answer.question.lmqg_qg_dequad.default.json} RENAMED
File without changes
eval/{samples.test.hyp.paragraph_answer.question.asahi417_qg_dequad.default.txt → samples.test.hyp.paragraph_answer.question.lmqg_qg_dequad.default.txt} RENAMED
File without changes
eval/{samples.test.hyp.paragraph_sentence.question.asahi417_qg_dequad.default.txt → samples.test.hyp.paragraph_sentence.question.lmqg_qg_dequad.default.txt} RENAMED
File without changes
eval/{samples.test.hyp.sentence_answer.question.asahi417_qg_dequad.default.txt → samples.test.hyp.sentence_answer.question.lmqg_qg_dequad.default.txt} RENAMED
File without changes
eval/{samples.validation.hyp.paragraph_answer.question.asahi417_qg_dequad.default.txt → samples.validation.hyp.paragraph_answer.question.lmqg_qg_dequad.default.txt} RENAMED
File without changes
eval/{samples.validation.hyp.paragraph_sentence.question.asahi417_qg_dequad.default.txt → samples.validation.hyp.paragraph_sentence.question.lmqg_qg_dequad.default.txt} RENAMED
File without changes
eval/{samples.validation.hyp.sentence_answer.question.asahi417_qg_dequad.default.txt → samples.validation.hyp.sentence_answer.question.lmqg_qg_dequad.default.txt} RENAMED
File without changes
trainer_config.json CHANGED
@@ -1 +1 @@
1
- {"dataset_path": "asahi417/qg_dequad", "dataset_name": "default", "input_types": ["paragraph_answer", "paragraph_sentence"], "output_types": ["question", "answer"], "prefix_types": ["qg", "ae"], "model": "google/mt5-small", "max_length": 512, "max_length_output": 32, "epoch": 15, "batch": 16, "lr": 0.001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 4, "label_smoothing": 0.15}
 
1
+ {"dataset_path": "lmqg/qg_dequad", "dataset_name": "default", "input_types": ["paragraph_answer", "paragraph_sentence"], "output_types": ["question", "answer"], "prefix_types": ["qg", "ae"], "model": "google/mt5-small", "max_length": 512, "max_length_output": 32, "epoch": 15, "batch": 16, "lr": 0.001, "fp16": false, "random_seed": 1, "gradient_accumulation_steps": 4, "label_smoothing": 0.15}