Downloads · 30 days
20.2K
7% of all-time downloads
ku-nlp/deberta-v2-tiny-japanese-char-wwm
deberta-v2-tiny-japanese-char-wwm is a fill-mask model from ku-nlp. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as cc-by-sa-4.0.
This is a Japanese DeBERTa V2 tiny model pre-trained on Japanese Wikipedia, the Japanese portion of CC-100, and the Japanese portion of OSCAR. This model is trained with character-level tokenization and whole word mas…
Downloads · 30 days
20.2K
7% of all-time downloads
All-time downloads
302K
Public
Parameters
10.1M
80.7 MB on disk
Likes
0
Public
Click a slice to open those files.
.bin40.3 MB · 50%
How the weights are stored.
F3210.1M · 100%
From the Hugging Face model README
This is a Japanese DeBERTa V2 tiny model pre-trained on Japanese Wikipedia, the Japanese portion of CC-100, and the Japanese portion of OSCAR. This model is trained with character-level tokenization and whole word masking.
You can use this model for masked language modeling as follows:
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained('ku-nlp/deberta-v2-tiny-japanese-char-wwm')
model = AutoModelForMaskedLM.from_pretrained('ku-nlp/deberta-v2-tiny-japanese-char-wwm')
sentence = '京都大学で自然言語処理を[MASK][MASK]する。'
encoding = tokenizer(sentence, return_tensors='pt')
...
You can also fine-tune this model on downstream tasks.
There is no need to tokenize texts in advance, and you can give raw texts to the tokenizer. The texts are tokenized into character-level tokens by sentencepiece.
We used the following corpora for pre-training:
Note that we filtered out documents annotated with "header", "footer", or "noisy" tags in OSCAR. Also note that Japanese Wikipedia was duplicated 10 times to make the total size of the corpus comparable to that of CC-100 and OSCAR. As a result, the total size of the training data is 171GB.
We first segmented texts in the corpora into words using Juman++ 2.0.0-rc3 for whole word masking. Then, we built a sentencepiece model with 22,012 tokens including all characters that appear in the training corpus.
We tokenized raw corpora into character-level subwords using the sentencepiece model and trained the Japanese DeBERTa model using transformers library. The training took one day using 8 NVIDIA A100-SXM4-40GB GPUs.
The following hyperparameters were used during pre-training:
The accuracy of the trained model on the masked language modeling task was 0.499. The evaluation set consists of 5,000 randomly sampled documents from each of the training corpora.
This work was supported by Joint Usage/Research Center for Interdisciplinary Large-scale Information Infrastructures (JHPCN) through General Collaboration Project no. jh221004, "Developing a Platform for Constructing and Sharing of Large-Scale Japanese Language Models". For training models, we used the mdx: a platform for the data-driven future.