đ BERT large Japanese (unidic-lite with whole word masking, jawiki-20200831)
This is a pre - trained BERT model for Japanese texts, offering advanced language processing capabilities.
đ Quick Start
This is a BERT model pretrained on texts in the Japanese language. This version of the model processes input texts with word - level tokenization based on the Unidic 2.1.2 dictionary (available in [unidic - lite](https://pypi.org/project/unidic - lite/) package), followed by the WordPiece subword tokenization. Additionally, the model is trained with the whole word masking enabled for the masked language modeling (MLM) objective. The codes for the pretraining are available at [cl - tohoku/bert - japanese](https://github.com/cl - tohoku/bert - japanese/tree/v2.0).
⨠Features
- The model architecture is the same as the original BERT large model; 24 layers, 1024 dimensions of hidden states, and 16 attention heads.
- The texts are first tokenized by MeCab with the Unidic 2.1.2 dictionary and then split into subwords by the WordPiece algorithm. The vocabulary size is 32768.
- For training of the MLM (masked language modeling) objective, whole word masking is introduced, where all of the subword tokens corresponding to a single word (tokenized by MeCab) are masked at once.
đ Documentation
Model architecture
The model architecture is the same as the original BERT large model; 24 layers, 1024 dimensions of hidden states, and 16 attention heads.
Training Data
The models are trained on the Japanese version of Wikipedia. The training corpus is generated from the Wikipedia Cirrussearch dump file as of August 31, 2020. The generated corpus files are 4.0GB in total, containing approximately 30M sentences. We used the MeCab morphological parser with [mecab - ipadic - NEologd](https://github.com/neologd/mecab - ipadic - neologd) dictionary to split texts into sentences.
Tokenization
The texts are first tokenized by MeCab with the Unidic 2.1.2 dictionary and then split into subwords by the WordPiece algorithm. The vocabulary size is 32768. We used fugashi
and [unidic - lite
](https://github.com/polm/unidic - lite) packages for the tokenization.
Training
The models are trained with the same configuration as the original BERT; 512 tokens per instance, 256 instances per batch, and 1M training steps. For training of the MLM (masked language modeling) objective, we introduced whole word masking in which all of the subword tokens corresponding to a single word (tokenized by MeCab) are masked at once. For training of each model, we used a v3 - 8 instance of Cloud TPUs provided by TensorFlow Research Cloud program. The training took about 5 days to finish.
đ License
The pretrained models are distributed under the terms of the [Creative Commons Attribution - ShareAlike 3.0](https://creativecommons.org/licenses/by - sa/3.0/).
đ§ Technical Details
Property |
Details |
Model Type |
BERT large Japanese (unidic - lite with whole word masking, jawiki - 20200831) |
Training Data |
Japanese version of Wikipedia (generated from the Wikipedia Cirrussearch dump file as of August 31, 2020, about 4.0GB, approximately 30M sentences) |
Tokenization |
First tokenized by MeCab with Unidic 2.1.2 dictionary, then split into subwords by WordPiece algorithm, vocabulary size 32768, using fugashi and unidic - lite packages |
Training Configuration |
512 tokens per instance, 256 instances per batch, 1M training steps, whole word masking for MLM objective |
Hardware |
v3 - 8 instance of Cloud TPUs provided by TensorFlow Research Cloud program |
Training Time |
About 5 days |
Acknowledgments
This model is trained with Cloud TPUs provided by TensorFlow Research Cloud program.