Large language models (LLMs) have demonstrated great potential in natural language processing tasks within the financial domain. In this work, we present a Chinese Financial Generative Pre-trained Transformer framework, named CFGPT, which includes a dataset~(CFData) for pre-training and supervised fine-tuning, a financial LLM~(CFLLM) to adeptly manage financial texts, and a deployment framework~(CFAPP) designed to navigate real-world financial applications. The CFData comprising both a pre-training dataset and a supervised fine-tuning dataset, where the pre-training dataset collates Chinese financial data and analytics, alongside a smaller subset of general-purpose text with 584M documents and 141B tokens in total, and the supervised fine-tuning dataset is tailored for six distinct financial tasks, embodying various facets of financial analysis and decision-making with 1.5M instruction pairs and 1.5B tokens in total. The CFLLM, which is based on InternLM-7B to balance the model capability and size, is trained on CFData in two stage, continued pre-training and supervised fine-tuning. The CFAPP is centered on large language models (LLMs) and augmented with additional modules to ensure multifaceted functionality in real-world application. Our codes are released at https://github.com/TongjiFinLab/CFGPT.
翻译:大型语言模型(LLMs)在金融领域的自然语言处理任务中展现出巨大潜力。本文提出一个名为CFGPT的中文金融生成式预训练Transformer框架,该框架包含用于预训练和监督微调的数据集(CFData)、能高效处理金融文本的金融大语言模型(CFLLM),以及面向真实金融应用场景的部署框架(CFAPP)。其中,CFData由预训练数据集和监督微调数据集构成:预训练数据集整合了中文金融数据与分析,并包含少量通用文本,共计5.84亿篇文档、1410亿词元;监督微调数据集则针对六种不同的金融任务定制,涵盖金融分析与决策的多个方面,包含150万条指令对、15亿词元。CFLLM基于InternLM-7B构建,以平衡模型能力与规模,并通过两阶段(持续预训练和监督微调)在CFData上进行训练。CFAPP以大型语言模型(LLMs)为核心,并集成附加模块以增强真实应用中的多功能性。我们的代码已开源至https://github.com/TongjiFinLab/CFGPT。