/ Модель

Характеристики

Контекст
512 токенов
Параметры
137 млн
Лицензия
GPL 3.0
Архитектура
bert · dense
Библиотека
transformers
Опубликована
28 апр 2024

financebert

Классификация текстаТекст → label3 профессии

FinanceBERT — англоязычная BERT-модель для определения положительной, отрицательной или нейтральной тональности финансовых текстов.

155скачиваний за 30 дней0лайковвеса обновлены13 мая 2024

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

FinanceBERT — модель на архитектуре BERT, дообученная для анализа тональности финансовых текстов. Она классифицирует сообщения как положительные, отрицательные или нейтральные и предназначена для анализа финансовых новостей, отчётов и публикаций в социальных сетях.

Модель содержит 136,7 млн параметров, принимает текст на английском языке и поддерживает контекст до 512 токенов. Для неё указаны метрики на тестовой выборке: точность 92% и взвешенная F1-мера 92%; эти результаты относятся к описанной выборке и не гарантируют такое же качество на других данных.

Модель специализируется на финансовой тематике и может хуже работать с текстами из других областей. Её решения трудно интерпретировать, а качество зависит от смещений обучающих данных. Лицензия — GPL-3.0.

Сценарии применения

  • Определение тональности финансовых новостей
  • Классификация тональности финансовых отчётов
  • Анализ настроений в публикациях о финансах в социальных сетях

Ограничения

Модель рассчитана на финансовые тексты на английском языке и может хуже работать с другими темами и языками. Решения трудно интерпретировать, а смещения обучающих данных могут влиять на результаты.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

FinanceBERT

FinanceBERT is a transformer-based model specifically fine-tuned for sentiment analysis in the financial sector. It's designed to assess sentiments expressed in financial texts, aiding stakeholders in making data-driven financial decisions.

Model Description

FinanceBERT uses the BERT architecture, renowned for its deep contextual understanding. This model helps analyze sentiments in financial news articles, reports, and social media content, categorizing them into positive, negative, or neutral sentiments.

How to Use

To use FinanceBERT, you can load it with the Transformers library:

from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch

tokenizer = AutoTokenizer.from_pretrained('marcev/financebert')
model = AutoModelForSequenceClassification.from_pretrained('marcev/financebert')

def predict(text):
    inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True)
    outputs = model(**inputs)
    predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
    return predictions

text = "Your sample text here."
predict(text)

Examples

Try out these examples to see FinanceBert in action:

examples:

  • text: "The company's financial performance exceeded expectations this quarter."
  • text: "There are concerns that the recent scandal could lead to a decrease in shareholder trust."

Evaluation Results

FinanceBERT was evaluated on a held-out test set and achieved the following performance metrics:

  • Accuracy: 92%
  • F1-Score (Weighted): 92%
  • Evaluation Loss: 0.320

Detailed Performance Metrics

Classification Report:

Negative Sentiment - class_index: 0

  • precision: 0.84
  • recall: 0.90
  • f1_score: 0.87
  • support: 29

Neutral Sentiment - class_index: 1

  • precision: 0.94
  • recall: 0.94
  • f1_score: 0.94
  • support: 199

Positive Setniment - class_index: 2

  • precision: 0.90
  • recall: 0.88
  • f1_score: 0.89
  • support: 83

Confusion Matrix:

PredictedNegativeNeutralPositive
Actual Negative2621
Actual Neutral41887
Actual Positive1973

Limitations

FinanceBERT has been rigorously trained and tested to ensure reliable performance across a variety of financial texts. However, there are several limitations to consider:

  • Domain Specificity: Optimized for financial contexts, may not perform well on non-financial texts.
  • Language Support: Currently supports English only.
  • Data Bias: Reflects the bias inherent in its training data, which may not include diverse global financial perspectives.
  • Interpretability: As a deep learning model, it does not offer easy interpretability of its decision-making process.

License

This model is released under the GNU General Public License v3.0 (GPL-3.0), requiring that modifications and derivatives remain open source under the same license.

Acknowledgements

FinanceBERT was developed using the Transformers library by Hugging Face, trained on a curated dataset of financial texts.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · text-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
BertForSequenceClassification
Ревизия весов
0904675

0 моделей