Update README.md
Browse files
README.md
CHANGED
@@ -1,7 +1,52 @@
|
|
1 |
---
|
2 |
language: ja
|
3 |
widget:
|
4 |
-
- text:
|
5 |
---
|
6 |
|
7 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
language: ja
|
3 |
widget:
|
4 |
+
- text: X が 部屋 で ゲーム するxEffect
|
5 |
---
|
6 |
|
7 |
+
# COMET-GPT2 ja
|
8 |
+
|
9 |
+
Finetuned GPT-2 on [ATOMIC ja](https://github.com/nlp-waseda/comet-atomic-ja) using a causal language modeling (CLM) objective.
|
10 |
+
It was introduced in this paper.
|
11 |
+
|
12 |
+
### How to use
|
13 |
+
|
14 |
+
You can use this model directly with a pipeline for text generation.
|
15 |
+
Since the generation relies on some randomness, we set a seed for reproducibility:
|
16 |
+
|
17 |
+
```python
|
18 |
+
>>> from transformers import pipeline, set_seed
|
19 |
+
>>> generator = pipeline('text-generation', model='nlp-waseda/comet-gpt2-small-japanese')
|
20 |
+
>>> set_seed(42)
|
21 |
+
>>> generator('X が 大学 で 勉強 するxEffect', max_length=30, num_return_sequences=5, do_sample=True)
|
22 |
+
|
23 |
+
[{'generated_text': 'X が 大学 で 勉強 するxEffect X が 単位 を 取る'},
|
24 |
+
{'generated_text': 'X が 大学 で 勉強 するxEffect X が 就職 する'},
|
25 |
+
{'generated_text': 'X が 大学 で 勉強 するxEffect X が テスト で 良い 点 を とる'},
|
26 |
+
{'generated_text': 'X が 大学 で 勉強 するxEffect X が 単位 を 落とす'},
|
27 |
+
{'generated_text': 'X が 大学 で 勉強 するxEffect X が 資 格 を 取る'}]
|
28 |
+
```
|
29 |
+
|
30 |
+
### Preprocessing
|
31 |
+
|
32 |
+
The texts are segmented into words using Juman++ and tokenized using SentencePiece.
|
33 |
+
|
34 |
+
## Evaluation results
|
35 |
+
|
36 |
+
The model achieves the following results:
|
37 |
+
|
38 |
+
| BLEU | BERTScore |
|
39 |
+
|:-----:|:---------:|
|
40 |
+
| 43.61 | 87.56 |
|
41 |
+
|
42 |
+
### BibTeX entry and citation info
|
43 |
+
|
44 |
+
```bibtex
|
45 |
+
@InProceedings{ide_nlp2023_event,
|
46 |
+
author = "井手竜也 and 村田栄樹 and 堀尾海斗 and 河原大輔 and 山崎天 and 李聖哲 and 新里顕大 and 佐藤敏紀",
|
47 |
+
title = "人間と言語モデルに対するプロンプトを用いたゼロからのイベント常識知識グラフ構築",
|
48 |
+
booktitle = "言語処理学会第29回年次大会",
|
49 |
+
year = "2023",
|
50 |
+
url = ""
|
51 |
+
}
|
52 |
+
```
|