Commit
•
74a31ec
1
Parent(s):
49e6206
Update README.md
Browse files
README.md
CHANGED
@@ -1,7 +1,16 @@
|
|
1 |
---
|
2 |
language:
|
3 |
- en
|
|
|
|
|
4 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
# Introduction
|
6 |
This is the implementation of the BERT model using the LongNet structure (paper: https://arxiv.org/pdf/2307.02486.pdf).
|
7 |
|
@@ -30,7 +39,7 @@ sys.path.append('/LongFinBERT-base')
|
|
30 |
|
31 |
* Load the pre-trained tokenizer, model configuration, and model weights
|
32 |
```
|
33 |
-
from model import
|
34 |
from custom_config import LongBERTConfig
|
35 |
from tokenizer import LongBERTTokenizer
|
36 |
|
@@ -38,7 +47,7 @@ backbone = 'minhtriphan/LongFinBERT-base'
|
|
38 |
|
39 |
tokenizer = LongBERTTokenizer.from_pretrained(backbone)
|
40 |
config = LongBERTConfig.from_pretrained(backbone)
|
41 |
-
model =
|
42 |
```
|
43 |
|
44 |
# Model usage
|
|
|
1 |
---
|
2 |
language:
|
3 |
- en
|
4 |
+
tags:
|
5 |
+
- finance
|
6 |
---
|
7 |
+
# Disclaimer
|
8 |
+
The current model is trained from randomly initialized weights due to some computational and data obstacles. Therefore, the context captured by the models as well as the word semantics are not really good. The tokenizer in this version is also trained from scratch.
|
9 |
+
|
10 |
+
We're training the model again with more care of the semantics to enhance the semantics of words. To this end, we initialize the embedding layers (i.e., `word_embeddings`, `position_embeddings`, `token_type_embeddings`, and `LayerNorm`) with the pre-trained embeddings from FinBERT (https://huggingface.co/yiyanghkust/finbert-tone). Accordingly, we use the same tokenizer as that of this model.
|
11 |
+
|
12 |
+
Furthermore, the model is trained longer (10 epochs). The new pre-trained model weights will be updated as soon as the training and validation are completed.
|
13 |
+
|
14 |
# Introduction
|
15 |
This is the implementation of the BERT model using the LongNet structure (paper: https://arxiv.org/pdf/2307.02486.pdf).
|
16 |
|
|
|
39 |
|
40 |
* Load the pre-trained tokenizer, model configuration, and model weights
|
41 |
```
|
42 |
+
from model import LongBERTModel
|
43 |
from custom_config import LongBERTConfig
|
44 |
from tokenizer import LongBERTTokenizer
|
45 |
|
|
|
47 |
|
48 |
tokenizer = LongBERTTokenizer.from_pretrained(backbone)
|
49 |
config = LongBERTConfig.from_pretrained(backbone)
|
50 |
+
model = LongBERTModel.from_pretrained(backbone)
|
51 |
```
|
52 |
|
53 |
# Model usage
|