Instructions to use tohoku-nlp/bert-base-japanese-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tohoku-nlp/bert-base-japanese-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="tohoku-nlp/bert-base-japanese-v2")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("tohoku-nlp/bert-base-japanese-v2") model = AutoModelForMaskedLM.from_pretrained("tohoku-nlp/bert-base-japanese-v2", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Commit ·
c89b4e4
1
Parent(s): bc6c8c8
First commit of the bert-base-japanese-v2 model and tokenizer.
Browse files- config.json +13 -0
- pytorch_model.bin +3 -0
- tf_model.h5 +3 -0
- tokenizer_config.json +8 -0
- vocab.txt +0 -0
config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"attention_probs_dropout_prob": 0.1,
|
| 3 |
+
"hidden_act": "gelu",
|
| 4 |
+
"hidden_dropout_prob": 0.1,
|
| 5 |
+
"hidden_size": 768,
|
| 6 |
+
"initializer_range": 0.02,
|
| 7 |
+
"intermediate_size": 3072,
|
| 8 |
+
"max_position_embeddings": 512,
|
| 9 |
+
"num_attention_heads": 12,
|
| 10 |
+
"num_hidden_layers": 12,
|
| 11 |
+
"type_vocab_size": 2,
|
| 12 |
+
"vocab_size": 32768
|
| 13 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e02b2a7a5f3606da4e15397e73ae81ac18ad8582331209b0880380f1a8c3da9d
|
| 3 |
+
size 447423557
|
tf_model.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e324891530e4d92f6e93545b56670f144ea0108740a3dc7a7ce40986e68522b6
|
| 3 |
+
size 549869424
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_lower_case": false,
|
| 3 |
+
"word_tokenizer_type": "mecab",
|
| 4 |
+
"subword_tokenizer_type": "wordpiece",
|
| 5 |
+
"mecab_kwargs": {
|
| 6 |
+
"mecab_dic": "unidic_lite"
|
| 7 |
+
}
|
| 8 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|