Physics of Language Models: Part 3.3, Knowledge Capacity Scaling Laws

Zeyuan Allen-Zhu, Yuanzhi Li

arXiv:2404.05405 · 2026-07-27 공개 · arXiv · PDF

quantization scaling-laws model-architecture moe knowledge-storage rotary-embedding knowledge-capacity gatedmlp

Abstract

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.

한국어 요약

한 줄 요약

언어 모델이 저장할 수 있는 지식 비트 수는 파라미터당 2비트이며, 이는 정량적 확장 법칙을 통해 정밀하게 분석되었다.

핵심 기여도

핵심 아이디어

기존 연구는 언어 모델의 성능을 손실(loss) 또는 벤치마크 점수로 평가했지만, 본 연구는 모델이 저장하는 **지식의 양**을 **비트 단위로 정량화**하여 평가한다. 지식은 튜플 형태로 정의되며, 예를 들어 `(USA, capital, Washington D.C.)`와 같은 형태로 표현된다. 이 연구는 **파라미터당 2비트**의 지식 저장이 가능하다는 **정확하고 보편적인 확장 법칙**을 발견했다. 이는 **int8 정밀도**로 양자화되더라도 동일하게 유지된다.

GPT-2 아키텍처는 **rotary embedding**과 **GELU 활성화 함수**를 사용하며, **GatedMLP**를 사용하는 LLaMA/Mistral보다 **짧은 학습 시간**에서도 지식 저장 능력이 유사하거나 더 우수하다. 이는 GatedMLP가 학습이 불안정하고 어려운 구조라는 점에서 기인한다. 또한, 학습 데이터에 **도메인 이름** (예: wikipedia.org)을 추가하면 모델이 지식이 풍부한 도메인을 자율적으로 식별하고 우선순위를 부여하여 저장 용량을 최적화할 수 있다.

기술적 접근법

주요 결과

의의 및 한계

본 연구는 언어 모델의 지식 저장 용량을 **정량적으로 평가**하는 새로운 방법론을 제시하며, 모델 아키텍처, 학습 시간, 데이터 품질 등 다양한 요인의 영향을 정밀하게 분석한다. 이는 모델 선택, 학습 데이터 준비, 이론적 연구 등에 실질적인 도움을 줄 수 있다.

한편, 본 연구는 **합성 데이터**를 기반으로 하므로 실제 세계 데이터와의 차이가 있을 수 있다. 또한, **지식의 정의**가 튜플 형태로 제한되어 있어, 더 복잡한 지식 구조는 반영되지 않았다.

실용적 활용

본 연구는 언어 모델의 최적 크기 결정, 학습 데이터 준비, 아키텍처 선택 등에 실용적 가치를 제공한다. 특히, **도메인 이름 추가**나 **GPT-2 아키텍처 활용**은 지식 저장 용량을 향상시키는 데 유용할 수 있다. 또한, **1T 파라미터 모델이 AGI 달성에 충분한지**에 대한 질문에 대한 이론적 기반을 제공한다.