AI4Finance-Foundation/FinGPT

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

FinGPT – Open‑Source Financial Large Language Models

FinGPT is a suite of open‑source large language models (LLMs) that have been fine‑tuned for finance. The project, maintained by the AI4Finance Foundation, provides:

  • Multi‑task financial LLMs (sentiment analysis, relation extraction, headline classification, NER, QA, etc.) built on popular base models such as Llama‑2, Falcon, Bloom, MPT, ChatGLM‑2, and Qwen, all adapted with LoRA/QLoRA for low‑cost training.
  • Specialised single‑task models like FinGPT‑Forecaster (stock‑price forecasting for the Dow‑30) and FinGPT‑Sentiment (state‑of‑the‑art sentiment classifiers that run on a single RTX 3090).
  • A full‑stack framework that covers data collection, engineering, model fine‑tuning, benchmark evaluation, and downstream applications (RAG, robo‑advisor demos, etc.).
  • Publicly released datasets for instruction‑tuning (sentiment, relation extraction, headline analysis, NER, QA, Chinese finance MCQs) hosted on Hugging Face.
  • Benchmarks comparing the fine‑tuned models against OpenAI, GPT‑4, BloombergGPT, FinBERT, etc., with cost‑per‑GPU‑hour calculations to highlight the affordability of the approach.

Key Features

Feature What it means
LoRA/QLoRA fine‑tuning Enables rapid adaptation of large base models using only a single consumer‑grade GPU (e.g., RTX 3090) and a few dollars of compute.
Instruction‑tuned multi‑task models One model can handle several finance‑specific tasks, reducing the need to maintain many separate models.
Retrieval‑Augmented Generation (FinGPT‑RAG) Adds an external knowledge retrieval step for richer, up‑to‑date financial sentiment analysis.
Open‑source checkpoints All models are published on Hugging Face (e.g., fingpt-sentiment_llama2-13b_lora, fingpt-forecaster_dow30_llama2-7b_lora).
Benchmark suite Scripts and notebooks to reproduce performance numbers on standard finance datasets (FPB, FiQA‑SA, TFNS, NWGI).
Demo interfaces Hugging Face Spaces for FinGPT‑Forecaster and other demos, allowing users to try the models without any installation.

Typical Use Cases

  • Robo‑advisor / stock‑price forecasting – FinGPT‑Forecaster predicts next‑week price movement for a given ticker using recent news and financials.
  • Financial sentiment analysis – Classify news or tweets as positive/neutral/negative for trading signals.
  • Relation extraction & NER – Pull structured information (e.g., company‑executive relationships, legal entities) from filings or news.
  • Headline classification – Detect whether a headline implies a price increase.
  • Custom instruction‑tuned agents – Fine‑tune a multi‑task model on proprietary market data to create a private finance‑assistant.

Getting Started (quick‑start)

# Clone & install
git clone https://github.com/AI4Finance-Foundation/FinGPT.git
cd FinGPT
pip install -r requirements.txt
pip install -e .
  • Run locally – Load a model with transformers and peft (LoRA) as shown in the README.
  • Use the cloud API – Set FINGPT_LLM_PROVIDER=openai to call an external LLM without a GPU.
  • Try the demo – Visit the Hugging Face Space FinGPT/FinGPT-Forecaster for an instant web UI.

Detailed setup, hardware requirements, and troubleshooting are documented in SETUP.md and FAQ.md.


License & Community

  • License: Apache‑2.0 (per the badge in the README).
  • Community: Discord server (invite link in the badge), active issue tracker, and regular paper releases (NeurIPS 2023 Instruction Workshop, ICAIF‑23, IJCAI 2023). The project also publishes blog posts and tutorials on Medium and maintains a Hugging Face hub for models and datasets.

TL;DR

FinGPT delivers affordable, open‑source LLMs that are tailored to finance. By leveraging LoRA‑based fine‑tuning on publicly available market data, it lets researchers and developers run high‑performing sentiment, extraction, and forecasting models on modest hardware, while providing a full ecosystem (datasets, benchmarks, demos, and community support) for building finance‑focused AI applications.

Related

  • Project
  • Dispatch
  • Dispatch
  • Project
  • Project