2000 steps checkpoint
Browse files- README.md +41 -0
- added_tokens.json +3 -0
- config.json +48 -0
- model.safetensors +3 -0
- special_tokens_map.json +15 -0
- spm.model +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +59 -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 |
+
- microsoft/deberta-v3-small
|
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. ViDeBERTa-v3-ESG-small is a [https://huggingface.co/microsoft/deberta-v3-small](microsoft/deberta-v3-small) model fine-tuned on [ViEn-ESG-100](https://huggingface.co/nguyen599/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/ViDeBERTa-v3-ESG-small',num_labels=4)
|
36 |
+
tokenizer = AutoTokenizer.from_pretrained('nguyen599/ViDeBERTa-v3-ESG-small')
|
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 |
+
```
|
added_tokens.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"[MASK]": 128000
|
3 |
+
}
|
config.json
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"DebertaV2ForSequenceClassification"
|
4 |
+
],
|
5 |
+
"attention_probs_dropout_prob": 0.1,
|
6 |
+
"hidden_act": "gelu",
|
7 |
+
"hidden_dropout_prob": 0.1,
|
8 |
+
"hidden_size": 768,
|
9 |
+
"id2label": {
|
10 |
+
"0": "Neural",
|
11 |
+
"1": "Environmental",
|
12 |
+
"2": "Social",
|
13 |
+
"3": "Governance"
|
14 |
+
},
|
15 |
+
"initializer_range": 0.02,
|
16 |
+
"intermediate_size": 3072,
|
17 |
+
"label2id": {
|
18 |
+
"Environmental": 1,
|
19 |
+
"Governance": 3,
|
20 |
+
"Neural": 0,
|
21 |
+
"Social": 2
|
22 |
+
},
|
23 |
+
"layer_norm_eps": 1e-07,
|
24 |
+
"legacy": true,
|
25 |
+
"max_position_embeddings": 512,
|
26 |
+
"max_relative_positions": -1,
|
27 |
+
"model_type": "deberta-v2",
|
28 |
+
"norm_rel_ebd": "layer_norm",
|
29 |
+
"num_attention_heads": 12,
|
30 |
+
"num_hidden_layers": 6,
|
31 |
+
"pad_token_id": 0,
|
32 |
+
"pooler_dropout": 0,
|
33 |
+
"pooler_hidden_act": "gelu",
|
34 |
+
"pooler_hidden_size": 768,
|
35 |
+
"pos_att_type": [
|
36 |
+
"p2c",
|
37 |
+
"c2p"
|
38 |
+
],
|
39 |
+
"position_biased_input": false,
|
40 |
+
"position_buckets": 256,
|
41 |
+
"problem_type": "multi_label_classification",
|
42 |
+
"relative_attention": true,
|
43 |
+
"share_att_key": true,
|
44 |
+
"torch_dtype": "float32",
|
45 |
+
"transformers_version": "4.51.0",
|
46 |
+
"type_vocab_size": 0,
|
47 |
+
"vocab_size": 128100
|
48 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f04b1211be2b2779e7afef11b09bc94b5f98591de27e845a81b4373039a56522
|
3 |
+
size 567604704
|
special_tokens_map.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "[CLS]",
|
3 |
+
"cls_token": "[CLS]",
|
4 |
+
"eos_token": "[SEP]",
|
5 |
+
"mask_token": "[MASK]",
|
6 |
+
"pad_token": "[PAD]",
|
7 |
+
"sep_token": "[SEP]",
|
8 |
+
"unk_token": {
|
9 |
+
"content": "[UNK]",
|
10 |
+
"lstrip": false,
|
11 |
+
"normalized": true,
|
12 |
+
"rstrip": false,
|
13 |
+
"single_word": false
|
14 |
+
}
|
15 |
+
}
|
spm.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c679fbf93643d19aab7ee10c0b99e460bdbc02fedf34b92b05af343b4af586fd
|
3 |
+
size 2464616
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"1": {
|
12 |
+
"content": "[CLS]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "[SEP]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "[UNK]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": true,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"128000": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"bos_token": "[CLS]",
|
45 |
+
"clean_up_tokenization_spaces": false,
|
46 |
+
"cls_token": "[CLS]",
|
47 |
+
"do_lower_case": false,
|
48 |
+
"eos_token": "[SEP]",
|
49 |
+
"extra_special_tokens": {},
|
50 |
+
"mask_token": "[MASK]",
|
51 |
+
"model_max_length": 1000000000000000019884624838656,
|
52 |
+
"pad_token": "[PAD]",
|
53 |
+
"sep_token": "[SEP]",
|
54 |
+
"sp_model_kwargs": {},
|
55 |
+
"split_by_punct": false,
|
56 |
+
"tokenizer_class": "DebertaV2Tokenizer",
|
57 |
+
"unk_token": "[UNK]",
|
58 |
+
"vocab_type": "spm"
|
59 |
+
}
|