Add model
Browse files- README.md +78 -0
- config.json +24 -0
- pytorch_model.bin +3 -0
README.md
ADDED
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
|
3 |
+
language: ja
|
4 |
+
|
5 |
+
license: cc-by-sa-4.0
|
6 |
+
|
7 |
+
tags:
|
8 |
+
|
9 |
+
- finance
|
10 |
+
|
11 |
+
datasets:
|
12 |
+
|
13 |
+
- securities reports
|
14 |
+
- summaries of financial results
|
15 |
+
|
16 |
+
widget:
|
17 |
+
|
18 |
+
- text: 流動[MASK]は、1億円となりました。
|
19 |
+
|
20 |
+
---
|
21 |
+
|
22 |
+
# Additional pretrained BERT base Japanese finance
|
23 |
+
|
24 |
+
This is a [BERT](https://github.com/google-research/bert) model pretrained on texts in the Japanese language.
|
25 |
+
|
26 |
+
The codes for the pretraining are available at [retarfi/language-pretraining](https://github.com/retarfi/language-pretraining/tree/v1.0).
|
27 |
+
|
28 |
+
## Model architecture
|
29 |
+
|
30 |
+
The model architecture is the same as BERT small in the [original BERT paper](https://arxiv.org/abs/1810.04805); 12 layers, 768 dimensions of hidden states, and 12 attention heads.
|
31 |
+
|
32 |
+
## Training Data
|
33 |
+
|
34 |
+
The models are additionally trained on financial corpus from [Tohoku University's BERT base Japanese model (cl-tohoku/bert-base-japanese)](https://huggingface.co/cl-tohoku/bert-base-japanese).
|
35 |
+
|
36 |
+
The financial corpus consists of 2 corpora:
|
37 |
+
|
38 |
+
- Summaries of financial results from October 9, 2012, to December 31, 2020
|
39 |
+
- Securities reports from February 8, 2018, to December 31, 2020
|
40 |
+
|
41 |
+
The financial corpus file consists of approximately 27M sentences.
|
42 |
+
|
43 |
+
|
44 |
+
## Tokenization
|
45 |
+
|
46 |
+
You can use tokenizer [Tohoku University's BERT base Japanese model (cl-tohoku/bert-base-japanese)](https://huggingface.co/cl-tohoku/bert-base-japanese).
|
47 |
+
|
48 |
+
You can use the tokenizer:
|
49 |
+
|
50 |
+
```
|
51 |
+
tokenizer = transformers.BertJapaneseTokenizer.from_pretrained('cl-tohoku/bert-base-japanese')
|
52 |
+
```
|
53 |
+
|
54 |
+
## Training
|
55 |
+
|
56 |
+
The models are trained with the same configuration as BERT base in the [original BERT paper](https://arxiv.org/abs/1810.04805); 512 tokens per instance, 256 instances per batch, and 1M training steps.
|
57 |
+
|
58 |
+
## Citation
|
59 |
+
|
60 |
+
**There will be another paper for this pretrained model. Be sure to check here again when you cite.**
|
61 |
+
|
62 |
+
```
|
63 |
+
@inproceedings{bert_electra_japanese,
|
64 |
+
title = {Construction and Validation of a Pre-Training and Additional Pre-Training Financial Language Model}
|
65 |
+
author = {Masahiro Suzuki and Hiroki Sakaji and Masanori Hirano and Kiyoshi Izumi},
|
66 |
+
month = {mar},
|
67 |
+
year = {2022},
|
68 |
+
booktitle = {"Proceedings of JSAI Special Interest Group on Financial Infomatics (SIG-FIN) 28"}
|
69 |
+
}
|
70 |
+
```
|
71 |
+
|
72 |
+
## Licenses
|
73 |
+
|
74 |
+
The pretrained models are distributed under the terms of the [Creative Commons Attribution-ShareAlike 4.0](https://creativecommons.org/licenses/by-sa/4.0/).
|
75 |
+
|
76 |
+
## Acknowledgments
|
77 |
+
|
78 |
+
This work was supported by JSPS KAKENHI Grant Number JP21K12010 and JST-Mirai Program Grant Number JPMJMI20B1.
|
config.json
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"BertForPreTraining"
|
4 |
+
],
|
5 |
+
"attention_probs_dropout_prob": 0.1,
|
6 |
+
"gradient_checkpointing": false,
|
7 |
+
"hidden_act": "gelu",
|
8 |
+
"hidden_dropout_prob": 0.1,
|
9 |
+
"hidden_size": 768,
|
10 |
+
"initializer_range": 0.02,
|
11 |
+
"intermediate_size": 3072,
|
12 |
+
"layer_norm_eps": 1e-12,
|
13 |
+
"max_position_embeddings": 512,
|
14 |
+
"model_type": "bert",
|
15 |
+
"num_attention_heads": 12,
|
16 |
+
"num_hidden_layers": 12,
|
17 |
+
"pad_token_id": 0,
|
18 |
+
"position_embedding_type": "absolute",
|
19 |
+
"tokenizer_class": "BertJapaneseTokenizer",
|
20 |
+
"transformers_version": "4.7.0",
|
21 |
+
"type_vocab_size": 2,
|
22 |
+
"use_cache": true,
|
23 |
+
"vocab_size": 32000
|
24 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ef069c1fa9805436139e56236f411eb94bd6d73b63ffdb75702962baff942222
|
3 |
+
size 445063670
|