arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.19624cs.LGcs.AIq-bio.QM
收藏

探索蛋白质语言模型的训练后量化

Exploring Post-Training Quantization of Protein Language Models

Zhejiang Lab(之江实验室);Nankai University(南开大学)

Shuang Peng, Fei Yang, Ning Sun, Sheng Chen, Yanfeng Jiang, Aimin Pan

AI总结:

本文首次系统研究蛋白质语言模型的训练后量化,针对 ESMFold 激活值高度不对称问题提出分段线性量化方法,实现低位宽下无损蛋白质结构预测。

摘要:

近年来,无监督蛋白质语言模型(ProteinLMs),如 ESM-1b 和 ESM-2,已在多种蛋白质预测任务中展现出潜力。然而,这些模型因计算需求高、内存占用大和延迟问题而面临挑战,限制了它们在资源有限设备上的应用。为解决这一问题,我们探索了蛋白质语言模型的训练后量化(PTQ),重点关注 ESMFold——一个基于 ESM-2 蛋白质语言模型的 AlphaFold 简化版本。本研究是首次尝试对蛋白质语言模型的所有权重和激活值进行量化。我们观察到,典型的均匀量化方法在 ESMFold 上表现不佳,使用 8 位量化时会导致 TM-Score 显著下降。我们进行了大量量化实验,揭示了 ESMFold 特有的挑战,尤其是层归一化之前激活值范围高度不对称,使得使用低位定点格式进行表示变得困难。为应对这些挑战,我们提出了一种新的蛋白质语言模型 PTQ 方法,利用分段线性量化处理不对称激活值,以确保精确近似。我们在蛋白质结构预测任务中验证了该方法的有效性,证明 ESMFold 可以在不牺牲精度的情况下被准确量化到低位宽。此外,我们将该方法应用于接触预测任务,展示了其通用性。总之,本研究提出了一种创新的蛋白质语言模型 PTQ 方法,解决了特定的量化挑战,并有望推动更高效的蛋白质语言模型的发展,对各类蛋白质相关应用具有重要意义。

英文摘要:

Recent advancements in unsupervised protein language models (ProteinLMs), like ESM-1b and ESM-2, have shown promise in different protein prediction tasks. However, these models face challenges due to their high computational demands, significant memory needs, and latency, restricting their usage on devices with limited resources. To tackle this, we explore post-training quantization (PTQ) for ProteinLMs, focusing on ESMFold, a simplified version of AlphaFold based on ESM-2 ProteinLM. Our study is the first attempt to quantize all weights and activations of ProteinLMs. We observed that the typical uniform quantization method performs poorly on ESMFold, causing a significant drop in TM-Score when using 8-bit quantization. We conducted extensive quantization experiments, uncovering unique challenges associated with ESMFold, particularly highly asymmetric activation ranges before Layer Normalization, making representation difficult using low-bit fixed-point formats. To address these challenges, we propose a new PTQ method for ProteinLMs, utilizing piecewise linear quantization for asymmetric activation values to ensure accurate approximation. We demonstrated the effectiveness of our method in protein structure prediction tasks, demonstrating that ESMFold can be accurately quantized to low-bit widths without compromising accuracy. Additionally, we applied our method to the contact prediction task, showcasing its versatility. In summary, our study introduces an innovative PTQ method for ProteinLMs, addressing specific quantization challenges and potentially leading to the development of more efficient ProteinLMs with significant implications for various protein-related applications.

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

↑