用自生成数据压缩模型,让大模型变小还更准。
Requential Coding: Pushing the Limits of Model Compression with Self-Generated Training Data

- 教师选学生分布中的样本,只编码两者不一致处
- 压缩长度与参数量和数据熵无关,比旧方法短数个数量级
- 适合研究大模型泛化、过拟合和可学习信息的读者
压缩是智能的核心。能将训练数据编码为短码的模型,揭示了促进泛化的规律性。大型神经网络可能学到的函数远比其参数量暗示的简单,但构造真正体现这种简单的编码却很困难。基于参数的方法(如量化)的编码长度随模型规模增长,无法反映参数实际存储的信息量。预序编码通过压缩训练轨迹绕过此问题,但会编码整个数据序列,当数据熵高时编码仍很大。我们提出重序编码(requential coding),其中教师模型从学生自身的数据分布中选择训练样本,学生仅记录这些选择,且仅在师生不一致时消耗比特。所得编码长度独立于参数量和数据熵,通常比预序编码短数个数量级,且优势随规模增大。该压缩揭示了先前压缩器无法触及的现象:固定损失下,更大模型和集成模型压缩后尺寸更小。将其嵌入到PAC-Bayes界中,对十亿参数大模型给出了当前最优的泛化保证,优于基于激进训练后量化的边界,即使假设误差为零。该界在计算最优区间随规模收紧,表明模型相对于数据集大小变得更易压缩。同一编码还预测出多轮训练下模型渐进过拟合。此外,它将数据中可学习的信息与不可预测的随机内容分离,揭示低熵文本蕴含的可学习结构远高于高熵图像数据。
原文摘要 · Abstract (English)
Compression is fundamental to intelligence. A model that can represent its training data as a short code has discovered regularities that enable generalization. Large neural networks may learn functions far simpler than their parameter counts suggest, but it is challenging to construct codes that realize this simplicity. Parameter-based methods such as quantization produce code lengths that scale with model size, insensitive to how much information the parameters store. Prequential coding bypasses this issue by compressing the training trajectory, but codes the exact data sequence regardless of how much the model learns, yielding large codes when the data has high entropy. We introduce requential coding, where a teacher model selects training samples drawn from the student's own distribution. The student's code records only these selections, which cost bits only where teacher and student disagree. The resulting code length is independent of parameter count and data entropy, and often orders of magnitude shorter than the prequential counterpart, with an advantage that grows with scale. This compression sheds light on phenomena inaccessible to prior compressors. Holding loss fixed, larger models and ensembles compress to much smaller sizes despite more parameters. Plugged into a PAC-Bayes bound, the requential code yields state-of-the-art generalization guarantees for billion-parameter LLMs, outperforming bounds built on aggressive post-training quantization even granted zero error. The bound tightens with scale in the compute-optimal regime, as models become increasingly compressible relative to dataset size. The same code predicts that models gradually overfit when trained for multiple epochs. It also isolates the learnable information in a dataset from its unpredictable, random content, revealing that lower-entropy text holds far more learnable structure than higher-entropy image data.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。