当前位置:   article > 正文

FinGPT:开源金融大语言模型

fingpt

由于金融科技机构的内部法规和政策,我们不要指望华尔街会开源法学硕士或开放 API。

FinGPT 蓝图

为什么选择 FinGPT?

1)。金融是高度动态的。BloombergGPT使用财务数据和通用数据的混合体培训了一名法学硕士,耗时约 53 天,成本约为300 万美元)。每个月或每周重新训练像 BloombergGPT 这样的 LLM 模型成本高昂,因此轻量级适配非常有利。FinGPT 可以快速微调以纳入新数据(成本显着下降,每次微调不到 300 美元)。

2)。互联网规模的金融数据民主化至关重要,例如使用自动数据管理管道及时更新模型(每月或每周更新)。BloombergGPT 拥有特权数据访问和 API,而 FinGPT 则提供了更易于访问的替代方案。它优先考虑轻量级适应,利用最好的开源法学硕士。

3)。关键技术是“RLHF(人类反馈强化学习)”,这是 BloombergGPT 中所缺失的。RLHF 使 LLM 模型能够学习个人偏好(风险规避水平、投资习惯、个性化机器人顾问等),这是 ChatGPT 和 GPT4 的“秘密”成分。

指令调优数据集和模型

我们使用的数据集和多任务金融 LLM模型可在https://huggingface.co/FinGPT上找到

数据集火车排测试行描述
手指情感列车76.8K不适用情感分析培训说明
芬普特·芬雷德27.6k5.11k财务关系提取说明
finpt 标题82.2k20.5k财务标题分析说明
指尖纳51198金融命名实体识别说明
fingpt-fiqa_qa17.1k不适用财务问答说明
芬普特·芬瓦尔1.06k265中文选择题说明

多任务金融法学硕士模型:

  demo_tasks = [
      'Financial Sentiment Analysis',
      'Financial Relation Extraction',
      'Financial Headline Classification',
      'Financial Named Entity Recognition',]
  demo_inputs = [
      "Glaxo's ViiV Healthcare Signs China Manufacturing Deal With Desano",
      "Apple Inc. Chief Executive Steve Jobs sought to soothe investor concerns about his health on Monday, saying his weight loss was caused by a hormone imbalance that is relatively simple to treat.",
      'gold trades in red in early trade; eyes near-term range at rs 28,300-28,600',
      'This LOAN AND SECURITY AGREEMENT dated January 27 , 1999 , between SILICON VALLEY BANK (" Bank "), a California - chartered bank with its principal place of business at 3003 Tasman Drive , Santa Clara , California 95054 with a loan production office located at 40 William St ., Ste .',]
  demo_instructions = [
      'What is the sentiment of this news? Please choose an answer from {negative/neutral/positive}.',
      'Given phrases that describe the relationship between two words/phrases as options, extract the word/phrase pair and the corresponding lexical relationship between them from the input text. The output format should be "relation1: word1, word2; relation2: word3, word4". Options: product/material produced, manufacturer, distributed by, industry, position held, original broadcaster, owned by, founded by, distribution format, headquarters location, stock exchange, currency, parent organization, chief executive officer, director/manager, owner of, operator, member of, employer, chairperson, platform, subsidiary, legal form, publisher, developer, brand, business division, location of formation, creator.',
      'Does the news headline talk about price going up? Please choose an answer from {Yes/No}.',
      'Please extract entities and their types from the input sentence, entity types should be chosen from {person/organization/location}.',]
楷模描述
fingpt-mt_llama2-7b_lora使用 LoRA 进行微调的 Llama2-7b 模型
fingpt-mt_falcon-7b_lora使用 LoRA 进行微调的 falcon-7b 模型
fingpt-mt_bloom-7b1_lora使用 LoRA 微调的Bloom-7b1模型
fingpt-mt_mpt-7b_lora带 LoRA 的微调 mpt-7b 模型
fingpt-mt_chatglm2-6b_lora使用 LoRA 微调 chatglm-6b 模型
fingpt-mt_qwen-7b_lora带 LoRA 的微调 qwen-7b 模型

FinGPT 演示:当前最先进的金融情绪分析

  • FinGPT V3(更新于 10/12/2023)

    • 新功能:在单个 RTX 3090 上进行情感分析的最佳可训练和可推断 FinGPT,甚至比 GPT-4 和 ChatGPT Finetuning 更好。

    • FinGPT v3系列是在新闻和推文情绪分析数据集上使用 LoRA 方法进行微调的法学硕士,以低成本在大多数金融情绪分析数据集上取得了最佳分数。

    • FinGPT v3.3 使用 llama2-13b 作为基础模型;FinGPT v3.2 使用 llama2-7b 作为基础模型;FinGPT v3.1 使用 chatglm2-6B 作为基础模型。

    • 基准测试结果:

    • 加权F1FPBFiQA-SA肿瘤坏死因子西北世界地理研究所设备时间成本
      FinGPT v3.30.8820.8740.9030.6431×RTX 309017.25 小时17.25 美元
      FinGPT v3.20.8500.8600.8940.6361×A1005.5小时22.55 美元
      FinGPT v3.10.8550.8500.8750.6421×A1005.5小时22.55 美元
      FinGPT(8 位)0.8550.8470.8790.6321×RTX 30906.47小时6.47 美元
      FinGPT (QLoRA)0.7770.7520.8280.5831×RTX 30904.15小时4.15 美元
      OpenAI 微调0.8780.8870.883----
      GPT-40.8330.6300.808----
      芬伯特0.8800.5960.7330.5384 个 NVIDIA K80 GPU--
      骆驼2-7B0.3900.8000.2960.5032048×A10021天423万美元
      彭博GPT0.5110.751--512×A10053天267万美元

      每 GPU 小时的成本。对于A100 GPU,以配备8个A100 GPU的AWS p4d.24xlarge实例作为基准来估算成本。请注意,BloombergGPT 还使用了 p4d.24xlarge 截至 2023 年 7 月 11 日,该实例的每小时费率为 32.773 美元。因此,每 GPU 小时的估计成本为 32.77 美元除以 8,结果约为4.10 美元。以此值作为参考单价(1 GPU 小时)。BloombergGPT 估计成本= 512 x 53 x 24 = 651,264 GPU 小时 x 4.10 美元 = 2,670,182.40 美元。对于RTX 3090,我们假设其每小时的成本约为1.0 美元,这实际上比vast.ai 等平台的可用 GPU 高得多。

    • 通过运行基准测试来重现结果,详细的教程即将推出。

    • 仅在 RTX 3090 上使用 LoRA 方法微调您自己的 FinGPT v3 模型,并使用此笔记本电脑的 8 位或此笔记本电脑的 int4 (QLoRA)

  • 芬格特V1

    • FinGPT 通过 LoRA 与中国市场的市场标记数据微调 ChatGLM2 / Llama2

教程

[培训] FinGPT 初学者指南:使用 LoRA 和 ChatGLM2–6B 进行培训 一台笔记本,10 美元 GPU

了解 FinGPT:教育博客系列

FinGPT 生态系统

FinGPT 采用 FinLLM 的全栈框架,分为五层:

  1. 数据源层:该层确保全面的市场覆盖,通过实时信息捕获解决金融数据的时间敏感性。
  2. 数据工程层:该层面向实时 NLP 数据处理,解决了金融数据中高时间敏感性和低信噪比的固有挑战。
  3. LLMs层:该层专注于LoRA等一系列微调方法,减轻了财务数据的高度动态性,确保了模型的相关性和准确性。
  4. 任务层:该层负责执行基本任务。这些任务作为 FinLLM 领域绩效评估和交叉比较的基准
  5. 应用层:展示实际应用和演示,凸显FinGPT在金融领域的潜在能力。
  • FinGPT 框架:开源金融大语言模型
  • FinGPT-RAG:我们提出了一个专门用于金融情绪分析的检索增强型大语言模型框架,通过外部知识检索优化信息深度和上下文,从而确保细致入微的预测。
  • FinGPT-FinNLP:FinNLP 为所有对金融领域的 LLM 和 NLP 感兴趣的人提供了一个游乐场。在这里,我们提供金融领域LLM培训和微调的完整渠道。完整的架构如下图所示。详细代码和介绍可以在这里找到。或者你可以参考维基百科
  • FinGPT-Benchmark:我们引入了一种针对金融领域的开源大型语言模型 (LLM) 进行优化的新型指令调优范例,增强了它们对不同金融数据集的适应性,同时还促进了针对特定任务、多任务、和零样本指令调整任务。

FinGPT 法学硕士层使用的开源基础模型

  • 请随意贡献更多针对各种特定语言的金融市场量身定制的开源基础模型。
基础型号预训练代币上下文长度型号优势型号尺寸实验结果应用领域
羊驼-22万亿4096Llama-2 在英语市场数据方面表现出色骆驼-2-7b骆驼-2-13bllama-2 始终表现出卓越的微调结果金融情绪分析、智能投顾
1,500B2048保持高质量的结果,同时提高资源效率猎鹰7b适合英语市场数据金融情绪分析
MPT1T2048MPT模型训练吞吐效率高且收敛稳定mpt-7b适合英语市场数据金融情绪分析
盛开366B2048全球最大的开放多语言语言模型布卢姆-7b1适合英语市场数据金融情绪分析
聊天GLM21.4T32K卓越的中文表达能力聊天glm2-6b展现中国市场数据实力财务情绪分析、财务报告摘要
奎文2.2T8k响应快、准确度高qwen-7b对中国市场数据有效金融情绪分析
实习生LM1.8T8k能够灵活、独立构建工作流程实习生-7b对中国市场数据有效金融情绪分析
  • 使用相同的 SFT (LoRA) 指令模板在金融情绪分析任务中对上述开源基础模型的基准结果:
    加权 F1/Acc骆驼2MPT盛开聊天GLM2奎文实习生LM
    FPB0.863/0.8630.846/0.8490.872 / 0.8720.810/0.8100.850/0.8490.854/0.8540.709/0.714
    FiQA-SA0.871 /0.8550.840/0.8110.863/0.8440.771/0.7530.864/ 0.8620.867/0.8510.679/0.687
    肿瘤坏死因子0.896/0.8950.893/0.8930.907 / 0.9070.840/0.8400.859/0.8​​580.883/0.8820.729/0.731
    西北世界地理研究所0.649/0.6510.636/0.6380.640/0.6410.573/0.5740.619/0.6290.638/0.6430.498/0.503

消息

AI4Finance 的 ChatGPT

介绍

开放 AI GPT 模型之旅。GPT 模型解释。打开AI的GPT-1、GPT-2、GPT-3。

(金融)大数据

有趣的演示

  • GPT-3 创意小说通过 OpenAI 的 GPT-3 模型进行创意写作,展示诗歌、对话、双关语、文学模仿和讲故事。加上有关有效 GPT-3 提示编程和避免常见错误的建议。

ChatGPT 金融科技

ChatGPT 交易机器人

引用FinGPT

  1. <span style="color:#1f2328"><span style="background-color:#ffffff"><span style="color:var(--fgColor-default, var(--color-fg-default))"><span style="background-color:var(--bgColor-muted, var(--color-canvas-subtle))"><code>@article{yang2023fingpt,
  2. title={FinGPT: Open-Source Financial Large Language Models},
  3. author={Yang, Hongyang and Liu, Xiao-Yang and Wang, Christina Dan},
  4. journal={FinLLM Symposium at IJCAI 2023},
  5. year={2023}
  6. }
  7. @article{zhang2023instructfingpt,
  8. title={Instruct-FinGPT: Financial Sentiment Analysis by Instruction Tuning of General-Purpose Large Language Models},
  9. author={Boyu Zhang and Hongyang Yang and Xiao-Yang Liu},
  10. journal={FinLLM Symposium at IJCAI 2023},
  11. year={2023}
  12. }
  13. @article{zhang2023fingptrag,
  14. title={Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language Models},
  15. author={Zhang, Boyu and Yang, Hongyang and Zhou, tianyu and Babar, Ali and Liu, Xiao-Yang},
  16. journal = {ACM International Conference on AI in Finance (ICAIF)},
  17. year={2023}
  18. }
  19. @article{wang2023fingptbenchmark,
  20. title={FinGPT: Instruction Tuning Benchmark for Open-Source Large Language Models in Financial Datasets},
  21. author={Wang, Neng and Yang, Hongyang and Wang, Christina Dan},
  22. journal={arXiv preprint arXiv:2310.04793},
  23. year={2023}
  24. }
  25. </code></span></span></span></span>

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Li_阴宅/article/detail/787491
推荐阅读
相关标签
  

闽ICP备14008679号