Unlocking Tokens as Data Points for Generalization Bounds on Larger Language Models
Sanae Lotfi, Yilun Kuang, Brandon Amos, Micah Goldblum, Marc Finzi, Andrew Gordon Wilson
TL;DR
This paper introduces token-level generalization bounds for large language models by leveraging martingale properties to exploit the abundance of training tokens, enabling non-vacuous guarantees for models up to 70B parameters with post-training quantization. It develops a novel non-IID token-level bound, couples it with practical compression methods (Monarch, Kronecker, LoRA) and QuIP 2-bit quantization, and demonstrates strong empirical alignment with downstream performance on pretrained GPT2 and LLaMA variants as well as antibody-design tasks. The token-level approach reduces the impact of the complexity term by increasing the number of samples, while prediction smoothing further tightens the bounds. Altogether, the results show that practically deployed LLMs can enjoy meaningful generalization guarantees that reflect their actual performance, with significant implications for model design and deployment in real-world settings.
Abstract
Large language models (LLMs) with billions of parameters excel at predicting the next token in a sequence. Recent work computes non-vacuous compression-based generalization bounds for LLMs, but these bounds are vacuous for large models at the billion-parameter scale. Moreover, these bounds are obtained through restrictive compression techniques, bounding compressed models that generate low-quality text. Additionally, the tightness of these existing bounds depends on the number of IID documents in a training set rather than the much larger number of non-IID constituent tokens, leaving untapped potential for tighter bounds. In this work, we instead use properties of martingales to derive generalization bounds that benefit from the vast number of tokens in LLM training sets. Since a dataset contains far more tokens than documents, our generalization bounds not only tolerate but actually benefit from far less restrictive compression schemes. With Monarch matrices, Kronecker factorizations, and post-training quantization, we achieve non-vacuous generalization bounds for LLMs as large as LLaMA2-70B. Unlike previous approaches, our work achieves the first non-vacuous bounds for models that are deployed in practice and generate high-quality text.
