FinGPT

AI4Finance-FoundationMIT活跃维护

开源金融大语言模型,提供训练好的模型和微调流程,用于金融情感分析、智能投顾等场景。

FinGPT: Open-Source Financial Large Language Models! Revolutionize 🔥 We release the trained model on HuggingFace.

v1.0.0发布于 2026-04-08 15:21 UTC21,548star +9 / 7 天3,048fork同步于 2026-11-10 17:23 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/AI4Finance-Foundation/FinGPT.git
cd FinGPT
pip install -r requirements.txt
pip install -e .
硬件要求按 README 说明

FinGPT v3.3 情感分析模型可在单张 RTX 3090 上训练和推理,v3.2/v3.1 使用 A100;使用云端 API 方式不需要 GPU。README 未说明 CPU 运行与显存具体数值。

纯 CPU 可运行支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

开源金融大语言模型项目,提供可低成本微调的金融 LLM 与情感分析、股价预测模型

开源金融大语言模型,提供训练好的模型和微调流程,用于金融情感分析、智能投顾等场景。

核心能力

  • 用 LoRA 在单张 RTX 3090 上微调金融情感分析模型
  • 发布 FinGPT-Forecaster 预测下周股价走势
  • 提供金融情感分析基准与多任务金融 LLM
  • 支持云端 API 与本地模型两种调用方式
  • 开源互联网规模金融数据整理流程

容易踩的坑

本地模型需要 GPU,README 提示本地模型 requires GPU;FinGPT-Forecaster 仅用美国 DOW 30 数据训练,其他市场需自行收集数据并微调;模型权重需从 HuggingFace 单独下载,不在仓库内。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

1 个版本v1.0.0
  1. v1.0.0FinGPT v1.0.0 – Open-Source Financial AI Platform最新正式版2026-04-08 · 2026-04-08 15:21 UTC

    FinGPT v1.0.0

    FinGPT is downloadable computer software for financial artificial intelligence, namely software for financial data analysis, sentiment analysis, forecasting, and large language model based research workflows.

    This release makes the FinGPT software available for download through the release assets and source code download options on this page.

    Features

    • Financial AI software toolkit
    • Market sentiment analysis
    • Forecasting workflows
    • Open-source development framework for finance

    Download this release using the assets and source code packages available here.

    AI4Finance Foundation

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    FinGPT: Open-Source Financial Large Language Models

    Downloads Downloads Join Discord Python 3.8 PyPI License

    Let us not expect Wall Street to open-source LLMs or open APIs, due to FinTech institutes' internal regulations and policies.

    Blueprint of FinGPT

    https://huggingface.co/FinGPT

    Visitors Discord

    Project Contributors

    FinGPT is an open-source financial large language model project developed and maintained by the AI4Finance Foundation.

    Key contributors include:

    • Hongyang (Bruce) Yang – research and development on financial large language models and related applications
    • [other contributors…]

    What's New:

    Quick Start

    🚀 Get started with FinGPT in minutes!

    For detailed setup instructions for running FinGPT locally or on Replit, including hardware requirements and troubleshooting, check out our comprehensive SETUP Guide.

    ❓ Have questions? Check our FAQ for answers to common questions about FinGPT usage, capabilities, and limitations.

    Installation

    # Clone the repository
    git clone https://github.com/AI4Finance-Foundation/FinGPT.git
    cd FinGPT
    
    # Install dependencies
    pip install -r requirements.txt
    pip install -e .
    

    Try the Demo

    Visit our HuggingFace Space to try FinGPT-Forecaster without any installation!

    Basic Usage

    # Using cloud API (no GPU required)
    import os
    os.environ['FINGPT_LLM_PROVIDER'] = 'openai'
    
    # Using local models (requires GPU)
    from transformers import AutoModelForCausalLM, AutoTokenizer
    from peft import PeftModel
    
    # See SETUP.md for detailed examples
    

    Why FinGPT?

    1). Finance is highly dynamic. BloombergGPT trained an LLM using a mixture of finance data and general-purpose data, which took about 53 days, at a cost of around $3M). It is costly to retrain an LLM model like BloombergGPT every month or every week, thus lightweight adaptation is highly favorable. FinGPT can be fine-tuned swiftly to incorporate new data (the cost falls significantly, less than $300 per fine-tuning).

    2). Democratizing Internet-scale financial data is critical, say allowing timely updates of the model (monthly or weekly updates) using an automatic data curation pipeline. BloombergGPT has privileged data access and APIs, while FinGPT presents a more accessible alternative. It prioritizes lightweight adaptation, leveraging the best available open-source LLMs.

    3). The key technology is "RLHF (Reinforcement learning from human feedback)", which is missing in BloombergGPT. RLHF enables an LLM model to learn individual preferences (risk-aversion level, investing habits, personalized robo-advisor, etc.), which is the "secret" ingredient of ChatGPT and GPT4.

    Milestone of AI Robo-Advisor: FinGPT-Forecaster

    Try the latest released FinGPT-Forecaster demo at our HuggingFace Space

    The dataset for FinGPT-Forecaster: https://huggingface.co/datasets/FinGPT/fingpt-forecaster-dow30-202305-202405

    Market Support: FinGPT-Forecaster is currently trained on US market data (DOW 30). For other markets (including China stock market), you would need to:

    1. Collect appropriate market data
    2. Fine-tune the model on the target market data
    3. Consider using FinGPT v1.x models which were designed for Chinese markets
    4. Adapt the data pipeline and model architecture for specific market characteristics

    demo_interface

    Enter the following inputs:

    1. ticker symbol (e.g. AAPL, MSFT, NVDA)
    2. the day from which you want the prediction to happen (yyyy-mm-dd)
    3. the number of past weeks where market news are retrieved
    4. whether to add the latest basic financials as additional information

    Click Submit! And you'll be responded with a well-rounded analysis of the company and a prediction for next week's stock price movement!

    For detailed and more customized implementation, please refer to FinGPT-Forecaster

    FinGPT Demos:

    Current State-of-the-arts for Financial Sentiment Analysis

    • FinGPT V3 (Updated on 10/12/2023)

      • What's new: Best trainable and inferable FinGPT for sentiment analysis on a single RTX 3090, which is even better than GPT-4 and ChatGPT Finetuning.

      • FinGPT v3 series are LLMs finetuned with the LoRA method on the News and Tweets sentiment analysis dataset which achieve the best scores on most of the financial sentiment analysis datasets with low cost.

      • FinGPT v3.3 use llama2-13b as base model; FinGPT v3.2 uses llama2-7b as base model; FinGPT v3.1 uses chatglm2-6B as base model.

      • Benchmark Results:

      • Weighted F1FPBFiQA-SATFNSNWGIDevicesTimeCost
        FinGPT v3.30.8820.8740.9030.6431 × RTX 309017.25 hours$17.25
        FinGPT v3.20.8500.8600.8940.6361 × A1005.5 hours$ 22.55
        FinGPT v3.10.8550.8500.8750.6421 × A1005.5 hours$ 22.55
        FinGPT (8bit)0.8550.8470.8790.6321 × RTX 30906.47 hours$ 6.47
        FinGPT (QLoRA)0.7770.7520.8280.5831 × RTX 30904.15 hours$ 4.15
        OpenAI Fine-tune0.8780.8870.883----
        GPT-40.8330.6300.808----
        FinBERT0.8800.5960.7330.5384 × NVIDIA K80 GPU--
        Llama2-7B0.3900.8000.2960.5032048 × A10021 days$ 4.23 million
        BloombergGPT0.5110.751--512 × A10053 days$ 2.67 million

        Cost per GPU hour. For A100 GPUs, the AWS p4d.24xlarge instance, equipped with 8 A100 GPUs is used as a benchmark to estimate the costs. Note that BloombergGPT also used p4d.24xlarge As of July 11, 2023, the hourly rate for this instance stands at $32.773. Consequently, the estimated cost per GPU hour comes to $32.77 divided by 8, resulting in approximately $4.10. With this value as the reference unit price (1 GPU hour). BloombergGPT estimated cost= 512 x 53 x 24 = 651,264 GPU hours x $4.10 = $2,670,182.40. For RTX 3090, we assume its cost per hour is approximately $1.0, which is actually much higher than available GPUs from platforms like vast.ai.

      • Reproduce the results by running benchmarks, and the detailed tutorial is on the way.

      • Finetune your own FinGPT v3 model with the LoRA method on only an RTX 3090 with this notebook in 8bit or this notebook in int4 (QLoRA)

    • FinGPT V1

      • FinGPT by finetuning ChatGLM2 / Llama2 with LoRA with the market-labeled data for the Chinese Market

    Instruction Tuning Datasets and Models

    The datasets we used, and the multi-task financial LLM models are available at https://huggingface.co/FinGPT

    Our Code

    DatasetsTrain RowsTest RowsDescription
    fingpt-sentiment-train76.8KN/ASentiment Analysis Training Instructions
    fingpt-finred27.6k5.11kFinancial Relation Extraction Instructions
    fingpt-headline82.2k20.5kFinancial Headline Analysis Instructions
    fingpt-ner51198Financial Named-Entity Recognition Instructions
    fingpt-fiqa_qa17.1kN/AFinancial Q&A Instructions
    fingpt-fineval1.06k265Chinese Multiple-Choice Questions Instructions

    Multi-task financial LLMs Models:

      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}.',]
    
    ModelsDescriptionFunction
    fingpt-mt_llama2-7b_loraFine-tuned Llama2-7b model with LoRAMulti-Task
    fingpt-mt_falcon-7b_loraFine-tuned falcon-7b model with LoRAMulti-Task
    fingpt-mt_bloom-7b1_loraFine-tuned bloom-7b1 model with LoRAMulti-Task
    fingpt-mt_mpt-7b_loraFine-tuned mpt-7b model with LoRAMulti-Task
    fingpt-mt_chatglm2-6b_loraFine-tuned chatglm-6b model with LoRAMulti-Task
    fingpt-mt_qwen-7b_loraFine-tuned qwen-7b model with LoRAMulti-Task
    fingpt-sentiment_llama2-13b_loraFine-tuned llama2-13b model with LoRASingle-Task
    fingpt-forecaster_dow30_llama2-7b_loraFine-tuned llama2-7b model with LoRASingle-Task

    Tutorials

    [Training] Beginner’s Guide to FinGPT: Training with LoRA and ChatGLM2–6B One Notebook, $10 GPU

    Understanding FinGPT: An Educational Blog Series

    FinGPT Ecosystem

    FinGPT embraces a full-stack framework for FinLLMs with five layers:

    1. Data source layer: This layer assures comprehensive market coverage, addressing the temporal sensitivity of financial data through real-time information capture.
    2. Data engineering layer: Primed for real-time NLP data processing, this layer tackles the inherent challenges of high temporal sensitivity and low signal-to-noise ratio in financial data.
    3. LLMs layer: Focusing on a range of fine-tuning methodologies such as LoRA, this layer mitigates the highly dynamic nature of financial data, ensuring the model’s relevance and accuracy.
    4. Task layer: This layer is responsible for executing fundamental tasks. These tasks serve as the benchmarks for performance evaluations and cross-comparisons in the realm of FinLLMs
    5. Application layer: Showcasing practical applications and demos, this layer highlights the potential capability of FinGPT in the financial sector.
    • FinGPT Framework: Open-Source Financial Large Language Models
    • FinGPT-RAG: We present a retrieval-augmented large language model framework specifically designed for financial sentiment analysis, optimizing information depth and context through external knowledge retrieval, thereby ensuring nuanced predictions.
    • FinGPT-FinNLP: FinNLP provides a playground for all people interested in LLMs and NLP in Finance. Here we provide full pipelines for LLM training and finetuning in the field of finance. The full architecture is shown in the following picture. Detail codes and introductions can be found here. Or you may refer to the wiki
    • FinGPT-Benchmark: We introduce a novel Instruction Tuning paradigm optimized for open-source Large Language Models (LLMs) in finance, enhancing their adaptability to diverse financial datasets while also facilitating cost-effective, systematic benchmarking from task-specific, multi-task, and zero-shot instruction tuning tasks.

    Cloud LLM Providers for FinGPT Inference

    For the Finogrid platform (finogrid/), FinGPT supports multiple cloud LLM providers as alternatives to running local models. Set FINGPT_LLM_PROVIDER in your environment:

    ProviderModelContext LengthUse Case
    OpenAIGPT-3.5-turbo16KDefault fallback for sentiment & agents
    MiniMaxMiniMax-M3512KLatest flagship model with 128K max output and image input support
    FinGPT (local)Llama-2-13B LoRA4KFull local inference (requires GPU)

    Open-Source Base Model used in the LLMs layer of FinGPT

    • Feel free to contribute more open-source base models tailored for various language-specific financial markets.
    Base ModelPretraining TokensContext LengthModel AdvantagesModel SizeExperiment ResultsApplications
    Llama-22 Trillion4096Llama-2 excels on English-based market datallama-2-7b and Llama-2-13bllama-2 consistently shows superior fine-tuning resultsFinancial Sentiment Analysis, Robo-Advisor
    Falcon1,500B2048Maintains high-quality results while being more resource-efficientfalcon-7bGood for English market dataFinancial Sentiment Analysis
    MPT1T2048MPT models can be trained with high throughput efficiency and stable convergencempt-7bGood for English market dataFinancial Sentiment Analysis
    Bloom366B2048World’s largest open multilingual language modelbloom-7b1Good for English market dataFinancial Sentiment Analysis
    ChatGLM21.4T32KExceptional capability for Chinese language expressionchatglm2-6bShows prowess for Chinese market dataFinancial Sentiment Analysis, Financial Report Summary
    Qwen2.2T8kFast response and high accuracyqwen-7bEffective for Chinese market dataFinancial Sentiment Analysis
    InternLM1.8T8kCan flexibly and independently construct workflowsinternlm-7bEffective for Chinese market dataFinancial Sentiment Analysis
    • Benchmark Results for the above open-source Base Models in the financial sentiment analysis task using the same instruction template for SFT (LoRA):
      Weighted F1/AccLlama2FalconMPTBloomChatGLM2QwenInternLM
      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
      TFNS0.896/0.8950.893/0.8930.907/0.9070.840/0.8400.859/0.8580.883/0.8820.729/0.731
      NWGI0.649/0.6510.636/0.6380.640/0.6410.573/0.5740.619/0.6290.638/0.6430.498/0.503

    All Thanks To Our Contributors :

    News

    ChatGPT at AI4Finance

    Introductory

    The Journey of Open AI GPT models. GPT models explained. Open AI's GPT-1, GPT-2, GPT-3.

    (Financial) Big Data

    Interesting Demos

    • GPT-3 Creative Fiction Creative writing by OpenAI’s GPT-3 model, demonstrating poetry, dialogue, puns, literary parodies, and storytelling. Plus advice on effective GPT-3 prompt programming & avoiding common errors.

    ChatGPT for FinTech

    Citing FinGPT

    @article{yang2023fingpt_open,
         title   = {FinGPT: Open-Source Financial Large Language Models},
         author  = {Yang, Hongyang and Liu, Xiao-Yang and Wang, Christina Dan},
         journal = {arXiv preprint arXiv:2306.06031},
         year    = {2023},
         url     = {https://arxiv.org/abs/2306.06031},
         note    = {First official FinGPT paper; FinLLM Workshop at IJCAI 2023}
    }
    
    @article{zhang2023instructfingpt,
         title={Instruct-FinGPT: Financial Sentiment Analysis by Instruction Tuning of General-Purpose Large Language Models}, 
         author={Boyu Zhang and Hongyang Yang and Xiao-Yang Liu},
         journal={FinLLM Symposium at IJCAI 2023},
         year={2023}
    }
    
    @article{zhang2023fingptrag,
         title={Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language Models},
         author={Zhang, Boyu and Yang, Hongyang and Zhou, tianyu and Babar, Ali and Liu, Xiao-Yang},
         journal = {ACM International Conference on AI in Finance (ICAIF)},
         year={2023}
    }
    
    @article{liang2024fingpt,
         title={FinGPT: enhancing sentiment-based stock movement prediction with dissemination-aware and context-enriched LLMs},
         author={Liang, Yixuan and Liu, Yuncong and Wang, Neng and Yang, Hongyang and Zhang, Boyu and Wang, Christina Dan},
         journal={AAAI 2025 Workshop GoodData},
         year={2025}
    }
    
    @article{wang2023fingptbenchmark,
         title={FinGPT: Instruction Tuning Benchmark for Open-Source Large Language Models in Financial Datasets},
         author={Wang, Neng and Yang, Hongyang and Wang, Christina Dan},
         journal={NeurIPS Workshop on Instruction Tuning and Instruction Following},
         year={2023}
    }
    
    @article{2023finnlp,
         title={Data-centric FinGPT: Democratizing Internet-scale Data for Financial Large Language Models},
         author={Liu, Xiao-Yang and Wang, Guoxuan and Yang, Hongyang and Zha, Daochen},
         journal={NeurIPS Workshop on Instruction Tuning and Instruction Following},
         year={2023}
    }
    
    

    LICENSE

    MIT License

    Disclaimer: We are sharing codes for academic purposes under the MIT education license. Nothing herein is financial advice, and NOT a recommendation to trade real money. Please use common sense and always first consult a professional before trading or investing.