Skip to main content
QUICK REVIEW

[論文レビュー] FinGPT-HPC: Efficient Pretraining and Finetuning Large Language Models for Financial Applications with High-Performance Computing

Xiaoyang Liu, Jie Zhang|arXiv (Cornell University)|Feb 21, 2024
Mathematics, Computing, and Information ProcessingComputer Science被引用数 3
ひとこと要約

本稿では、金融分野の応用における大規模言語モデル(LLMs)の事前学習および微調整のための、メモリ使用量と学習時間を著しく削減する高性能コンピューティングフレームワークであるFinGPT-HPCを提案する。標準的な線形層を狭い低ランク行列に置き換え、4ビットまたは8ビットに量子化することで、モデルの圧縮比が最大2.64倍、事前学習時の速度向上が1.3倍に達し、金融分野の微調整タスクでは6.3倍のメモリ削減と24%の精度向上を達成した。

ABSTRACT

Large language models (LLMs) are computationally intensive. The computation workload and the memory footprint grow quadratically with the dimension (layer width). Most of LLMs' parameters come from the linear layers of the transformer structure and are highly redundant. These linear layers contribute more than 80% of the computation workload and 99% of the model size. To pretrain and finetune LLMs efficiently, there are three major challenges to address: 1) reducing redundancy of the linear layers; 2) reducing GPU memory footprint; 3) improving GPU utilization when using distributed training. Prior methods, such as LoRA and QLoRA, utilized low-rank matrices and quantization to reduce the number of trainable parameters and model size, respectively. However, the resulting model still consumes a large amount of GPU memory. In this paper, we present high-performance GPU-based methods that exploit low-rank structures to pretrain and finetune LLMs for financial applications. We replace one conventional linear layer of the transformer structure with two narrower linear layers, which allows us to reduce the number of parameters by several orders of magnitude. By quantizing the parameters into low precision (8-bit and 4-bit), the memory consumption of the resulting model is further reduced. Compared with existing LLMs, our methods achieve a speedup of 1.3X and a model compression ratio of 2.64X for pretaining without accuracy drop. For finetuning, our methods achieve an average accuracy increase of 6.3% and 24.0% in general tasks and financial tasks, respectively, and GPU memory consumption ratio of 6.3X. The sizes of our models are smaller than 0.59 GB, allowing inference on a smartphone.

研究の動機と目的

  • 金融分野の応用における大規模言語モデル(LLMs)の事前学習および微調整にかかる高コストな計算とメモリ使用量を低減すること。
  • 計算量の80%以上、モデルサイズの99%以上を占めるトランスフォーマーの線形層に生じる冗長性を低減すること。
  • 分散学習中のGPUメモリフットプリントを最小限に抑え、GPUの利用効率を向上させること。
  • 最小限の精度低下と低いメモリ消費量で、金融データセットに対するLLMsの効率的な微調整を可能にすること。
  • モデルサイズを0.59 GB未満に圧縮することで、エッジデバイスへの大規模金融LLMsのデプロイを可能にすること。

提案手法

  • トランスフォーマー構造内の標準的な線形層を、パラメータ数を桁違いに削減する2つの狭い低ランク線形層(AおよびB)に置き換える。
  • 事前学習済み重みに対して低ランク分解を適用し、効率的な事前学習を可能にする圧縮された低ランクLLMを初期化する。
  • 混合精度量子化(4ビットおよび8ビット)を適用して、さらにモデルサイズを圧縮し、GPUメモリ使用量を削減する。
  • 学習中のピーク中間活性化メモリを削減するために再計算技術を採用する。
  • パイプラインモデル並列学習を実装し、複数のGPUにおけるGPU利用効率を向上させる。
  • 微調整の際には、事前学習済み重みを固定し、並列パスに低ランクアダプタを追加し、低ランクパラメータのみを学習する。

実験結果

リサーチクエスチョン

  • RQ1線形層の低ランク分解は、性能を損なわせることなく、LLMsにおける学習可能なパラメータ数を著しく削減できるか?
  • RQ24ビットおよび8ビットの量子化は、金融LLMsの事前学習および微調整におけるGPUメモリフットプリントをどの程度削減できるか?
  • RQ3提案手法は、金融タスクおよび一般NLPタスクにおける精度を維持または向上させながら、より高速な学習および推論時間を達成できるか?
  • RQ4低ランク適応と量子化の組み合わせは、低メモリ消費量で大規模LLMsの微調整を可能にするのにどの程度有効か?
  • RQ5得られたモデルは、モバイルデバイスやエッジデバイスへのデプロイに適したサイズに圧縮できるか?

主な発見

  • GPT2-1.5Bの事前学習において、精度に変化がなく、1.3倍の高速化と2.64倍のモデル圧縮比を達成した。
  • Llama2-13Bの微調整において、金融タスクで平均24.0%の精度向上と、GPUメモリ使用量の6.3倍削減を達成した。
  • モデルサイズを0.59 GB未満に圧縮し、スマートフォンでのデバイス内推論を可能にした。
  • 一般NLPタスクにおいて、低ランク適応を施した微調整済みLlama2-13Bモデルは、8ビット量子化で平均15.5%の精度向上を達成した。
  • 4ビット量子化されたLlama2-13B-r8モデルは、メモリ使用量を26.2 GBから9.8 GBに削減し、11.8倍の圧縮比を達成した。
  • GPT2-1.5Bでは推論速度が1.9倍向上し、GPT2-127Mでは1.2倍向上した。これは、モデルサイズの削減と効率的な計算によるものである。

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。