Aha.
正在载入中英对照阅读…

arXiv:2604.01193 · 中英对照阅读

简单得出奇的自蒸馏提升代码生成能力

Embarrassingly Simple Self-Distillation Improves Code Generation

Ruixiang Zhang∗ Richard He Bai∗ Huangjie Zheng∗ Navdeep Jaitly Ronan Collobert Yizhe Zhang∗

中文速览

代码生成模型常受困于两难:解码太保守会错过不同解法,太随机又容易在语法和逻辑上出错。论文提出简单自蒸馏(SSD):让模型用特定采样设置为题目生成答案,不检查答案对错,再用这些答案按常规方式微调模型。实验中,Qwen3-30B-Instruct 在 LiveCodeBench v6 上的单次答对率从 42.4% 升到 55.3%,多种模型也有提升,且难题上的进步更明显;单靠调整采样参数无法追上。分析显示,微调会按上下文压低容易误导模型的低概率选项,同时保留有用的解法多样性。它为缺少标注答案、验证工具或更强教师模型时提升代码能力,提供了一条简单且有效的新路。

摘要

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, Llama, and GPT-OSS models at 4B–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.

术语表

large language model (LLM)
大语言模型(LLM)
code generation
代码生成
simple self-distillation (SSD)
简单自蒸馏(SSD)
self-distillation
自蒸馏
supervised fine-tuning (SFT)
监督微调(SFT)
temperature
温度
truncation
截断
top-k
top-k 截断
top-p
top-p 截断
pass@1
pass@1(单次通过率)
pass@5
pass@5(五次通过率)
LiveCodeBench
LiveCodeBench
rSTARcoder
rSTARcoder
precision-exploration conflict
精确性—探索性冲突
fork positions
分岔位置
lock positions
锁定位置
support compression
支持集压缩
within-support reshaping
支持集内重塑
token distribution
词元分布
distractor tail
干扰项尾部
candidate solution
候选解
cross-entropy loss
交叉熵损失
reinforcement learning
强化学习
verifiable reward
可验证奖励
mixture of experts (MoE)
混合专家模型(MoE)
instruct model
指令模型
thinking model
思考模型
vLLM
vLLM
Megatron-LM
Megatron-LM