File size: 971 Bytes
e94da57
 
 
 
 
 
 
 
 
 
 
 
91206d8
 
fa9d82a
91206d8
e94da57
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Please refer to [climatebert/econbert](https://huggingface.co/climatebert/econbert) for more information about the model and cite the corresponding paper if you use this model.

This repo contains all the necessary tokenizer/model files with a corrected folder structure that enables easier downstream usage such as fine-tuning for sentiment classification.

## Usage

```python
from transformers import AutoTokenizer, AutoModel

model_name = "brjoey/climatebert_econbert" 
tokenizer = AutoTokenizer.from_pretrained(model_name)

# Load the base model
model = AutoModel.from_pretrained(model_name, torch_dtype="auto")

# For sequence classification tasks
from transformers import AutoModelForSequenceClassification
model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=3)
```

Note that the standard transformers library loading methods (AutoTokenizer, AutoModel) seem to fail with the original repository due to non-standard file organization.