arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2312.17276cs.CLcs.LG
收藏

PanGu-$\pi$:通过非线性补偿增强语言模型架构

PanGu-$π$: Enhancing Language Model Architectures via Nonlinearity Compensation

Huawei 2012 Labs(华为2012实验室)
Yunhe Wang, Hanting Chen, Yehui Tang, Tianyu Guo, Kai Han, Ying Nie, Xutao Wang, Hailin Hu, Zheyuan Bai, Yun Wang, Fangcheng Liu, Zhicheng Liu, Jianyuan Guo, Si… 展开作者

Yunhe Wang, Hanting Chen, Yehui Tang, Tianyu Guo, Kai Han, Ying Nie, Xutao Wang, Hailin Hu, Zheyuan Bai, Yun Wang, Fangcheng Liu, Zhicheng Liu, Jianyuan Guo, Sinan Zeng, Yinchen Zhang, Qinghua Xu, Qun Liu, Jun Yao, Chao Xu, Dacheng Tao

AI总结:

本文提出PanGu-$\pi$架构,通过级数信息激活函数和增强捷径补偿非线性,解决特征坍缩问题,在提升推理速度的同时保持或超越基准性能,并已部署于金融法律领域。

摘要:

大型语言模型(LLMs)的最新趋势是同时增加模型规模(即参数数量)和数据集规模,以获得更好的生成能力,这一点已被许多著名工作如GPT和Llama所证实。然而,大型模型往往涉及巨大的计算成本,实际应用无法承受如此高昂的代价。尽管如此,构建强健的LLM架构的方法却很少被讨论。我们首先分析了最先进的语言模型架构,并观察到特征坍缩问题。基于理论分析,我们提出非线性对于语言模型也非常重要,而这通常在视觉任务的卷积神经网络中被研究。随后,我们引入了级数信息激活函数,其计算量极小可忽略不计,并进一步使用增强捷径来增强模型非线性。我们通过精心设计的消融实验证明,所提出的方法在增强模型非线性方面显著有效;因此,我们提出了一种用于构建现代LLM的高效新架构,即PanGu-$\pi$。随后,使用相同的数据集和训练策略进行实验,将PanGu-$\pi$与最先进的LLM进行比较。结果表明,PanGu-$\pi$-7B在实现约10%推理加速的同时,能达到与基准相当的性能;PanGu-$\pi$-1B在准确性和效率方面均能达到最先进的性能。此外,我们已将PanGu-$\pi$-7B部署在金融和法律等高价值领域,开发了一个名为YunShan的LLM用于实际应用。结果表明,YunShan在基准测试上能够超越同等规模的其他模型。

英文摘要:

The recent trend of large language models (LLMs) is to increase the scale of both model size (\aka the number of parameters) and dataset to achieve better generative ability, which is definitely proved by a lot of work such as the famous GPT and Llama. However, large models often involve massive computational costs, and practical applications cannot afford such high prices. However, the method of constructing a strong model architecture for LLMs is rarely discussed. We first analyze the state-of-the-art language model architectures and observe the feature collapse problem. Based on the theoretical analysis, we propose that the nonlinearity is also very important for language models, which is usually studied in convolutional neural networks for vision tasks. The series informed activation function is then introduced with tiny calculations that can be ignored, and an augmented shortcut is further used to enhance the model nonlinearity. We then demonstrate that the proposed approach is significantly effective for enhancing the model nonlinearity through carefully designed ablations; thus, we present a new efficient model architecture for establishing modern, namely, PanGu-$π$. Experiments are then conducted using the same dataset and training strategy to compare PanGu-$π$ with state-of-the-art LLMs. The results show that PanGu-$π$-7B can achieve a comparable performance to that of benchmarks with about 10\% inference speed-up, and PanGu-$π$-1B can achieve state-of-the-art performance in terms of accuracy and efficiency. In addition, we have deployed PanGu-$π$-7B in the high-value domains of finance and law, developing an LLM named YunShan for practical application. The results show that YunShan can surpass other models with similar scales on benchmarks.

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

↑