arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.04497cs.LGcs.CCcs.CLcs.DS
收藏

大型语言模型训练中梯度计算的细粒度复杂性

The Fine-Grained Complexity of Gradient Computation for Training Large Language Models

Columbia University(哥伦比亚大学);Adobe Research(奥多比研究机构)

Josh Alman, Zhao Song

AI总结:

本文研究LLM训练中梯度计算的细粒度复杂性,证明其与注意力前向计算具有几乎相同的复杂性特征,从而完整刻画了训练每一步的复杂性。

摘要:

大型语言模型(LLMs)在过去几年中做出了根本性贡献。要训练一个LLM,需要交替运行“前向”计算和“后向”计算。前向计算可以被视为注意力函数评估,而后向计算可以被视为梯度计算。在先前的工作中,[Alman and Song, NeurIPS 2023]证明了在某些参数区域内,前向步骤可以在近线性时间内完成,但在其余参数区域内,除非流行的SETH假设为假,否则不存在真正次二次时间算法。在这项工作中,我们展示了对于计算单层注意力网络损失函数梯度这一看似更困难的问题,以及因此对于LLM训练的整个过程,结果几乎相同。这完全刻画了LLM训练每一步的细粒度复杂性。

英文摘要:

Large language models (LLMs) have made fundamental contributions over the last a few years. To train an LLM, one needs to alternatingly run `forward' computations and `backward' computations. The forward computation can be viewed as attention function evaluation, and the backward computation can be viewed as a gradient computation. In previous work by [Alman and Song, NeurIPS 2023], it was proved that the forward step can be performed in almost-linear time in certain parameter regimes, but that there is no truly sub-quadratic time algorithm in the remaining parameter regimes unless the popular hypothesis SETH is false. In this work, we show nearly identical results for the harder-seeming problem of computing the gradient of loss function of one layer attention network, and thus for the entire process of LLM training. This completely characterizes the fine-grained complexity of every step of LLM training.

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

↑