Can a large language model (LLM) improve at code generation using only its own raw outputs, without a verifier, a teacher model, or reinforcement learning? We answer in the affirmative with simple self-distillation (SSD): sample solutions from the model with certain temperature and truncation configurations, then fine-tune on those samples with standard supervised fine-tuning. SSD improves Qwen3-30B-Instruct from 42.4% to 55.3% pass@1 on LiveCodeBench v6, with gains concentrating on harder problems, and it generalizes across Qwen and Llama models at 4B, 8B, and 30B scale, including both instruct and thinking variants. To understand why such a simple method can work, we trace these gains to a precision-exploration conflict in LLM decoding and show that SSD reshapes token distributions in a context-dependent way, suppressing distractor tails where precision matters while preserving useful diversity where exploration matters. Taken together, SSD offers a complementary post-training direction for improving LLM code generation.


翻译:一个大型语言模型(LLM)能否仅通过自身原始输出来提升代码生成能力——无需验证器、教师模型或强化学习?我们通过简单自蒸馏方法给出了肯定答案:以特定温度和截断配置从模型中采样解决方案,随后对这些样本进行标准监督微调。该方法将Qwen3-30B-Instruct在LiveCodeBench v6上的pass@1指标从42.4%提升至55.3%,且提升主要集中在较困难问题上,同时在4B、8B和30B参数规模的Qwen与Llama模型(包括指令型和思考型变体)上均具有泛化性。为理解这种简单方法为何有效,我们将性能提升追溯至LLM解码过程中的精度-探索矛盾,发现SSD以上下文依赖方式重塑了词元分布,在需要精度的场景抑制干扰性长尾分布,同时在需要探索的场景保持有效多样性。综上所述,SSD为改进LLM代码生成提供了一种互补性的后训练方向。

0
下载
关闭预览

相关内容

多模态大语言模型的自我改进:综述
专知会员服务
28+阅读 · 2025年10月8日
通过强化学习增强代码生成中的代码大语言模型:综述
专知会员服务
29+阅读 · 2025年1月1日
《大型语言模型代码生成》综述
专知会员服务
70+阅读 · 2024年6月4日
大模型如何迭代?北大等《大型语言模型自我进化》综述
AI新视野 | 数据蒸馏Dataset Distillation
人工智能前沿讲习班
31+阅读 · 2019年6月14日
最新论文解读 | 基于预训练自然语言生成的文本摘要方法
微软研究院AI头条
57+阅读 · 2019年3月19日
【干货】深入理解自编码器(附代码实现)
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关主题
最新内容
ICML 2026 | CFPO:用反事实策略优化提升多模态推理
专知会员服务
0+阅读 · 12分钟前
综述 | 世界动作模型:少做梦,多行动
专知会员服务
0+阅读 · 14分钟前
美以伊冲突:无人机与人工智能的运用
专知会员服务
1+阅读 · 26分钟前
《特种部队在透明战场中的生存力》最新报告
专知会员服务
1+阅读 · 46分钟前
《人工智能生成的零日漏洞:对未来作战的影响》
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
8+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
4+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
5+阅读 · 6月22日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员