🚀 MacBERT
MacBERTは、新しいMLM as correction事前学習タスクを持つ改良型のBERTです。このタスクにより、事前学習とファインチューニングの不一致を軽減しています。
🚀 クイックスタート
このリポジトリには、論文「Revisiting Pre-trained Models for Chinese Natural Language Processing」のリソースが含まれています。この論文は、Findings of EMNLPに掲載されます。カメラレディな論文は、ACL Anthology または arXiv pre-print を通じて読むことができます。
Revisiting Pre-trained Models for Chinese Natural Language Processing
Yiming Cui, Wanxiang Che, Ting Liu, Bing Qin, Shijin Wang, Guoping Hu
また、以下のプロジェクトにも興味を持つかもしれません。
- Chinese BERTシリーズ: https://github.com/ymcui/Chinese-BERT-wwm
- Chinese ELECTRA: https://github.com/ymcui/Chinese-ELECTRA
- Chinese XLNet: https://github.com/ymcui/Chinese-XLNet
- 知識蒸留ツールキット - TextBrewer: https://github.com/airaria/TextBrewer
HFLによるその他のリソース: https://github.com/ymcui/HFL-Anthology
✨ 主な機能
MacBERTの概要
MacBERTは、新しい事前学習タスクであるMLM as correctionを用いた改良型BERTです。これにより、事前学習とファインチューニングの間のギャップを軽減します。
事前学習タスクの改良
通常の[MASK]トークンを使用する代わりに、類似単語を使用してマスキングを行います。類似単語は、Synonyms toolkit (Wang and Hu, 2017)を用いて取得されます。このツールキットは、word2vec (Mikolov et al., 2013)の類似度計算に基づいています。N-gramをマスクする場合、個々の単語に対して類似単語を見つけます。類似単語が存在しない場合は、ランダムな単語置換にフォールバックします。
事前学習タスクの例
|
例 |
元の文 |
we use a language model to predict the probability of the next word. |
MLM |
we use a language [M] to [M] ##di ##ct the pro [M] ##bility of the next word . |
単語全体のマスキング |
we use a language [M] to [M] [M] [M] the [M] [M] [M] of the next word . |
N-gramマスキング |
we use a [M] [M] to [M] [M] [M] the [M] [M] [M] [M] [M] next word . |
MLM as correction |
we use a text system to ca ##lc ##ulate the po ##si ##bility of the next word . |
その他の技術
- 単語全体のマスキング (Whole Word Masking, WWM)
- N-gramマスキング
- 文順予測 (Sentence-Order Prediction, SOP)
アーキテクチャの互換性
MacBERTは、主なニューラルアーキテクチャに違いがないため、元のBERTと直接置き換えることができます。
📄 ライセンス
このプロジェクトは、Apache-2.0ライセンスの下で公開されています。詳細はLICENSEを参照してください。
🔧 技術詳細
詳細な技術情報については、論文「Revisiting Pre-trained Models for Chinese Natural Language Processing」を参照してください。
引用
このリソースや論文が役に立った場合は、以下の引用を論文に含めていただけると幸いです。
- https://arxiv.org/abs/2004.13922
@inproceedings{cui-etal-2020-revisiting,
title = "Revisiting Pre-Trained Models for {C}hinese Natural Language Processing",
author = "Cui, Yiming and
Che, Wanxiang and
Liu, Ting and
Qin, Bing and
Wang, Shijin and
Hu, Guoping",
booktitle = "Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Findings",
month = nov,
year = "2020",
address = "Online",
publisher = "Association for Computational Linguistics",
url = "https://www.aclweb.org/anthology/2020.findings-emnlp.58",
pages = "657--668",
}