Downloads · 30 days
256
3% of all-time downloads
cinmodel/electra-small-japanese-generator
electra-small-japanese-generator is a fill-mask model from cinmodel. Use it when you need the model to fill a missing word. It is set up for transformers.
We provide a Japanese ELECTRA-Small model, as described in ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators.
Downloads · 30 days
256
3% of all-time downloads
All-time downloads
8.6K
Public
Repo size
110 MB
Likes
2
Public
Click a slice to open those files.
.bin55 MB · 100%
From the Hugging Face model README
We provide a Japanese ELECTRA-Small model, as described in ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators.
Our pretraining process employs subword units derived from the Japanese Wikipedia, using the Byte-Pair Encoding method and building on an initial tokenization with mecab-ipadic-NEologd. For optimal performance, please take care to set your MeCab dictionary appropriately.
# ELECTRA-small generator usage
from transformers import BertJapaneseTokenizer, ElectraForMaskedLM
tokenizer = BertJapaneseTokenizer.from_pretrained('Cinnamon/electra-small-japanese-generator', mecab_kwargs={"mecab_option": "-d /usr/lib/x86_64-linux-gnu/mecab/dic/mecab-ipadic-neologd"})
model = ElectraForMaskedLM.from_pretrained('Cinnamon/electra-small-japanese-generator')