ALFFLLM·FINANCE

The List / Foundation and Domain Language Models / paper

BloombergGPT: A Large Language Model for Finance

Shijie Wu; Ozan Irsoy; Steven Lu; Vadim Dabravolski; Mark Dredze; Sebastian Gehrmann; P. Kambadur; David Stuart Rosenberg; Gideon Mann

2023arXiv.orgcites 1,294P0arXiv ↗Semantic Scholar ↗Source ↗

Abstract

The use of NLP in the realm of financial technology is broad and complex, with applications ranging from sentiment analysis and named entity recognition to question answering. Large Language Models (LLMs) have been shown to be effective on a variety of tasks; however, no LLM specialized for the financial domain has been reported in literature. In this work, we present BloombergGPT, a 50 billion parameter language model that is trained on a wide range of financial data. We construct a 363 billion token dataset based on Bloomberg's extensive data sources, perhaps the largest domain-specific dataset yet, augmented with 345 billion tokens from general purpose datasets. We validate BloombergGPT on standard LLM benchmarks, open financial benchmarks, and a suite of internal benchmarks that most accurately reflect our intended usage. Our mixed dataset training leads to a model that outperforms existing models on financial tasks by significant margins without sacrificing performance on general LLM benchmarks. Additionally, we explain our modeling choices, training process, and evaluation methodology. We release Training Chronicles (Appendix C) detailing our experience in training BloombergGPT.

In one sentence

BloombergGPT is a 50 billion parameter language model trained on a mixed corpus of 363 billion financial tokens and 345 billion general tokens, demonstrating superior performance on financial benchmarks while maintaining competitive general NLP capabilities.

Summary

The paper addresses the lack of large language models specialized for the financial domain, noting that while general LLMs exist, they often underperform on complex financial tasks due to domain-specific terminology and data structures. The authors position BloombergGPT as a solution that bridges the gap between general-purpose models and narrow domain models by adopting a mixed-training approach. This strategy aims to achieve best-in-class results on financial benchmarks without sacrificing performance on general language understanding tasks, thereby providing a versatile tool for financial technology applications ranging from sentiment analysis to question answering. The core methodology involves training a 50 billion parameter decoder-only transformer model based on the BLOOM architecture. The training dataset, termed FinPile, comprises 363 billion tokens of curated financial data—including web content, news, company filings (10-K/10-Q), press releases, and proprietary Bloomberg data—augmented with 345 billion tokens from public datasets like The Pile, C4, and Wikipedia. The model utilizes a custom Unigram tokenizer with a 131,072 vocabulary size to improve tokenization efficiency for financial text. Training was conducted on 64 A100 GPUs using AdamW optimization, cosine decay learning rates, and activation checkpointing, following Chinchilla scaling laws to determine the optimal parameter-to-token ratio given the compute budget. Evaluation results indicate that BloombergGPT significantly outperforms existing models on open financial benchmarks and internal sentiment analysis tasks, validating the efficacy of the mixed-data training strategy. The model also maintains competitive performance on general LLM benchmarks such as MMLU and BIG-bench Hard. The paper provides extensive details on the training process, including troubleshooting pathological gradient norms and learning rate adjustments. However, the model is not publicly released due to the proprietary nature of the financial data, and the authors highlight limitations regarding the potential for data leakage in temporal evaluations and the computational costs associated with training such large models.

Research problem

The paper identifies a gap in the availability of Large Language Models (LLMs) specialized for the financial domain. While general-purpose LLMs exist, they often lack the precision required for complex financial tasks due to the unique terminology, structure, and nuance of financial data. The research problem is to develop an LLM that excels in financial applications without compromising general language capabilities.

Core contributions

  • Introduction of BloombergGPT, a 50 billion parameter LLM specifically designed for financial applications.
  • Construction of FinPile, a 708 billion token dataset comprising 363 billion curated financial tokens and 345 billion general tokens.
  • Demonstration that mixed-domain training (financial + general) yields superior financial performance compared to domain-only models while preserving general NLP capabilities.
  • Development of a custom Unigram tokenizer optimized for financial text, improving tokenization efficiency over standard BPE methods.
  • Detailed documentation of large-scale LLM training challenges, including gradient norm pathologies and optimization strategies in the 'Training Chronicles' appendix.

Method

  • Decoder-only causal language model architecture based on BLOOM with 70 layers and 50.6B parameters.
  • Mixed dataset training combining curated financial data with public general-purpose datasets.
  • Unigram tokenizer with 131,072 vocabulary size, trained on The Pile, using byte-level pretokenization.
  • AdamW optimizer with cosine decay learning rate schedule and batch size warmup.
  • Activation checkpointing and gradient clipping to manage memory and stability during training.
  • Evaluation via few-shot prompting on standard and internal financial benchmarks.

Results & findings

  • BloombergGPT outperforms existing models on financial tasks by significant margins.
  • The model maintains performance on general LLM benchmarks comparable to or better than general-purpose models of similar size.
  • The mixed training approach (51% financial, 49% general) proved effective for balancing domain specificity and generalization.
  • The custom Unigram tokenizer reduced token count compared to BPE, allowing more information per context window.
  • Training required significant computational resources (64 A100 GPUs) and careful hyperparameter tuning to avoid instability.
  • Internal financial benchmarks showed higher sensitivity to domain-specific nuances than public benchmarks.

Data & experiments

  • FinPile dataset: 363B financial tokens from Bloomberg archives (web, news, filings, press, proprietary data) and 345B general tokens (The Pile, C4, Wikipedia).
  • External financial benchmarks: Sentiment analysis, named entity recognition, and other standard financial NLP tasks.
  • Internal benchmarks: Proprietary Bloomberg tasks designed to reflect real-world usage scenarios.
  • General LLM benchmarks: MMLU, BIG-bench Hard, and held-out perplexity metrics.
  • Ablation studies on tokenizer choices and training hyperparameters.

Limitations & caveats

  • The model and training data are not publicly available, limiting reproducibility and external validation.
  • The financial data is proprietary and curated by Bloomberg, potentially introducing biases or gaps not present in public data.
  • The model's performance on temporal tasks may be affected by data leakage if not carefully managed.
  • The high computational cost of training limits accessibility for smaller research teams.
  • The paper acknowledges that the validation set may not fully represent the distribution of all financial data.

Curator notes

50B-parameter model trained on financial and general-purpose corpora.