Instructions to use bardsai/finance-sentiment-de-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bardsai/finance-sentiment-de-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="bardsai/finance-sentiment-de-base")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("bardsai/finance-sentiment-de-base") model = AutoModelForSequenceClassification.from_pretrained("bardsai/finance-sentiment-de-base") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("bardsai/finance-sentiment-de-base")
model = AutoModelForSequenceClassification.from_pretrained("bardsai/finance-sentiment-de-base")Finance Sentiment DE (base)
Finance Sentiment DE (base) is a model based on bert-base-german-cased for analyzing sentiment of German 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-de-base")
nlp("Der Nettoumsatz stieg um 30 % auf 36 Mio. EUR.")
[{'label': 'positive', 'score': 0.9987998807375955}]
Performance
| Metric | Value |
|---|---|
| f1 macro | 0.955 |
| precision macro | 0.960 |
| recall macro | 0.950 |
| accuracy | 0.966 |
| samples per second | 135.2 |
(The performance was evaluated on RTX 3090 gpu)
Changelog
- 2023-09-18: Initial release
License
This model is released under the MIT License, inherited from the base model bert-base-german-cased (MIT).
Attribution: bert-base-german-cased — deepset; Finance Sentiment DE (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
- 62
Model tree for bardsai/finance-sentiment-de-base
Base model
google-bert/bert-base-german-casedDataset used to train bardsai/finance-sentiment-de-base
Collection including bardsai/finance-sentiment-de-base
Evaluation results
- F1 (macro) on Financial PhraseBank (translated to German)self-reported0.955
- Precision (macro) on Financial PhraseBank (translated to German)self-reported0.960
- Recall (macro) on Financial PhraseBank (translated to German)self-reported0.950
- Accuracy on Financial PhraseBank (translated to German)self-reported0.966
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="bardsai/finance-sentiment-de-base")