arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2307.08352cs.LGstat.ML
收藏

用于 Softmax 注意力优化的零阶算法

Zero-th Order Algorithm for Softmax Attention Optimization

The University of Washington(华盛顿大学);Huazhong Agricultural University(华中农业大学);Adobe Research(奥多比研究院)

Yichuan Deng, Zhihang Li, Sridhar Mahadevan, Zhao Song

AI总结:

针对大语言模型中梯度计算昂贵的问题,本文提出专为 Softmax 优化设计的零阶算法,仅用前向传播近似梯度并证明其收敛性。

摘要:

大语言模型(LLM)已经给人类社会带来了重大变革。在 LLM 的关键计算中,softmax 单元具有十分重要的地位。它帮助模型在给定一系列输入词的情况下,针对潜在的后续词或短语生成概率分布。通过利用这一分布,模型会依据所分配的概率选择最可能的下一个词或短语。softmax 单元在 LLM 训练中承担关键功能,因为它通过调整神经网络的权重和偏置,促进模型从数据中学习。随着 LLM 规模不断增大,计算梯度的代价变得很高。然而,零阶方法仅需前向传播即可近似计算梯度。本文提出一种专门为 Softmax 优化定制的零阶算法。我们证明了该算法的收敛性,并强调其在为大规模 LLM 高效计算梯度方面的有效性。通过利用零阶方法,本工作推动了复杂语言模型场景下优化技术的发展。

英文摘要:

Large language models (LLMs) have brought about significant transformations in human society. Among the crucial computations in LLMs, the softmax unit holds great importance. Its helps the model generating a probability distribution on potential subsequent words or phrases, considering a series of input words. By utilizing this distribution, the model selects the most probable next word or phrase, based on the assigned probabilities. The softmax unit assumes a vital function in LLM training as it facilitates learning from data through the adjustment of neural network weights and biases. With the development of the size of LLMs, computing the gradient becomes expensive. However, Zero-th Order method can approximately compute the gradient with only forward passes. In this paper, we present a Zero-th Order algorithm specifically tailored for Softmax optimization. We demonstrate the convergence of our algorithm, highlighting its effectiveness in efficiently computing gradients for large-scale LLMs. By leveraging the Zeroth-Order method, our work contributes to the advancement of optimization techniques in the context of complex language models.

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

↑