Team Ai
Modelpublic

QuantBridge/energy-intelligence-multitask-custom-ner

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
0likes7downloads
Model Card

Energy Intelligence NER

Model ID: Quantbridge/energy-intelligence-multitask-ner

A fine-tuned DistilBERT model for Named Entity Recognition in the energy markets and geopolitical domain. The model identifies nine entity types relevant to energy intelligence — companies, commodities, infrastructure, markets, events, and more.


Entity Types

LabelDescriptionExamples
COMPANYEnergy sector companiesExxonMobil, BP, Saudi Aramco
COMMODITYEnergy commodities and resourcescrude oil, natural gas, LNG, coal
COUNTRYNation statesUnited States, Russia, Saudi Arabia
LOCATIONGeographic locations, regionsPersian Gulf, North Sea, Permian Basin
INFRASTRUCTUREPhysical energy infrastructurepipelines, refineries, LNG terminals
MARKETEnergy markets and trading hubsHenry Hub, Brent, WTI, TTF
EVENTMarket events, geopolitical eventssanctions, OPEC+ cut, supply disruption
ORGANIZATIONNon-company organizations, bodiesOPEC, IEA, G7, US Energy Department
PERSONNamed individualsministers, executives, analysts

Usage

python
from transformers import pipeline

ner = pipeline(
    "token-classification",
    model="Quantbridge/energy-intelligence-multitask-ner",
    aggregation_strategy="simple",
)

text = (
    "Saudi Aramco announced a production cut of 1 million barrels per day "
    "amid falling crude oil prices at the Brent benchmark market."
)

results = ner(text)
for entity in results:
    print(f"{entity['word']:<30} {entity['entity_group']:<20} score={entity['score']:.3f}")

Example output:

Saudi Aramco                   COMPANY              score=0.981
crude oil                      COMMODITY            score=0.974
Brent                          MARKET               score=0.968

Load model directly

python
from transformers import AutoTokenizer, AutoModelForTokenClassification
import torch

model_name = "Quantbridge/energy-intelligence-multitask-ner"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForTokenClassification.from_pretrained(model_name)

inputs = tokenizer("Brent crude fell below $70 as OPEC+ met in Vienna.", return_tensors="pt")
with torch.no_grad():
    outputs = model(**inputs)

logits = outputs.logits
predicted_ids = logits.argmax(dim=-1)[0]
tokens = tokenizer.convert_ids_to_tokens(inputs["input_ids"][0])

for token, label_id in zip(tokens, predicted_ids):
    label = model.config.id2label[label_id.item()]
    if label != "O":
        print(f"{token:<20} {label}")

Model Details

PropertyValue
Base modeldistilbert-base-uncased
ArchitectureDistilBERT + token classification head
Parameters~67M
Max sequence length256 tokens
Training precisionFP16
OptimizerAdamW
Learning rate2e-5
Warmup ratio10%
Weight decay0.01
Epochs5

Training Data

The model was trained on a domain-specific dataset of English-language articles covering energy markets, commodities trading, geopolitics, and infrastructure. The dataset contains over 11,000 annotated examples with BIO (Beginning-Inside-Outside) tagging.

Dataset split:

SplitRecords
Train~9,200
Validation~1,150
Test~1,150

Evaluation

Evaluated on the held-out test set using seqeval (entity-level span matching).

MetricScore
Overall F1reported after training
Overall Precisionreported after training
Overall Recallreported after training

Per-entity F1 scores are available in label_map.json in the model repository.


Limitations

  • —Trained exclusively on English text.
  • —Best suited for formal news-style writing about energy markets and geopolitics.
  • —Performance may degrade on highly technical engineering documents or non-standard text formats.
  • —Entity boundaries follow a BIO scheme; overlapping or nested entities are not supported.

Citation

If you use this model in your work, please cite:

bibtex
@misc{quantbridge-energy-ner-2025,
  title  = {Energy Intelligence NER},
  author = {Quantbridge},
  year   = {2025},
  url    = {https://huggingface.co/Quantbridge/energy-intelligence-multitask-ner}
}

License

Apache 2.0 — see LICENSE.