CoolFace
Modelpublic

tabularisai/ModernFinBERT

sourceHugging Faceapache-2.0updated 10mo agoView on Hugging Face
13likes7.2kdownloads
README.md112 linesDownload Raw Back to root
1---2license: apache-2.03language:4- en5base_model:6- answerdotai/ModernBERT-base7pipeline_tag: text-classification8tags:9- synthetic data10- financial-sentiment-analysis11- sentiment-analysis12- crypto13- stocks14- finbert15- modernfinbert16- synthetic17---18 19# ModernFinBERT20 21[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/Discord%20button.png" width="200"/>](https://discord.gg/sznxwdqBXj)22 23 24<p align="center">25  <img src="ModernFinBERT.png" alt="ModernFinBERT" width="360">26</p>27 28 29A fine-tuned financial sentiment analysis model based on **ModernBERT**, trained on synthetic and real financial data cleaned through an automated AI agentic pipeline. The model covers diverse financial domains including news, tweets, crypto, and macroeconomics, making it the most general-purpose financial sentiment classifier. Benchmark results show superior performance with up to 48% accuracy improvement over existing models across multiple financial datasets.30 31For private API access or access to even more powerful financial models, contact us at **info@tabularis.ai**32 33# Quick Start34```python35from transformers import pipeline36 37# Load model38classifier = pipeline('text-classification', model='tabularisai/ModernFinBERT')39 40# Test sentences41sentences = [42    "The company reported strong quarterly earnings with revenue growth of 15% year-over-year, exceeding analyst expectations.",43    "Due to rising inflation and supply chain disruptions, the Federal Reserve decided to increase interest rates by 0.75 basis points.",44    "The merger between the two pharmaceutical giants is expected to create significant synergies and reduce operational costs by $2 billion annually."45]46 47# Evaluate48for i, sentence in enumerate(sentences, 1):49    result = classifier(sentence)50    print(f"Sentence {i}: {result[0]['label']} ({result[0]['score']:.3f})")51```52 53 54## Benchmark Results55| Dataset | Model | Accuracy | F1-Score | Precision | Recall | ROC-AUC |56|---------|-------|----------|----------|-----------|--------|---------|57| FIQA | ModernFinBERT | **0.80** | **0.61** | **0.64** | **0.88** | **0.96** |58| FIQA | distilroberta_financial | *0.54* | *0.47* | 0.61 | *0.71* | 0.71 |59| FIQA | finbert | 0.48 | 0.43 | 0.59 | 0.66 | 0.76 |60| FIQA | finbert-tone | 0.36 | 0.36 | *0.62* | 0.58 | 0.77 |61| FIQA | roberta_sentiment | 0.36 | 0.35 | 0.60 | 0.58 | *0.89* |62| Twitter | ModernFinBERT | 0.71 | *0.70* | *0.68* | **0.81** | **0.94** |63| Twitter | distilroberta_financial | *0.75* | **0.71** | *0.68* | *0.75* | *0.87* |64| Twitter | finbert-tone | 0.75 | 0.66 | **0.68** | 0.64 | 0.83 |65| Twitter | finbert | 0.73 | 0.67 | 0.65 | 0.70 | 0.86 |66| Twitter | roberta_sentiment | 0.70 | 0.61 | 0.63 | 0.60 | 0.82 |67| JeanBaptiste | ModernFinBERT | 0.74 | 0.58 | 0.71 | 0.56 | 0.84 |68| JeanBaptiste | distilroberta_financial | **0.88** | **0.79** | **0.92** | **0.74** | 0.86 |69| JeanBaptiste | finbert | *0.77* | *0.68* | 0.70 | *0.67* | **0.88** |70| JeanBaptiste | finbert-tone | 0.74 | 0.60 | 0.72 | 0.56 | *0.86* |71| JeanBaptiste | roberta_sentiment | 0.70 | 0.55 | *0.79* | 0.51 | 0.83 |72 73## Model Averages Across All Datasets74| Model | Accuracy | F1-Score | Precision | Recall | ROC-AUC |75|-------|----------|----------|-----------|--------|---------|76| **ModernFinBERT** | **0.75** | *0.63* | *0.68* | **0.75** | **0.91** |77| distilroberta_financial | *0.73* | **0.66** | **0.73** | *0.73* | 0.82 |78| finbert | 0.66 | 0.59 | 0.65 | 0.68 | *0.84* |79| finbert-tone | 0.62 | 0.54 | *0.68* | 0.59 | 0.82 |80| roberta_sentiment | 0.59 | 0.50 | 0.67 | 0.56 | *0.84* |81 82### Legend:83**Bold** = Best result per metric per dataset84 85*Italic* = Second best result per metric per dataset86 87 88 89<table align="center">90  <tr>91    <td align="center">92      <a href="https://www.linkedin.com/company/tabularis-ai/">93        <img src="https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/linkedin.svg" alt="LinkedIn" width="30" height="30">94      </a>95    </td>96    <td align="center">97      <a href="https://x.com/tabularis_ai">98        <img src="https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/x.svg" alt="X" width="30" height="30">99      </a>100    </td>101    <td align="center">102      <a href="https://github.com/tabularis-ai">103        <img src="https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/github.svg" alt="GitHub" width="30" height="30">104      </a>105    </td>106    <td align="center">107      <a href="https://tabularis.ai">108        <img src="https://cdn.jsdelivr.net/gh/simple-icons/simple-icons/icons/internetarchive.svg" alt="Website" width="30" height="30">109      </a>110    </td>111  </tr>112</table>