🚀 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 |