Instructions to use P0L3/CliReNER-distilroberta-base-climate-f with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- SpanMarker
How to use P0L3/CliReNER-distilroberta-base-climate-f with SpanMarker:
from span_marker import SpanMarkerModel model = SpanMarkerModel.from_pretrained("P0L3/CliReNER-distilroberta-base-climate-f") - Notebooks
- Google Colab
- Kaggle
SpanMarker-ClimateBERT-F for Climate Research NER
This model is a SpanMarker model fine-tuned for fine-grained Named Entity Recognition (NER) in the climate change research domain, extracting 28 distinct entity types. It utilizes the climate-specific climatebert/distilroberta-base-climate-f as the underlying encoder.
📌 Model Details
- Model Type: SpanMarker
- Encoder: climatebert/distilroberta-base-climate-f
- Maximum Sequence Length: 512 tokens
- Maximum Entity Length: 14 words
- Language: English
- License: cc-by-sa-4.0
Model Labels
| Label | Examples |
|---|---|
| Asset | "mental health", "water resources", "raw material" |
| Body Part | "deep tissue compartment", "plant leaves", "leaves" |
| Body of Water | "rivers", "peripheral rivers", "Dhaleshwari river" |
| Chemical | "cathode materials", "marine algal toxin", "domoic acid" |
| Disease | "acute neurologic signs", "chronic epileptic syndrome", "seizures" |
| Ecosystem | "polluted environment", "Tropical montane cloud forest", "cloud forests" |
| Energy Source | "12-cell series battery-pack prototype", "fossil fuels", "battery cells" |
| Field of Study | "study", "reference laboratory", "veterinary medicine" |
| Geographical Feature | "heterogenous topography", "mountainous regions", "low point" |
| Intellectual Artefact | "Daily husbandry records", "data", "Veterinary medical records" |
| Location | "Westbrook", "beaches", "wild" |
| Mathematical Expression | "Stepwise machine hour constraints", "difference", "gradient" |
| Measuring Device | "station", "EEG", "MRI scan" |
| Meteorological Phenomenon | "rainfall", "climate change", "climatic variability" |
| Method | "dosing", "clinical efficacy", "serum monitoring" |
| Natural Disaster | "heavy metal contamination", "environmental pollution", "seasonal air pollution" |
| Natural Phenomenon | "algal blooms", "changing ocean conditions", "biochemical changes" |
| Organism | "California sea lions", "Zalophus californianus", "species" |
| Organization | "reference laboratory", "long-term care facility", "NOAA National Marine Fisheries Service" |
| Other | "marine mammal health", "normal eating", "reports" |
| Person | "staff", "Clinicians", "clinicians" |
| Physical Artefact | "EVs", "electric vehicle", "paved east – west road" |
| Physical Phenomenon | "normal food intake", "seasonal changes", "structural abnormalities" |
| Policy | "safety", "pollution", "energy security" |
| Quantity | "200 mAhg − 1", "energy density", ">" |
| Satellite | "satellites", "Tropical Rainfall Measuring Mission", "TRMM" |
| System | "system structure", "global overturning circulation", "climate" |
| Time Period | "101 days", "several decades", "periods of prolonged anorexia" |
🚀 Main Results (Selected Checkpoint)
This repository provides the best-performing checkpoint selected from 5 runs with different random seeds. While the internal training logs tracked performance on the validation split of CliReNERsilver, the final model selection and the metrics below are evaluated on the independent, expert-annotated CliReNERgold dataset.
| Metric | Score |
|---|---|
| Precision | 55.54 |
| Recall | 45.63 |
| F1 | 50.10 |
This checkpoint corresponds to the seed with the highest strict F1 on the gold evaluation set (Seed 3 - 3012).
📊 Results Across Seeds
We fine-tuned the model using 5 different random seeds to assess the stability and robustness of the architecture on the domain-specific text.
| Seed | Precision | Recall | Strict F1 |
|---|---|---|---|
| 1 | 50.38 | 42.97 | 46.38 |
| 2 | 46.34 | 36.44 | 40.80 |
| 3 | 55.54 | 45.63 | 50.10 |
| 4 | 51.94 | 47.47 | 49.61 |
| 5 | 50.80 | 44.36 | 47.36 |
Summary:
- F1: mean = 46.85, std = 3.72
- Precision: mean = 51.00, std = 3.31
- Recall: mean = 43.37, std = 4.22
Model Selection Strategy: The uploaded checkpoint is the single best seed (highest strict F1 on the gold dataset), ensuring strong real-world performance and high-fidelity alignment with domain-expert consensus.
📂 Dataset & Evaluation
- Training Dataset: CliReNERsilver
- Splits used: Stratified 80:10:10 ratio (Train/Validation/Test). The 80% split was used for training.
- Evaluation Dataset: CliReNERgold
- Splits used: Evaluated on the combined 192 sentences (expert-annotated via Weighted Expert Voting).
- Preprocessing:
- Texts were tokenized using the standard ClimateBERT tokenizer.
- The dataset utilizes a flat NER schema (nested entities are excluded, and overlapping entities are resolved to the most relevant span).
- Metric Details:
- F1 type: Strict F1 (Entity-level exact match).
- Evaluation was performed ensuring entities match both the exact boundary span and the exact semantic label to be considered correct.
⚖️ Precision vs Recall Behavior
(Note to author: Describe the model’s tendency here based on your results. Example: "The model slightly favors recall over precision" or "The model exhibits high precision in domain-specific terminology.")
⚙️ Usage
Direct Use for Inference
Because this model was trained using the SpanMarker framework, it requires the span_marker library for inference.
pip install span_marker
from span_marker import SpanMarkerModel
# Download from the 🤗 Hub
model = SpanMarkerModel.from_pretrained("P0L3/CliReNER-distilroberta-base-climate-f")
# Run inference
text = "To manage this information growth, the scientific community increasingly relies on natural language processing (NLP), particularly information extraction tasks such as named entity recognition (NER)."
entities = model.predict(text)
for entity in entities:
print(f"Entity: {entity['span']} | Label: {entity['label']} | Score: {entity['score']:.4f}")
# Entity: scientific community | Label: Organization | Score: 0.5653
# Entity: natural language processing | Label: Method | Score: 0.9416
# Entity: NLP | Label: Method | Score: 0.5352
# Entity: information extraction tasks | Label: Method | Score: 0.8926
# Entity: named entity recognition | Label: Method | Score: 0.9371
# Entity: NER | Label: Method | Score: 0.9266
Downstream Use
You can easily continue fine-tuning this model on your own dataset.
Click to expand
from span_marker import SpanMarkerModel, Trainer
from datasets import load_dataset
# Download from the 🤗 Hub
model = SpanMarkerModel.from_pretrained("your-huggingface-username/your-model-name")
# Specify a Dataset with "tokens" and "ner_tags" columns
dataset = load_dataset("your_custom_dataset")
# Initialize a Trainer using the pretrained model & dataset
trainer = Trainer(
model=model,
train_dataset=dataset["train"],
eval_dataset=dataset["validation"],
)
trainer.train()
trainer.save_model("span_marker_model_id-finetuned")
📉 Training Details
Training Set Metrics
| Training set | Min | Median | Max |
|---|---|---|---|
| Sentence length | 3 | 31.4819 | 97 |
| Entities per sentence | 1 | 7.0100 | 22 |
Training Hyperparameters
- learning_rate: 5e-05
- train_batch_size: 8
- eval_batch_size: 8
- seed: 3012
- gradient_accumulation_steps: 2
- total_train_batch_size: 16
- optimizer: adamw_torch with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 20
Training Results (CliReNERsilver Validation Split)
| Epoch | Step | Validation Loss | Validation Precision | Validation Recall | Validation F1 | Validation Accuracy |
|---|---|---|---|---|---|---|
| 1.0 | 62 | 0.1523 | 0.0 | 0.0 | 0.0 | 0.6075 |
| 2.0 | 124 | 0.1078 | 0.0 | 0.0 | 0.0 | 0.6075 |
| 3.0 | 186 | 0.0725 | 0.4137 | 0.3300 | 0.3671 | 0.7235 |
| 4.0 | 248 | 0.0496 | 0.5668 | 0.4749 | 0.5168 | 0.8007 |
| 5.0 | 310 | 0.0478 | 0.5609 | 0.5352 | 0.5477 | 0.8159 |
| 6.0 | 372 | 0.0411 | 0.6330 | 0.5395 | 0.5825 | 0.8189 |
| 7.0 | 434 | 0.0426 | 0.6206 | 0.5868 | 0.6032 | 0.8328 |
| 8.0 | 496 | 0.0445 | 0.6305 | 0.5509 | 0.5881 | 0.8292 |
| 9.0 | 558 | 0.0455 | 0.6349 | 0.5839 | 0.6084 | 0.8356 |
Framework Versions
- Python: 3.10.19
- SpanMarker: 1.7.0
- Transformers: 4.50.0
- PyTorch: 2.9.1+cu126
- Datasets: 3.0.0
- Tokenizers: 0.21.4
📚 Citation
If you use this model or the CliReNER datasets in your research, please cite the project:
@misc{poleksic2026named,
author = {Poleksić, Andrija and Martinčić-Ipšić, Sanda},
title = {Named Entity Recognition for Climate Change Research},
year = {2026},
howpublished = {Research Square},
note = {Preprint}
}
Please also acknowledge the SpanMarker framework:
@software{Aarsen_SpanMarker,
author = {Aarsen, Tom},
license = {Apache-2.0},
title = {{SpanMarker for Named Entity Recognition}},
url = {https://github.com/tomaarsen/SpanMarkerNER}
}
- Downloads last month
- 2
Model tree for P0L3/CliReNER-distilroberta-base-climate-f
Base model
climatebert/distilroberta-base-climate-fDatasets used to train P0L3/CliReNER-distilroberta-base-climate-f
P0L3/CliReNER_v_1_1_28_SILVER
Collection including P0L3/CliReNER-distilroberta-base-climate-f
Evaluation results
- F1 on CliReNER_silverself-reported0.608
- Precision on CliReNER_silverself-reported0.635
- Recall on CliReNER_silverself-reported0.584