How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-classification", model="bardsai/finance-sentiment-pl-base")
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("bardsai/finance-sentiment-pl-base")
model = AutoModelForSequenceClassification.from_pretrained("bardsai/finance-sentiment-pl-base")
Quick Links

Finance Sentiment PL (base)

Finance Sentiment PL (base) is a model based on herbert-base for analyzing sentiment of Polish financial news. It was trained on the translated version of Financial PhraseBank by Malo et al. (2014) for 10 epochs on single RTX3090 gpu.

The model will give you a three labels: positive, negative and neutral.

How to use

You can use this model directly with a pipeline for sentiment-analysis:

from transformers import pipeline

nlp = pipeline("sentiment-analysis", model="bardsai/finance-sentiment-pl-base")
nlp("Sprzedaż netto wzrosła o 30% do 36 mln EUR.")
[{'label': 'positive', 'score': 0.9999998807907104}]

Performance

Metric Value
f1 macro 0.969
precision macro 0.971
recall macro 0.968
accuracy 0.976
samples per second 136.8

(The performance was evaluated on RTX 3090 gpu)

Changelog

  • 2022-12-01: Rename the model to finance-sentiment-pl-base
  • 2022-11-15: Initial release

License

This model is released under the Creative Commons Attribution 4.0 International (CC BY 4.0) license, inherited from the base model allegro/herbert-base-cased (also CC BY 4.0).

Attribution: HerBERT — Allegro ML Research and the Linguistic Engineering Group at the Institute of Computer Science, Polish Academy of Sciences; Finance Sentiment PL (base) — bards.ai.

About bards.ai

At bards.ai, we focus on providing machine learning expertise and skills to our partners, particularly in the areas of nlp, machine vision and time series analysis. Our team is located in Wroclaw, Poland. Please visit our website for more information: bards.ai

Let us know if you use our model :). Also, if you need any help, feel free to contact us at info@bards.ai

Downloads last month
57
Safetensors
Model size
0.1B params
Tensor type
I64
·
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for bardsai/finance-sentiment-pl-base

Finetuned
(12)
this model

Dataset used to train bardsai/finance-sentiment-pl-base

Collection including bardsai/finance-sentiment-pl-base

Evaluation results

  • F1 (macro) on Financial PhraseBank (translated to Polish)
    self-reported
    0.969
  • Precision (macro) on Financial PhraseBank (translated to Polish)
    self-reported
    0.971
  • Recall (macro) on Financial PhraseBank (translated to Polish)
    self-reported
    0.968
  • Accuracy on Financial PhraseBank (translated to Polish)
    self-reported
    0.976