***** 2022年6月2日:更多微調的Finbert模型*****
請訪問Finbert.ai,以獲取有關Finbert最近發展的更多詳細信息。
我們在幾個財務NLP任務上進行了微調的Finbert預估計模型,所有表現都優於傳統的機器學習模型,深度學習模型和微調的BERT模型。所有調整的Finbert模型都在Huggingface公開託管?具體來說,我們有以下內容:
在這個github回購中,
背景:
FinBERT是經濟傳播文本預先培訓的BERT模型。目的是增強Finaincal NLP研究和實踐。它在以下三個Finanical Communication語料庫中進行了培訓。總數為4.9b代幣。
FinBERT在各種財務NLP任務上都會取得最先進的績效,包括情感分析,ESG分類,前瞻性陳述(FLS)分類。隨著FinBERT的發布,我們希望從業者和研究人員可以將FinBERT用於更廣泛的應用程序,在這些應用程序中,預測目標超越了情感,例如與財務相關的成果,包括股票收益,股票波動,股票波動,公司欺詐等。
***** 2021年7月30日:遷移到擁抱面? *****
對金融情感分類的微調FinBERT模型已上傳並與Huggingface的transformers圖書館集成在一起。該模型對分析師報告的10,000個手動註釋(正,負,中性)句子進行了微調。該模型在財務基調Anlaysis任務上取得了出色的表現。如果您只是有興趣使用FinBERT進行財務基調分析,請嘗試一下。
from transformers import BertTokenizer , BertForSequenceClassification
import numpy as np
finbert = BertForSequenceClassification . from_pretrained ( 'yiyanghkust/finbert-tone' , num_labels = 3 )
tokenizer = BertTokenizer . from_pretrained ( 'yiyanghkust/finbert-tone' )
sentences = [ "there is a shortage of capital, and we need extra financing" ,
"growth is strong and we have plenty of liquidity" ,
"there are doubts about our finances" ,
"profits are flat" ]
inputs = tokenizer ( sentences , return_tensors = "pt" , padding = True )
outputs = finbert ( ** inputs ) [ 0 ]
labels = { 0 : 'neutral' , 1 : 'positive' , 2 : 'negative' }
for idx , sent in enumerate ( sentences ) :
print ( sent , '----' , labels [ np . argmax ( outputs . detach ( ) . numpy ( ) [ idx ] ) ] )
'' '
there is a shortage of capital , and we need extra financing -- -- negative
growth is strong and we have plenty of liquidity -- -- positive
there are doubts about our finances -- -- negative
profits are flat -- -- neutral
'' '
***** 2020年6月16日:審計的Finbert模型發布*****
我們提供四個版本的預訓練的Finbert重量。
FinVocab是使用句子圖書館在我們的金融語料庫上的新文字詞彙。我們同時生產了FinVocab的殼體版本和未固定版本,尺寸分別為28,573和30,873個令牌。這與原始的Bert Cased和未固定的BaseVocab的28,996和30,522代幣大小非常相似。
@misc{yang2020finbert,
title={FinBERT: A Pretrained Language Model for Financial Communications},
author={Yi Yang and Mark Christopher Siy UY and Allen Huang},
year={2020},
eprint={2006.08097},
archivePrefix={arXiv},
}
如果您有任何疑問,請發布github問題或聯繫[email protected]。