--- language: ja widget: - text: X が 部屋 で ゲーム するxEffect --- # COMET-GPT2 ja Finetuned GPT-2 on [ATOMIC ja](https://github.com/nlp-waseda/comet-atomic-ja) using a causal language modeling (CLM) objective. It was introduced in [this paper](https://www.anlp.jp/proceedings/annual_meeting/2023/pdf_dir/B2-5.pdf). ### How to use You can use this model directly with a pipeline for text generation. Since the generation relies on some randomness, we set a seed for reproducibility: ```python >>> from transformers import pipeline, set_seed >>> generator = pipeline('text-generation', model='nlp-waseda/comet-gpt2-small-japanese') >>> set_seed(42) >>> generator('X が 大学 で 勉強 するxEffect', max_length=30, num_return_sequences=5, do_sample=True) [{'generated_text': 'X が 大学 で 勉強 するxEffect X が 単位 を 取る'}, {'generated_text': 'X が 大学 で 勉強 するxEffect X が 就職 する'}, {'generated_text': 'X が 大学 で 勉強 するxEffect X が テスト で 良い 点 を とる'}, {'generated_text': 'X が 大学 で 勉強 するxEffect X が 単位 を 落とす'}, {'generated_text': 'X が 大学 で 勉強 するxEffect X が 資 格 を 取る'}] ``` ### Preprocessing The texts are segmented into words using Juman++ and tokenized using SentencePiece. ## Evaluation results The model achieves the following results: | BLEU | BERTScore | |:-----:|:---------:| | 43.61 | 87.56 | ### BibTeX entry and citation info ```bibtex @InProceedings{ide_nlp2023_event, author = "井手竜也 and 村田栄樹 and 堀尾海斗 and 河原大輔 and 山崎天 and 李聖哲 and 新里顕大 and 佐藤敏紀", title = "人間と言語モデルに対するプロンプトを用いたゼロからのイベント常識知識グラフ構築", booktitle = "言語処理学会第29回年次大会", year = "2023", url = "https://www.anlp.jp/proceedings/annual_meeting/2023/pdf_dir/B2-5.pdf" note = "in Japanese" } ```