语言模型的物理学:第3.3部分,知识容量缩放定律
Physics of Language Models: Part 3.3, Knowledge Capacity Scaling Laws
AI总结:
本文通过受控数据集测量语言模型的事实知识存储,提出每参数2比特的容量缩放定律,并分析训练、架构、量化、稀疏性和数据信噪比的影响。
摘要:
缩放定律描述了语言模型规模与其能力之间的关系。不同于以往通过损失或基准测试来评估模型能力的研究,我们估算模型存储的知识比特数。我们关注以元组表示的事实性知识,例如来自维基百科页面的(USA,capital,Washington D.C.)。通过多个受控数据集,我们证实语言模型能够且仅能够在每个参数中存储2比特知识,即使在量化为int8时也是如此,而且这些知识可以被灵活提取,用于下游应用。因此,一个7B模型可以存储14B比特知识,根据我们的估算,这超过了英文维基百科与教科书的总和。更广泛地说,我们给出了12项结果,说明(1)训练时长、(2)模型架构、(3)量化、(4)MoE等稀疏性约束,以及(5)数据信噪比如何影响模型的知识存储容量。值得注意的洞见包括:采用旋转嵌入的GPT-2架构在知识存储方面匹敌甚至超过LLaMA/Mistral架构,尤其是在较短训练时长下。这是因为LLaMA/Mistral使用GatedMLP,其稳定性较差且更难训练。在训练数据前添加域名(例如wikipedia.org)会显著提升模型的知识容量。语言模型能够自主识别并优先处理知识丰富的域名,从而优化其存储容量。
英文摘要:
Scaling laws describe the relationship between the size of language models and their capabilities. Unlike prior studies that evaluate a model's capability via loss or benchmarks, we estimate the number of knowledge bits a model stores. We focus on factual knowledge represented as tuples, such as (USA, capital, Washington D.C.) from a Wikipedia page. Through multiple controlled datasets, we establish that language models can and only can store 2 bits of knowledge per parameter, even when quantized to int8, and such knowledge can be flexibly extracted for downstream applications. Consequently, a 7B model can store 14B bits of knowledge, surpassing the English Wikipedia and textbooks combined based on our estimation. More broadly, we present 12 results on how (1) training duration, (2) model architecture, (3) quantization, (4) sparsity constraints such as MoE, and (5) data signal-to-noise ratio affect a model's knowledge storage capacity. Notable insights include: * The GPT-2 architecture, with rotary embedding, matches or even surpasses LLaMA/Mistral architectures in knowledge storage, particularly over shorter training durations. This arises because LLaMA/Mistral uses GatedMLP, which is less stable and harder to train. * Prepending training data with domain names (e.g., wikipedia.org) significantly increases a model's knowledge capacity. Language models can autonomously identify and prioritize domains rich in knowledge, optimizing their storage capacity.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。