Text Classification
Transformers
Safetensors
English
roberta
esg
sustainability
environmental
social
governance
Instructions to use salitahir/roberta-esg-category-green-guard-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use salitahir/roberta-esg-category-green-guard-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="salitahir/roberta-esg-category-green-guard-v1")# Load model directly from transformers import AutoTokenizer, RobertaWithClassWeights tokenizer = AutoTokenizer.from_pretrained("salitahir/roberta-esg-category-green-guard-v1") model = RobertaWithClassWeights.from_pretrained("salitahir/roberta-esg-category-green-guard-v1") - Notebooks
- Google Colab
- Kaggle
π£ Green-Guard β RoBERTa ESG Category Classifier (v1)
Task: Sentence-level classification for Environmental (E), Social (S), and Governance (G) categories.
Base model: roberta-base, fine-tuned with class-weighted loss to address label imbalance.
Repository: GitHub β Green-Guard Project
π Metrics (Test Set)
| Metric | Value |
|---|---|
| Accuracy | 0.81 |
| Macro F1 | 0.81 |
| Weighted F1 | 0.81 |
Metrics computed on the same held-out test split (
data/processed/splits/)
usingreports/category_metrics_v1.json
π§© Labels
{ "0": "E", "1": "S", "2": "G" }
π Quick Inference
You can load and run the model directly:
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_id = "salitahir/roberta-esg-category-green-guard-v1"
tok = AutoTokenizer.from_pretrained(model_id)
mod = AutoModelForSequenceClassification.from_pretrained(model_id).eval()
text = "We invested in renewable energy sources for our operations."
inputs = tok(text, return_tensors="pt", truncation=True)
pred = torch.softmax(mod(**inputs).logits, dim=-1)
label_id = pred.argmax(-1).item()
label = mod.config.id2label[str(label_id)]
print(label, float(pred[0][label_id]))
β Expected output:
E 0.88
π§ Intended Use
This model acts as Stage 2 in the Green-Guard pipeline β categorizing sustainability-related sentences identified by the Relevance Model.
βοΈ License
MIT License β open for research and commercial reuse with attribution.
- Downloads last month
- 3
Model tree for salitahir/roberta-esg-category-green-guard-v1
Base model
FacebookAI/roberta-base