Ner Bilstm Financial

Transformer+BiLSTM token classifier for financial NER.

Load

import torch
from huggingface_hub import hf_hub_download
from src.models import TransformerBiLSTMTokenClassifier

weights_path = hf_hub_download(repo_id="gra1111/ner-bilstm-financial", filename="pytorch_model.pt")

config = {
  "model_name": "ProsusAI/finbert",
  "num_labels": 7,
  "lstm_hidden_size": 256,
  "lstm_layers": 1,
  "dropout": 0.1
}
model = TransformerBiLSTMTokenClassifier(**config)
model.load_state_dict(torch.load(weights_path, map_location="cpu"))
model.eval()
Downloads last month
5
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support