Downloads · 30 days
1.7K
0% of all-time downloads
climatebert/distilroberta-base-climate-detector
distilroberta-base-climate-detector is a text classification model from climatebert. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
This is the fine-tuned ClimateBERT language model with a classification head for detecting climate-related paragraphs.
Downloads · 30 days
1.7K
0% of all-time downloads
All-time downloads
1.5M
Public
Parameters
82.3M
3.6 GB on disk
Likes
18
Public
Click a slice to open those files.
.bin329 MB · 50%
How the weights are stored.
F3282.3M · 100%
From the Hugging Face model README
This is the fine-tuned ClimateBERT language model with a classification head for detecting climate-related paragraphs.
Using the climatebert/distilroberta-base-climate-f language model as starting point, the distilroberta-base-climate-detector model is fine-tuned on our climatebert/climate_detection dataset.
Note: This model is trained on paragraphs. It may not perform well on sentences.
@techreport{bingler2023cheaptalk,
title={How Cheap Talk in Climate Disclosures Relates to Climate Initiatives, Corporate Emissions, and Reputation Risk},
author={Bingler, Julia and Kraus, Mathias and Leippold, Markus and Webersinke, Nicolas},
type={Working paper},
institution={Available at SSRN 3998435},
year={2023}
}
You can use the model with a pipeline for text classification:
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
from transformers.pipelines.pt_utils import KeyDataset
import datasets
from tqdm.auto import tqdm
dataset_name = "climatebert/climate_detection"
model_name = "climatebert/distilroberta-base-climate-detector"
# If you want to use your own data, simply load them as 🤗 Datasets dataset, see https://huggingface.co/docs/datasets/loading
dataset = datasets.load_dataset(dataset_name, split="test")
model = AutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name, max_len=512)
pipe = pipeline("text-classification", model=model, tokenizer=tokenizer, device=0)
# See https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.pipeline
for out in tqdm(pipe(KeyDataset(dataset, "text"), padding=True, truncation=True)):
print(out)