🚀 FinTwitBERT
FinTwitBERT是一個專門在大量金融推文數據集上進行預訓練的語言模型。這個專門的BERT模型旨在捕捉金融Twitter領域獨特的行話和交流風格,使其成為進行情感分析、趨勢預測和其他金融自然語言處理任務的理想工具。
🚀 快速開始
使用HuggingFace的transformers庫,可以將該模型和分詞器轉換為用於掩碼語言建模的管道。
from transformers import pipeline
pipe = pipeline(
"fill-mask",
model="StephanAkkerman/FinTwitBERT",
)
print(pipe("Bitcoin is a [MASK] coin."))
✨ 主要特性
情感分析
FinTwitBERT-sentiment模型利用FinTwitBERT對金融推文進行情感分析,為洞察市場主流情緒提供細緻入微的見解。
📦 安裝指南
文檔未提及安裝步驟,故跳過此章節。
💻 使用示例
基礎用法
from transformers import pipeline
pipe = pipeline(
"fill-mask",
model="StephanAkkerman/FinTwitBERT",
)
print(pipe("Bitcoin is a [MASK] coin."))
📚 詳細文檔
數據集
FinTwitBERT在多個金融推文數據集上進行了預訓練,這些數據集包含提及股票和加密貨幣的推文:
- [StephanAkkerman/crypto - stock - tweets](https://huggingface.co/datasets/StephanAkkerman/crypto - stock - tweets):8,024,269條推文
- [StephanAkkerman/stock - market - tweets - data](https://huggingface.co/datasets/StephanAkkerman/stock - market - tweets - data):923,673條推文
- [StephanAkkerman/financial - tweets](https://huggingface.co/datasets/StephanAkkerman/financial - tweets):263,119條推文
模型詳情
FinTwitBERT基於[FinBERT](https://huggingface.co/yiyanghkust/finbert - pretrain)模型和分詞器構建,它包含額外的掩碼(@USER
和[URL]
)以處理推文中的常見元素。該模型進行了10個週期的預訓練,並採用了提前停止策略以防止過擬合。
更多信息
如需全面瞭解,包括完整的訓練設置細節等內容,請訪問FinTwitBERT GitHub倉庫。
🔧 技術細節
文檔未提供足夠的技術實現細節,故跳過此章節。
📄 許可證
本項目採用MIT許可證。詳情請參閱LICENSE文件。
📚 引用與作者
如果您在研究中使用了FinTwitBERT或FinTwitBERT - sentiment,請按以下方式引用我們,需注意兩位作者對這項工作貢獻相同:
@misc{FinTwitBERT,
author = {Stephan Akkerman, Tim Koornstra},
title = {FinTwitBERT: A Specialized Language Model for Financial Tweets},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/TimKoornstra/FinTwitBERT}}
}
此外,如果您使用了情感分類器,請引用:
@misc{FinTwitBERT - sentiment,
author = {Stephan Akkerman, Tim Koornstra},
title = {FinTwitBERT - sentiment: A Sentiment Classifier for Financial Tweets},
year = {2023},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/StephanAkkerman/FinTwitBERT - sentiment}}
}
模型信息表格
屬性 |
詳情 |
模型類型 |
專門針對金融推文預訓練的語言模型 |
訓練數據 |
[StephanAkkerman/crypto - stock - tweets](https://huggingface.co/datasets/StephanAkkerman/crypto - stock - tweets):8,024,269條推文;[StephanAkkerman/stock - market - tweets - data](https://huggingface.co/datasets/StephanAkkerman/stock - market - tweets - data):923,673條推文;[StephanAkkerman/financial - tweets](https://huggingface.co/datasets/StephanAkkerman/financial - tweets):263,119條推文 |
評估指標 |
困惑度 |
基礎模型 |
yiyanghkust/finbert - pretrain |