压缩代码:量化和知识蒸馏对编程令牌的隐藏影响
Compressed code: the hidden effects of quantization and distillation on programming tokens
AI总结:
本文研究了量化和知识蒸馏对编程令牌的影响,通过分析令牌表示揭示了代码生成质量的优化方法和关键因素。
摘要:
大型语言模型(LLMs)已展示了卓越的代码生成能力,但其令牌级机制仍待深入探索,尤其是在压缩模型中。通过系统分析编程语言令牌表示,我们通过分析其词汇分布和关键字覆盖模式,刻画了编程语言在LLM令牌化中的编码方式。我们引入了一种新的冷启动概率分析方法,该方法无需显式提示即可提供模型行为的见解。此外,我们全面评估了不同模型优化技术——包括量化、知识蒸馏、模型扩展和任务特定微调——对令牌级表示和代码生成质量的影响。我们的实验通过全面的概率分布分析和评估指标,揭示了令牌级行为的关键见解,并提供了在各种优化约束下维持代码生成质量的经验证据指南。这些发现既推进了对LLM代码生成的理论理解,也促进了优化模型在生产环境中的实际实施。
英文摘要:
Large Language Models (LLMs) have demonstrated exceptional code generation capabilities, yet their token-level mechanisms remain underexplored, particularly in compressed models. Through systematic analysis of programming language token representations, we characterize how programming languages are encoded in LLM tokenizers by analyzing their vocabulary distribution and keyword coverage patterns. We introduce a novel cold-start probability analysis method that provides insights into model behavior without requiring explicit prompts. Additionally, we present a comprehensive evaluation of how different model optimization techniques - including quantization, distillation, model scaling, and task-specific fine-tuning - affect token-level representations and code generation quality. Our experiments, supported by comprehensive probability distribution analysis and evaluation metrics, reveal critical insights into token-level behavior and provide empirically-validated guidelines for maintaining code generation quality under various optimization constraints. These findings advance both theoretical understanding of LLM code generation and practical implementation of optimized models in production environments.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。