Downloads · 30 days
68
65% of all-time downloads
nptdat/bert-japanese-12M
bert-japanese-12M is a fill-mask model from nptdat. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as apache-2.0.
- The bert-japanese-12M model is a transformer-based model with BERT architecture, which is designed to be used on Japanese text. In addition, it is small enough to be run on consumer low-end GPUs, or even CPUs with a…
Downloads · 30 days
68
65% of all-time downloads
All-time downloads
104
Public
Repo size
217 MB
Likes
0
Public
Click a slice to open those files.
.h587.7 MB · 53%
From the Hugging Face model README
bert-japanese-12M model is a transformer-based model with BERT architecture, which is designed to be used on Japanese text. In addition, it is small enough to be run on consumer low-end GPUs, or even CPUs with acceptable latency.from transformers import AutoTokenizer, AutoModelForMaskedLM, pipeline
MODEL_PATH = "nptdat/bert-japanese-12M"
model = AutoModelForMaskedLM.from_pretrained(MODEL_PATH, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
pipe = pipeline("fill-mask", model=model, tokenizer=tokenizer)
text = "東京は[MASK]の首都です。"
pipe(text)
specific domain, where small models can work welllow inference cost and low latency are necessaryfine-tune the model on downstream task before usingThe following hyperparameters were used during training on both datasets
This is the results of the 2nd phase, when the model was trained and validated on Japanese Wikipedia text.
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 2.8074 | 0.1666 | 25000 | 2.7266 | 0.5189 |
| 2.6942 | 0.3333 | 50000 | 2.5879 | 0.5367 |
| 2.6153 | 0.4999 | 75000 | 2.5156 | 0.5459 |
| 2.5805 | 0.6666 | 100000 | 2.4707 | 0.5522 |
| 2.5546 | 0.8332 | 125000 | 2.4414 | 0.5560 |
| 2.5435 | 0.9999 | 150000 | 2.4297 | 0.5574 |
| 2.6841 | 1.0000 | 150019 | 2.4316 | 0.5575 |