arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.13533cs.LGcs.AIcs.CLcs.DC
收藏

FinGPT-HPC:利用高性能计算为金融应用高效预训练与微调大语言模型

FinGPT-HPC: Efficient Pretraining and Finetuning Large Language Models for Financial Applications with High-Performance Computing

Columbia University(哥伦比亚大学);Shanghai University(上海大学);Johns Hopkins University(约翰斯·霍普金斯大学)

Xiao-Yang Liu, Jie Zhang, Guoxuan Wang, Weiqing Tong, Anwar Walid

AI总结:

本文提出 FinGPT-HPC,通过低秩结构替换线性层并结合 8 位/4 位量化,在金融 LLM 预训练中实现 1.3 倍加速与 2.64 倍压缩,微调精度提升最高 24%,模型小于 0.59 GB 可在手机端推理。

摘要:

大语言模型(LLMs)计算密集。其计算工作负载和内存占用随维度(层宽度)呈二次方增长。LLM 的大部分参数来自 transformer 结构的线性层,且高度冗余。这些线性层贡献了超过 80% 的计算工作负载和 99% 的模型规模。为了高效地预训练和微调 LLM,需要解决三个主要挑战:1)减少线性层的冗余;2)减少 GPU 内存占用;3)在使用分布式训练时提高 GPU 利用率。先前的方法,如 LoRA 和 QLoRA,分别利用低秩矩阵和量化来减少可训练参数数量和模型规模。然而,所得模型仍然消耗大量 GPU 内存。在本文中,我们提出了基于 GPU 的高性能方法,利用低秩结构为金融应用预训练和微调 LLM。我们将 transformer 结构中的一个传统线性层替换为两个更窄的线性层,这使我们能够将参数数量减少几个数量级。通过将参数量化为低精度(8 位和 4 位),所得模型的内存消耗进一步降低。与现有 LLM 相比,我们的方法在预训练中实现了 1.3 倍的加速和 2.64 倍的模型压缩比,且无精度下降。在微调方面,我们的方法在通用任务和金融任务中分别实现了 6.3% 和 24.0% 的平均精度提升,GPU 内存消耗比为 6.3 倍。我们的模型规模小于 0.59 GB,允许在智能手机上进行推理。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑