/ Модель

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

Контекст
512 токенов
Параметры
137 млн
Лицензия
CC BY-NC-SA 4.0
Архитектура
bert · dense
Базовая модель
finbert
Библиотека
transformers
Опубликована
15 окт 2026

finbert-financial-news-sentiment

Классификация текстаТекст → label4 профессии
138скачиваний за 30 дней0лайковвеса обновлены19 окт 2026

Описание модели

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

Дообученный FinBERT классифицирует тон англоязычных финансовых заголовков о криптовалютах, золоте и акциях как положительный, отрицательный или нейтральный.

Англоязычный классификатор тональности финансовых новостных заголовков, разработанный HuangYiYang на основе ProsusAI/finbert. Модель относит заголовок к одному из трёх классов: положительный, отрицательный или нейтральный. Она предназначена для мониторинга, поиска, аналитических панелей и исследований новостей о Bitcoin и криптовалютах, золоте и акциях США.

Это дообученная модель BERT для классификации последовательностей размером 136,7 млн параметров, с контекстом до 512 токенов. При обучении использовались LoRA-адаптеры ранга 16, впоследствии объединённые с весами; для запуска через Transformers PEFT не требуется. В описанном тесте на 826 заголовках модель показала точность 87,0% и macro-F1 0,812. Она оценивает тон заголовка, а не направление движения цены.

Обучение проводилось на англоязычных заголовках одного финансового новостного источника о Bitcoin, золотом ETF и ETF на S&P 500. Качество на других источниках и на полных текстах статей может отличаться; наиболее слабый класс — положительный. Разметка получена языковой моделью по заданным правилам, а не экспертами-людьми. Лицензия CC-BY-NC-SA-4.0 допускает использование с указанием авторства и на некоммерческих условиях, с распространением производных материалов на тех же условиях.

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

  • классификация тональности заголовков о Bitcoin и криптовалютах
  • оценка тональности новостей о золоте и золотых ETF
  • мониторинг новостей об акциях и рынке США
  • тегирование финансовых заголовков для поиска и аналитических панелей

Ограничения

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

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

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

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

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

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

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

Открыть на Hugging Face

FinBERT for financial news headline sentiment (LoRA-adapted)

A three-class sentiment classifier (positive / negative / neutral) for financial news headlines about Bitcoin and crypto, gold, and US stocks. It is ProsusAI/finbert fine-tuned with low-rank adapters (LoRA, rank 16) on 5,041 headlines labelled under a written rubric, with the adapters merged back in. The model has the same size and speed as FinBERT and loads with plain transformers; no PEFT is needed at inference.

On 826 headlines from six months after the training data (scored once), it reaches 87.0% accuracy and 0.812 macro-F1, against 50.1% and 0.436 for the original FinBERT.

The label describes the tone of the headline, not where a price will go. It is not a trading signal.

Quick start

from transformers import pipeline

clf = pipeline("text-classification", model="HuangYiYang/finbert-financial-news-sentiment", top_k=None)
clf("Bitcoin slips 6% as exchange outflows accelerate")
# [{'label': 'negative', 'score': ...}, {'label': 'neutral', ...}, {'label': 'positive', ...}]

Calibrated probabilities: the raw scores are overconfident. Divide the logits by the temperature T = 2.65 (fitted on validation data) before the softmax:

import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification

name = "HuangYiYang/finbert-financial-news-sentiment"
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForSequenceClassification.from_pretrained(name).eval()

batch = tok(["Gold hits record high as dollar weakens"], truncation=True, max_length=128,
            padding=True, return_tensors="pt")
with torch.no_grad():
    probs = torch.softmax(model(**batch).logits / 2.65, dim=-1)
print({model.config.id2label[i]: round(p, 3) for i, p in enumerate(probs[0].tolist())})

Labels: 0 = positive, 1 = negative, 2 = neutral (the same order as ProsusAI/finbert).

Results

Test set: 826 headlines published 1 April to 14 October 2026, after a 7-day gap following the training data. It keeps the natural class mix of the feed (74% neutral). 95% bootstrap intervals over 2,000 resamples.

ModelAccuracyMacro-F1
Always "neutral"0.7430.284
ProsusAI/finbert (no adaptation)0.501 (0.467–0.534)0.436 (0.400–0.471)
This model0.870 (0.846–0.893)0.812 (0.776–0.844)

McNemar's exact test against the original FinBERT: this model alone correct on 334 headlines, FinBERT alone on 29, p = 7.2e-67.

Per class:

ClassPrecisionRecallF1Headlines
positive0.650.800.72110
negative0.790.820.81102
neutral0.940.890.91614

Per asset:

AssetHeadlinesAccuracyMacro-F1
Bitcoin3000.8600.842
Gold2260.7960.774
US stocks3000.9370.592

The US-stock macro-F1 rests on only 10 polar headlines (97% of that test set is neutral), so its interval is wide.

  • Reversed polarity (positive read as negative or the reverse): 3 of 826 headlines (0.4%). Most errors are confusions with neutral.
  • Calibration: temperature T = 2.65 cuts the expected calibration error from 0.113 to 0.056 on the test set.

Training

Data. English headlines from a commercial financial news feed (Benzinga articles tagged with tickers) for Bitcoin, a gold ETF and an S&P 500 ETF, January 2015 to October 2026. The archive of 263,155 stored records was deduplicated and cleaned to 103,344 unique headlines. Headline text is the property of the provider and is not redistributed.

Labels. A stratified sample of 6,820 headlines was labelled under a written rubric:

  1. Judge the tone for the headline's main subject, as an investor holding it would.
  2. Reported facts (results vs estimates, analyst upgrades/downgrades, deals, lawsuits, reported price moves) are labelled by their likely effect on price. Questions, listicles, hype and bare predictions are neutral.
  3. Contrast rule: with but, despite, even as, while, although, the main clause decides.
  4. A reported price move decides the label; scheduled notices and directionless market statistics are neutral.
  5. When in doubt, neutral.

Labelling used blind passes by a large language model (Claude) given only the rubric and the headline. Agreement: Cohen's κ = 0.861 (1,713 doubly labelled headlines, 93.9% raw agreement), Fleiss' κ = 0.863 (three passes on all 826 test headlines). Test labels are the majority of three passes.

Split. Strictly by time: training and validation up to 24 March 2026, a 7-day embargo, then the test period. Validation is the most recent 15% of the labelled pool for each asset.

Method.

  • LoRA on the query, key, value and all dense projections of every layer; r = 16, α = 32, dropout 0.1; classification head trained in full; adapters merged after training.
  • AdamW, learning rate 5e-4, weight decay 0.01, batch 32, linear schedule with 6% warm-up, gradient clipping 1.0, mixed precision, early stopping on validation macro-F1 (patience 2, up to 8 epochs). Max length 128 tokens (keeps 99.98% of headlines whole).
  • Class and asset imbalance handled by a weighted sampler that draws every (asset, class) pair equally often; the loss is unweighted.
  • Settings chosen among four pre-declared (rank, learning rate) pairs on validation only. Trained on one 6 GB laptop GPU (RTX 4050).

What did not help. Task-adaptive pre-training (continued masked-LM training on 91,074 unlabelled training-period headlines) cut held-out perplexity from 89.7 to 9.9 but did not raise validation macro-F1 (0.831 ± 0.014 vs 0.834 ± 0.012 without it, three seeds each), so this model is built on the original FinBERT encoder.

eval_results.json holds the full test figures.

Intended use and limitations

  • Use: tagging the tone of English financial news headlines for monitoring, search, dashboards and research.
  • Not for: predicting price direction, or making investment decisions on its own.
  • Headlines only; long article bodies were not used in training.
  • One news provider and one six-month test period; accuracy on other sources may differ.
  • Labels come from a language model following a rubric, not from human experts; κ measures how consistently the rubric was applied. Macroeconomic releases reported against consensus and multi-asset market summaries were labelled less consistently.
  • Positive is the weakest class (precision 0.65): about 8% of neutral headlines are read as positive.

License

CC BY-NC-SA 4.0, inherited from the base model ProsusAI/finbert: non-commercial use, with attribution, and derivatives under the same license.

Citation

If you use this model, please cite FinBERT and LoRA:

@misc{araci2019finbert,
  author = {Araci, Dogu},
  title  = {FinBERT: Financial Sentiment Analysis with Pre-trained Language Models},
  year   = {2019}
}
@inproceedings{hu2022lora,
  author    = {Hu, Edward J. and Shen, Yelong and Wallis, Phillip and Allen-Zhu, Zeyuan and Li, Yuanzhi and Wang, Shean and Wang, Lu and Chen, Weizhu},
  title     = {LoRA: Low-Rank Adaptation of Large Language Models},
  booktitle = {ICLR},
  year      = {2022}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей