asahi417 commited on
Commit
ac3114f
1 Parent(s): a91b587

model update

Browse files
Files changed (1) hide show
  1. README.md +22 -10
README.md CHANGED
@@ -53,14 +53,14 @@ This model is fine-tuned version of [facebook/mbart-large-cc25](https://huggingf
53
  [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
54
 
55
 
56
- Please cite our paper if you use the model ([TBA](TBA)).
57
 
58
  ```
59
 
60
  @inproceedings{ushio-etal-2022-generative,
61
- title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration: {A} {U}nified {B}enchmark and {E}valuation",
62
  author = "Ushio, Asahi and
63
- Alva-Manchego, Fernando and
64
  Camacho-Collados, Jose",
65
  booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
66
  month = dec,
@@ -77,17 +77,27 @@ Please cite our paper if you use the model ([TBA](TBA)).
77
  - **Training data:** [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) (default)
78
  - **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
79
  - **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
80
- - **Paper:** [TBA](TBA)
81
 
82
  ### Usage
 
83
  ```python
84
 
85
- from transformers import pipeline
 
 
 
 
 
 
86
 
87
- model_path = 'lmqg/mbart-large-cc25-jaquad'
88
- pipe = pipeline("text2text-generation", model_path)
89
 
90
- # Question Generation
 
 
 
91
  question = pipe('ゾフィーは貴族出身ではあったが王族出身ではなく、ハプスブルク家の皇位継承者であるフランツ・フェルディナントとの結婚は貴賤結婚となった。皇帝フランツ・ヨーゼフは、2人の間に生まれた子孫が皇位を継がないことを条件として結婚を承認していた。視察が予定されている<hl>6月28日<hl>は2人の14回目の結婚記念日であった。')
92
 
93
  ```
@@ -126,11 +136,12 @@ The following hyperparameters were used during fine-tuning:
126
  The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mbart-large-cc25-jaquad/raw/main/trainer_config.json).
127
 
128
  ## Citation
 
129
 
130
  @inproceedings{ushio-etal-2022-generative,
131
- title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration: {A} {U}nified {B}enchmark and {E}valuation",
132
  author = "Ushio, Asahi and
133
- Alva-Manchego, Fernando and
134
  Camacho-Collados, Jose",
135
  booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
136
  month = dec,
@@ -139,3 +150,4 @@ The full configuration can be found at [fine-tuning config file](https://hugging
139
  publisher = "Association for Computational Linguistics",
140
  }
141
 
 
 
53
  [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) (dataset_name: default) via [`lmqg`](https://github.com/asahi417/lm-question-generation).
54
 
55
 
56
+ Please cite our paper if you use the model ([https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)).
57
 
58
  ```
59
 
60
  @inproceedings{ushio-etal-2022-generative,
61
+ title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
62
  author = "Ushio, Asahi and
63
+ Alva-Manchego, Fernando and
64
  Camacho-Collados, Jose",
65
  booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
66
  month = dec,
 
77
  - **Training data:** [lmqg/qg_jaquad](https://huggingface.co/datasets/lmqg/qg_jaquad) (default)
78
  - **Online Demo:** [https://autoqg.net/](https://autoqg.net/)
79
  - **Repository:** [https://github.com/asahi417/lm-question-generation](https://github.com/asahi417/lm-question-generation)
80
+ - **Paper:** [https://arxiv.org/abs/2210.03992](https://arxiv.org/abs/2210.03992)
81
 
82
  ### Usage
83
+ - With [`lmqg`](https://github.com/asahi417/lm-question-generation#lmqg-language-model-for-question-generation-)
84
  ```python
85
 
86
+ from lmqg import TransformersQG
87
+ # initialize model
88
+ model = TransformersQG(language='ja', model='lmqg/mbart-large-cc25-jaquad')
89
+ # model prediction
90
+ question = model.generate_q(list_context=["フェルメールの作品では、17世紀のオランダの画家、ヨハネス・フェルメールの作品について記述する。フェルメールの作品は、疑問作も含め30数点しか現存しない。現存作品はすべて油彩画で、版画、下絵、素描などは残っていない。"], list_answer=["30数点"])
91
+
92
+ ```
93
 
94
+ - With `transformers`
95
+ ```python
96
 
97
+ from transformers import pipeline
98
+ # initialize model
99
+ pipe = pipeline("text2text-generation", 'lmqg/mbart-large-cc25-jaquad')
100
+ # question generation
101
  question = pipe('ゾフィーは貴族出身ではあったが王族出身ではなく、ハプスブルク家の皇位継承者であるフランツ・フェルディナントとの結婚は貴賤結婚となった。皇帝フランツ・ヨーゼフは、2人の間に生まれた子孫が皇位を継がないことを条件として結婚を承認していた。視察が予定されている<hl>6月28日<hl>は2人の14回目の結婚記念日であった。')
102
 
103
  ```
 
136
  The full configuration can be found at [fine-tuning config file](https://huggingface.co/lmqg/mbart-large-cc25-jaquad/raw/main/trainer_config.json).
137
 
138
  ## Citation
139
+ ```
140
 
141
  @inproceedings{ushio-etal-2022-generative,
142
+ title = "{G}enerative {L}anguage {M}odels for {P}aragraph-{L}evel {Q}uestion {G}eneration",
143
  author = "Ushio, Asahi and
144
+ Alva-Manchego, Fernando and
145
  Camacho-Collados, Jose",
146
  booktitle = "Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing",
147
  month = dec,
 
150
  publisher = "Association for Computational Linguistics",
151
  }
152
 
153
+ ```