代理压缩用于语言建模
Proxy Compression for Language Modeling
AI总结:
本文提出代理压缩方法,通过联合训练原始字节序列和压缩视图,提升语言模型训练效率,并在代码建模中显著优于纯字节级基线。
摘要:
现代语言模型几乎全部基于固定分词器生成的token序列进行训练,这使得模型与该压缩器耦合。本文引入代理压缩,一种替代训练方案,保留压缩输入的效率优势,同时在推理时提供端到端的原始字节接口。在训练过程中,一个语言模型同时在原始字节序列和由外部压缩器生成的压缩视图上联合训练;通过这一过程,模型学会在内部对齐压缩序列和原始字节。这种对齐使两种格式之间能够实现强迁移,即使训练主要基于被推理时丢弃的压缩输入。在代码语言建模的大量实验中,代理压缩显著提高了训练效率,并在固定计算预算下显著优于纯字节级基线。随着模型规模的增加,这些收益更加明显,代理训练的模型最终能够匹配或超越分词器方法,同时仅在原始字节上运行并保留字节级建模的固有鲁棒性。我们的代码可在https://github.com/LZhengisme/proxy-compression获取。
英文摘要:
Modern language models are trained almost exclusively on token sequences produced by a fixed tokenizer, an external lossless compressor often over UTF-8 byte sequences, thereby coupling the model to that compressor. This work introduces proxy compression, an alternative training scheme that preserves the efficiency benefits of compressed inputs while providing an end-to-end, raw-byte interface at inference time. During training, a single language model is jointly trained on raw byte sequences and compressed views generated by external compressors; through the process, the model learns to internally align compressed sequences and raw bytes. This alignment enables strong transfer between the two formats, even when training predominantly on compressed inputs that are discarded at inference. Extensive experiments on code language modeling demonstrate that proxy compression substantially improves training efficiency and significantly outperforms pure byte-level baselines given fixed compute budgets. As model scale increases, these gains become more pronounced, and proxy-trained models eventually match or surpass tokenizer approaches, all while operating solely on raw bytes and retaining the inherent robustness of byte-level modeling. Our code is available at https://github.com/LZhengisme/proxy-compression.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。