CodeGen2: Lessons for Training LLMs on Programming and Natural Languages
Erik Nijkamp, Hiroaki Hayashi, Caiming Xiong, Silvio Savarese, Yingbo Zhou Salesforce Research Equal contribution.
Abstract
Large language models (LLMs) have demonstrated remarkable abilities in representation learning for program synthesis and understanding tasks. The quality of the learned representations appears to be dictated by the neural scaling laws as a function of the number of model parameters and observations, while imposing upper bounds on the model performance by the amount of available data and compute, which is costly.
中文速览
训练大型代码语言模型(LLM)代价高昂,而且架构、学习目标、采样方式、数据配比这四个关键选择往往让人无从下手,这项工作正是为了系统回答"能否把这四者统一成一套高效方案"。研究者在10亿参数规模上做了大量消融实验,把编码器与解码器统一为Prefix-LM、把因果语言建模与跨度填充两种目标混合训练、同时支持从左到右生成和填空式采样、并将编程语言与自然语言数据混合使用。实验结果喜忧参半:Prefix-LM相对纯解码器并未带来可量化的收益,填空采样也并非"免费午餐"(会损耗零样本生成性能),但混合学习目标和多语言数据混合训练均取得了积极效果,多轮次训练同样表现出色。最终,研究团队将这些经验提炼为五条教训和一套实用配方,并以此训练并开源了1B、3.7B、7B、16B四个规模的CodeGen2模型,为学界和工业界提供了一套经过严格验证的、可复现的代码大模型训练基准。
原文 arXiv:2305.02309;中英对照 + 大白话阅读 https://aha.fim.ai/paper/2305.02309v2