提出PowLU激活函数,解决大模型预训练中的数值不稳定问题。
PowLU: An Activation Function for Stable Pre-Training of LLMs

- 用有理幂函数实现自适应非线性,稳定输出范围。
- 7.9B到124B参数模型实验均表现优于或媲美SwiGLU。
- 特别适合低精度训练下的大规模语言模型部署。
当前大型语言模型广泛采用SwiGLU激活函数以调节信息流并引入非线性。然而,当输入为大正数时,SwiGLU近似于二次函数 $x^2$,虽增强表达能力,却因近似二次放大导致数值不稳定,尤其在低精度训练中更显著。为此,本文提出一种稳定激活函数PowLU,用于大规模语言模型预训练。PowLU通过有理幂函数实现自适应非线性,提升表征能力,并缓解尖峰区域的训练不稳定性。理论分析验证了其关键性质。缩放律实验表明性能在不同模型规模下保持一致;在Ling架构(7.9B与124B参数)上的实验进一步证明,PowLU在大规模训练中可达到与SwiGLU及SwiGLU-Clip相当甚至更优的表现,有效提升大模型训练的可扩展性。
原文摘要 · Abstract (English)
In contemporary large language models (LLMs), the swish-gated linear unit (SwiGLU) activation function is widely adopted to regulate the information flow and introduce non-linearity. For large positive inputs, SwiGLU approximates the quadratic function $x^2$, providing strong nonlinearity and expressive capacity. However, this property also causes numerical instability as the input or model scale increases, particularly in low-precision LLM training. The main reason is its approximate quadratic amplification, which enlarges the output range and exacerbates outliers. To address this issue, we propose a stable activation function, Power Linear Unit (PowLU), for large-scale LLM pre-training. Specifically, PowLU employs a rational power function to achieve adaptive nonlinearity, thereby improving representation ability and enabling stable training in spike regions. Moreover, we provide theoretical justification for several key properties of PowLU. Scaling law experiments confirm that the performance is consistent across model sizes, and further experimental results with the Ling architecture (7.9B and 124B total parameters) demonstrate that PowLU achieves competitive results against SwiGLU and SwiGLU-Clip in large-scale training of LLMs. In addition, the experimental results also show that PowLU effectively improves the scalability of the large-scale training of LLMs.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。