Run this model with HF Jobs
Run scherrmann/GermanFinBert_SC_Sentiment on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/scherrmann/GermanFinBert_SC_Sentiment. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/scherrmann/GermanFinBert_SC_Sentiment on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use scherrmann/GermanFinBert_SC_Sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use scherrmann/GermanFinBert_SC_Sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="scherrmann/GermanFinBert_SC_Sentiment")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("scherrmann/GermanFinBert_SC_Sentiment") model = AutoModelForSequenceClassification.from_pretrained("scherrmann/GermanFinBert_SC_Sentiment", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
German FinBERT For Sentiment Analysis (Pre-trained From Scratch Version, Fine-Tuned for Financial Sentiment Analysis)
German FinBERT is a BERT language model focusing on the financial domain within the German language. In my paper, I describe in more detail the steps taken to train the model and show that it outperforms its generic benchmarks for finance specific downstream tasks.
This model is the pre-trained from scratch version of German FinBERT, after fine-tuning on a translated version of the financial news phrase bank of Malo et al. (2013). The data is available here.
Overview
Author Moritz Scherrmann
Paper: here
Architecture: BERT base
Language: German
Specialization: Financial sentiment
Base model: German_FinBert_SC
Fine-tuning
I fine-tune the model using the 1cycle policy of Smith and Topin (2019). I use the Adam optimization method of Kingma and Ba (2014) with standard parameters.I run a grid search on the evaluation set to find the best hyper-parameter setup. I test different values for learning rate, batch size and number of epochs, following the suggestions of Chalkidis et al. (2020). I repeat the fine-tuning for each setup five times with different seeds, to avoid getting good results by chance. After finding the best model w.r.t the evaluation set, I report the mean result across seeds for that model on the test set.
Results
Translated Financial news phrase bank (Malo et al. (2013)), see here for the data:
- Accuracy: 95.95%
- Macro F1: 92.70%
Authors
Moritz Scherrmann: scherrmann [at] lmu.de
For additional details regarding the performance on fine-tune datasets and benchmark results, please refer to the full documentation provided in the study.
See also:
- scherrmann/GermanFinBERT_SC
- scherrmann/GermanFinBERT_FP
- scherrmann/GermanFinBERT_FP_QuAD
- Downloads last month
- 10,366