2000 steps checkpoint
Browse files- README.md +41 -0
- config.json +37 -0
- model.safetensors +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +56 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- en
|
5 |
+
- vi
|
6 |
+
metrics:
|
7 |
+
- f1
|
8 |
+
base_model:
|
9 |
+
- distilbert/distilbert-base-multilingual-cased
|
10 |
+
pipeline_tag: text-classification
|
11 |
+
tags:
|
12 |
+
- finance
|
13 |
+
- esg
|
14 |
+
- financial-text-analysis
|
15 |
+
- bert
|
16 |
+
library_name: transformers
|
17 |
+
widget:
|
18 |
+
- text: "Over three chapters, it covers a range of topics from energy efficiency and renewable energy to the circular economy and sustainable transportation."
|
19 |
+
---
|
20 |
+
|
21 |
+
ESG analysis can help investors determine a business' long-term sustainability and identify associated risks. ViDistilBERT-ESG-base is a [https://huggingface.co/distilbert/distilbert-base-multilingual-cased](distilbert/distilbert-base-multilingual-cased) model fine-tuned on [https://huggingface.co/nguyen599/ViEn-ESG-100](ViEn-ESG-100) dataset, include 100,000 annotated sentences from Vietnam, English news and ESG reports.
|
22 |
+
|
23 |
+
**Input**: A financial text.
|
24 |
+
|
25 |
+
**Output**: Environmental, Social, Governance or None.
|
26 |
+
|
27 |
+
**Language support**: English, Vietnamese
|
28 |
+
|
29 |
+
# How to use
|
30 |
+
You can use this model with Transformers pipeline for ESG classification.
|
31 |
+
```python
|
32 |
+
# tested in transformers==4.51.0
|
33 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification, pipeline
|
34 |
+
|
35 |
+
esgbert = AutoModelForSequenceClassification.from_pretrained('nguyen599/ViDistilBERT-ESG-base',num_labels=4)
|
36 |
+
tokenizer = AutoTokenizer.from_pretrained('nguyen599/ViDistilBERT-ESG-base')
|
37 |
+
nlp = pipeline("text-classification", model=esgbert, tokenizer=tokenizer)
|
38 |
+
results = nlp('Over three chapters, it covers a range of topics from energy efficiency and renewable energy to the circular economy and sustainable transportation.')
|
39 |
+
print(results) # [{'label': 'Environment', 'score': 0.9206041026115417}]
|
40 |
+
|
41 |
+
```
|
config.json
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"activation": "gelu",
|
3 |
+
"architectures": [
|
4 |
+
"DistilBertForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_dropout": 0.1,
|
7 |
+
"dim": 768,
|
8 |
+
"dropout": 0.1,
|
9 |
+
"hidden_dim": 3072,
|
10 |
+
"id2label": {
|
11 |
+
"0": "Neural",
|
12 |
+
"1": "Environmental",
|
13 |
+
"2": "Social",
|
14 |
+
"3": "Governance"
|
15 |
+
},
|
16 |
+
"initializer_range": 0.02,
|
17 |
+
"label2id": {
|
18 |
+
"0": "Neural",
|
19 |
+
"1": "Environmental",
|
20 |
+
"2": "Social",
|
21 |
+
"3": "Governance"
|
22 |
+
},
|
23 |
+
"max_position_embeddings": 512,
|
24 |
+
"model_type": "distilbert",
|
25 |
+
"n_heads": 12,
|
26 |
+
"n_layers": 6,
|
27 |
+
"output_past": true,
|
28 |
+
"pad_token_id": 0,
|
29 |
+
"problem_type": "multi_label_classification",
|
30 |
+
"qa_dropout": 0.1,
|
31 |
+
"seq_classif_dropout": 0.2,
|
32 |
+
"sinusoidal_pos_embds": false,
|
33 |
+
"tie_weights_": true,
|
34 |
+
"torch_dtype": "float32",
|
35 |
+
"transformers_version": "4.51.0",
|
36 |
+
"vocab_size": 119547
|
37 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8dad68a045706014d00957a42fd4c030f36f15dc87faa2b3b0e5e5d0556da67a
|
3 |
+
size 541323528
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"100": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"101": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"102": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"103": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"clean_up_tokenization_spaces": false,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_lower_case": false,
|
47 |
+
"extra_special_tokens": {},
|
48 |
+
"mask_token": "[MASK]",
|
49 |
+
"model_max_length": 512,
|
50 |
+
"pad_token": "[PAD]",
|
51 |
+
"sep_token": "[SEP]",
|
52 |
+
"strip_accents": null,
|
53 |
+
"tokenize_chinese_chars": true,
|
54 |
+
"tokenizer_class": "DistilBertTokenizer",
|
55 |
+
"unk_token": "[UNK]"
|
56 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|