devinitorg/iati-policy-markers
Viewer • Updated • 896k • 8
How to use alex-miller/iati-climate-classifier with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="alex-miller/iati-climate-classifier") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("alex-miller/iati-climate-classifier")
model = AutoModelForSequenceClassification.from_pretrained("alex-miller/iati-climate-classifier")This model is a fine-tuned version of alex-miller/ODABert on a subset of the alex-miller/iati-policy-markers dataset.
It achieves the following results on the evaluation set:
This model has been trained to identify climate mitigation and climate adaptation project titles and/or descriptions. It returns "0" for projects with no climate component, and "1" for projects with adaptation or mitigation as principal objectives.
Code to subset the dataset and train the model is available here.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
|---|---|---|---|---|---|---|---|
| 0.4992 | 1.0 | 876 | 0.8921 | 0.8978 | 0.2831 | 0.8530 | 0.9475 |
| 0.2706 | 2.0 | 1752 | 0.9038 | 0.9057 | 0.2446 | 0.8881 | 0.9241 |
| 0.2494 | 3.0 | 2628 | 0.9095 | 0.9114 | 0.2370 | 0.8927 | 0.9309 |
| 0.2393 | 4.0 | 3504 | 0.9112 | 0.9140 | 0.2385 | 0.8863 | 0.9435 |
| 0.2306 | 5.0 | 4380 | 0.9124 | 0.9152 | 0.2380 | 0.8870 | 0.9452 |
| 0.229 | 6.0 | 5256 | 0.2405 | 0.9121 | 0.9152 | 0.8836 | 0.9492 |
| 0.2255 | 7.0 | 6132 | 0.2377 | 0.9138 | 0.9165 | 0.8889 | 0.9458 |
Base model
google-bert/bert-base-multilingual-uncased