arXiv:2412.04318cs.CLcs.AI2024-12ICLR被引 9

让大模型在小数据上过拟合,反而能生成更丰富、更自然的长文本。

The Hyperfitting Phenomenon: Sharpening and Stabilizing LLMs for Open-Ended Text Generation

  • 在极小数据集上进一步微调至接近零损失(超拟合)
  • 使用贪婪解码生成的长文本质量超越主流采样方法
  • 适用于不同规模模型与多模态生成,且避免重复内容

本文揭示了在开放文本生成任务中,对预训练大语言模型(LLM)进行小样本超拟合的反直觉泛化现象。尽管大模型在贪婪解码下常生成重复单调的序列,即使参数达数十亿、基于大规模语料训练,但通过进一步微调使其在少量样本上达到近零训练损失(即超拟合),其长序列生成能力显著提升。此时贪婪解码的表现不仅优于传统Top-P采样,还在多样性和人类偏好上更优。该现象在多种模型规模、领域及自回归图像生成中均成立,且与Grokking和双下降现象有本质区别。令人惊讶的是,超拟合模型极少生成训练时出现的重复序列,即便显式屏蔽这些序列,仍可生成高质量输出。所有超拟合模型预测熵极低,通常将几乎全部概率分配给单一词元。

原文摘要 · Abstract (English)

This paper introduces the counter-intuitive generalization results of overfitting pre-trained large language models (LLMs) on very small datasets. In the setting of open-ended text generation, it is well-documented that LLMs tend to generate repetitive and dull sequences, a phenomenon that is especially apparent when generating using greedy decoding. This issue persists even with state-of-the-art LLMs containing billions of parameters, trained via next-token prediction on large datasets. We find that by further fine-tuning these models to achieve a near-zero training loss on a small set of samples -- a process we refer to as hyperfitting -- the long-sequence generative capabilities are greatly enhanced. Greedy decoding with these Hyperfitted models even outperform Top-P sampling over long-sequences, both in terms of diversity and human preferences. This phenomenon extends to LLMs of various sizes, different domains, and even autoregressive image generation. We further find this phenomena to be distinctly different from that of Grokking and double descent. Surprisingly, our experiments indicate that hyperfitted models rarely fall into repeating sequences they were trained on, and even explicitly blocking these sequences results in high-quality output. All hyperfitted models produce extremely low-entropy predictions, often allocating nearly all probability to a single token.

大模型生成超拟合文本多样性贪婪解码

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。