nguyen599 commited on
Commit
06cc19f
·
verified ·
1 Parent(s): fbcdeaf

3000 steps checkpoint

Browse files
Files changed (2) hide show
  1. README.md +65 -0
  2. model.safetensors +1 -1
README.md ADDED
@@ -0,0 +1,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: fill-mask
11
+ tags:
12
+ - finance
13
+ - esg
14
+ - text-classification
15
+ - fill-mask
16
+ - bert
17
+ library_name: transformers
18
+ datasets:
19
+ - nguyen599/ViEn-ESG-100
20
+ widget:
21
+ - text: "Over three chapters, it covers a range of topics from energy efficiency and renewable energy to the circular economy and sustainable transportation."
22
+ ---
23
+
24
+ ESG analysis can help investors determine a business' long-term sustainability and identify associated risks. MaskESG-DistilBERT-base is a [distilbert/distilbert-base-multilingual-cased](https://huggingface.co/distilbert/distilbert-base-multilingual-cased) 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.
25
+
26
+ **Input**: A financial text.
27
+
28
+ **Output**: Environmental, Social, Governance or Neural.
29
+
30
+ **Language support**: English, Vietnamese
31
+
32
+ # How to use
33
+ You can use this model with Transformers pipeline for ESG classification or fill mask task.
34
+ ```python
35
+ # tested in transformers==4.53.0
36
+ from transformers import AutoTokenizer, AutoModelForMaskedLM, pipeline
37
+
38
+ maskesg = AutoModelForMaskedLM.from_pretrained('nguyen599/MaskESG-DistilBERT-base')
39
+ tokenizer = AutoTokenizer.from_pretrained('nguyen599/MaskESG-DistilBERT-base')
40
+ nlp = pipeline("fill-mask", model=maskesg, tokenizer=tokenizer)
41
+ # Classification as fill-mask
42
+ results = nlp(f'Over three chapters, it covers a range of topics from energy efficiency and renewable energy to the circular economy and sustainable transportation. This sentence is {tokenizer.mask_token}')
43
+ print(results)
44
+ # [{'score': 0.9015821814537048,
45
+ # 'token': 444,
46
+ # 'token_str': ' E',
47
+ # 'sequence': 'Over three chapters, it covers a range of topics from energy efficiency and renewable energy to the circular economy and sustainable transportation. This sentence is E'},
48
+ # {'score': 0.09723947197198868,
49
+ # 'token': 427,
50
+ # 'token_str': ' N',
51
+ # 'sequence': 'Over three chapters, it covers a range of topics from energy efficiency and renewable energy to the circular economy and sustainable transportation. This sentence is N'},
52
+ # {'score': 0.0010556845227256417,
53
+ # 'token': 322,
54
+ # 'token_str': ' S',
55
+ # 'sequence': 'Over three chapters, it covers a range of topics from energy efficiency and renewable energy to the circular economy and sustainable transportation. This sentence is S'},
56
+ # {'score': 0.0001152529803221114,
57
+ # 'token': 443,
58
+ # 'token_str': ' G',
59
+ # 'sequence': 'Over three chapters, it covers a range of topics from energy efficiency and renewable energy to the circular economy and sustainable transportation. This sentence is G'},
60
+ # {'score': 1.14425779429439e-06,
61
+ # 'token': 299,
62
+ # 'token_str': ' e',
63
+ # 'sequence': 'Over three chapters, it covers a range of topics from energy efficiency and renewable energy to the circular economy and sustainable transportation. This sentence is e'}]
64
+
65
+ ```
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f332fcadd9051c1339fc011ed36377772b29080429f93d1beea1825cdbc83c73
3
  size 541795684
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5f7b9723d7d044f2bd1e12f159ae761a6b6bb284a672bafdb89ab8f59b7236c
3
  size 541795684