asahi417 commited on
Commit
706696b
1 Parent(s): f77226a

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +73 -0
README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: ja
3
+ tags:
4
+ - question generation
5
+ license: cc-by-4.0
6
+ datasets:
7
+ - asahi417/qg_jaquad
8
+ metrics:
9
+ - bleu
10
+ - meteor
11
+ - rouge
12
+ - bertscore
13
+ widget:
14
+ - text: "ゾフィーは貴族出身ではあったが王族出身ではなく、ハプスブルク家の皇位継承者であるフランツ・フェルディナントとの結婚は貴賤結婚となった。皇帝フランツ・ヨーゼフは、2人の間に生まれた子孫が皇位を継がないことを条件として結婚を承認していた。視察が予定されている<hl>6月28日<hl>は2人の14回目の結婚記念日であった。"
15
+ example_title: "Question Generation Example 1"
16
+ - text: "『クマのプーさん』の物語はまず1925年12月24日、『イヴニング・ニュース』紙のクリスマス特集号に短編作品として掲載された。これは『クマのプーさん』の第一章にあたる作品で、このときだけは挿絵をJ.H.ダウドがつけている。その後作品10話と挿絵が整い、刊行に先駆けて「イーヨーの誕生日」のエピソードが1926年8月に『ロイヤルマガジン』に、同年10月9日に『ニューヨーク・イヴニング・ポスト』紙に掲載されたあと、同年10月14日にロンドンで(メシュエン社)、21日にニューヨークで(ダットン社)『クマのプーさん』が刊行された。前著『ぼくたちがとてもちいさかったころ』がすでに大きな成功を収めていたこともあり、イギリスでは初版は前著の7倍に当たる<hl>3万5000部<hl>が刷られた。他方のアメリカでもその年の終わりまでに15万部を売り上げている。ただし依然として人気のあった前著を売り上げで追い越すには数年の時間を要した。"
17
+ example_title: "Question Generation Example 2"
18
+ - text: "フェルメールの作品では、17世紀のオランダの画家、ヨハネス・フェルメールの作品について記述する。フェルメールの作品は、疑問作も含め<hl>30数点<hl>しか現存しない。現存作品はすべて油彩画で、版画、下絵、素描などは残っていない。以下には若干の疑問作も含め、37点の基本情報を記載し、各作品について略説する。収録順序、推定制作年代は『「フェルメールとその時代展」図録』による。日本語の作品タイトルについては、上掲図録のほか、『「フェルメール展」図録』、『フェルメール生涯と作品』による。便宜上「1650年代の作品」「1660年代の作品」「1670年代の作品」の3つの節を設けたが、フェルメールの作品には制作年代不明のものが多く、推定制作年代については研究者や文献によって若干の差がある。"
19
+ example_title: "Question Generation Example 3"
20
+ - text: "東大寺は、六宗兼学の場として世に広く知られるようになった。六宗とはすなわち、法相宗(法性宗)、三論宗、倶舎宗(薩婆多宗)、成実宗、華厳宗(花厳宗)、律宗のことであり、すべて<hl>中国<hl>から起こり、伝来したものであった。当時の宗とは、教団というよりは仏教教理の学派に近い。それゆえ、兼学の場ができたとも言える。この様な兼学の形態は、南都の寺院では広く見られたものである。この六宗兼学の場(後、真言、天台加わって八宗兼学の場)の性格は、現在の東大寺でも見られるが、中でも重んじられたのが、本尊の大仏の性格が華厳経の教えに則ったものであることからも分かるように、華厳宗である。"
21
+ example_title: "Question Generation Example 4"
22
+ pipeline_tag: text2text-generation
23
+ ---
24
+
25
+ # MBART LARGE CC25 fine-tuned for Japanese Question Generation
26
+ MBART LARGE CC25 Model fine-tuned on Japanese question generation dataset (JaQuAD) with an extensive hyper-parameter search.
27
+ - [Online Demo](https://autoqg.net/)
28
+ - [Project Repository](https://github.com/asahi417/lm-question-generation)
29
+
30
+ ## Overview
31
+
32
+ **Language model:** mbart-large-cc25
33
+ **Language:** Japanese (ja)
34
+ **Downstream-task:** Question Generation
35
+ **Training data:** JaQuAD
36
+ **Eval data:** JaQuAD
37
+ **Code:** See [our repository](https://github.com/asahi417/lm-question-generation)
38
+
39
+ ## Usage
40
+ ### In Transformers
41
+ ```python
42
+ from transformers import pipeline
43
+
44
+ model_path = 'asahi417/lmqg-mbart-large-cc25-jaquad'
45
+ pipe = pipeline("text2text-generation", model_path)
46
+
47
+ # Question Genration
48
+ paragraph = '東大寺は、六宗兼学の場として世に広く知られるようになった。六宗とはすなわち、法相宗(法性宗)、三論宗、倶舎宗(薩婆多宗)、成実宗、華厳宗(花厳宗)、律宗のことであり、すべて中国から起こり、伝来したものであった。'
49
+ # highlight an answer in the paragraph to generate question
50
+ answer = '中国'
51
+ highlight_token = '<hl>'
52
+ input_text = paragraph.replace(answer, '{0} {1} {0}'.format(highlight_token, answer))
53
+ generation = pipe(input_text)
54
+ print(generation)
55
+ >>> [{'generated_text': '六宗はどの国から起こったものでありますか。'}]
56
+ ```
57
+
58
+ ## Evaluations
59
+ Evaluation on the test set of [JaQuAD QG dataset](https://huggingface.co/datasets/asahi417/qg_jaquad).
60
+ All evaluations were done using our [evaluation script](https://github.com/asahi417/lm-question-generation).
61
+
62
+ | BLEU 4 | ROUGE L | METEOR | BERTScore |
63
+ | ------ | -------- | ------ | --------- |
64
+ | 32.53 | 52.66 | 30.57 | 81.77 |
65
+
66
+ - [metric file](https://huggingface.co/asahi417/lmqg-mbart-large-cc25-jaquad/raw/main/eval/metric.first.sentence.paragraph_answer.question.asahi417_qg_jaquad.default.json)
67
+
68
+ ## Fine-tuning Parameters
69
+ We ran grid search to find the best hyper-parameters and continued fine-tuning until the validation metric decrease.
70
+ The best hyper-parameters can be found [here](https://huggingface.co/asahi417/lmqg-mbart-large-cc25-jaquad/raw/main/trainer_config.json), and fine-tuning script is released in [our repository](https://github.com/asahi417/lm-question-generation).
71
+
72
+ ## Citation
73
+ TBA