brjoey's picture
Update README.md
91206d8 verified
|
raw
history blame
971 Bytes

Please refer to 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

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.