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.


翻译:大型语言模型(LLM)已展现出卓越的代码生成能力,但其词元级工作机制仍未得到充分探索,尤其是在压缩模型中。通过对编程语言词元表示的系统分析,我们通过考察词汇分布与关键词覆盖模式,刻画了编程语言在LLM分词器中的编码方式。我们提出了一种新颖的冷启动概率分析方法,该方法无需显式提示即可洞察模型行为。此外,我们全面评估了不同模型优化技术——包括量化、蒸馏、模型缩放及任务特定微调——如何影响词元级表示与代码生成质量。通过综合概率分布分析与评估指标支持的实验,我们揭示了词元级行为的关键机制,并为在各种优化约束下维持代码生成质量提供了经验证实的指导原则。这些发现不仅推进了对LLM代码生成的理论理解,也为生产环境中优化模型的实际部署提供了实践依据。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
稀疏自编码器综述:解释大语言模型的内部机制
专知会员服务
17+阅读 · 2025年12月27日
大型语言模型的规模效应局限
专知会员服务
14+阅读 · 2025年11月18日
【CMU博士论文】大型语言模型的隐性特性
专知会员服务
15+阅读 · 2025年10月18日
大型语言模型的知识蒸馏综述:方法、评估与应用
专知会员服务
78+阅读 · 2024年7月4日
《大型语言模型代码生成》综述
专知会员服务
68+阅读 · 2024年6月4日
模型压缩 | 知识蒸馏经典解读
AINLP
11+阅读 · 2020年5月31日
基于知识蒸馏的BERT模型压缩
大数据文摘
18+阅读 · 2019年10月14日
深度学习文本分类方法综述(代码)
中国人工智能学会
28+阅读 · 2018年6月16日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关VIP内容
稀疏自编码器综述:解释大语言模型的内部机制
专知会员服务
17+阅读 · 2025年12月27日
大型语言模型的规模效应局限
专知会员服务
14+阅读 · 2025年11月18日
【CMU博士论文】大型语言模型的隐性特性
专知会员服务
15+阅读 · 2025年10月18日
大型语言模型的知识蒸馏综述:方法、评估与应用
专知会员服务
78+阅读 · 2024年7月4日
《大型语言模型代码生成》综述
专知会员服务
68+阅读 · 2024年6月4日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员