个性化蒸馏:赋能开源大语言模型的自适应代码生成学习
Personalised Distillation: Empowering Open-Sourced LLMs with Adaptive Learning for Code Generation
AI总结:
针对传统代码生成LLM蒸馏忽略学生模型条件的问题,提出个性化蒸馏方法,让学生先解题再基于教师自适应改进学习,仅用少量低成本数据就显著提升了开源模型在HumanEval上的代码生成性能。
摘要:
随着功能强大的闭源大语言模型(LLM,如ChatGPT、GPT-4)的兴起,人们越来越关注将闭源大语言模型的能力蒸馏到更小的开源大语言模型中。以往的蒸馏方法通常提示ChatGPT生成一组指令和答案,供学生模型学习。然而,这种标准蒸馏方法忽略了学生模型的优势和自身条件。受现代教学原则的启发,我们设计了一种个性化蒸馏流程:学生模型先尝试解决任务,随后教师提供自适应的改进方案供学生优化。个性化蒸馏并非向学生灌输教师的先验知识,而是让学生模型实现个性化学习——它仅在自己出错的样本上学习,并学习改进自身的解决方案。在代码生成任务上,个性化蒸馏仅用三分之一的数据,性能就始终优于标准蒸馏。仅需2.5-3K个个性化样本(数据收集成本仅4-6美元),我们就在HumanEval基准上将CodeGen-mono-16B的性能提升7%,pass@1达到36.4%;将StarCoder的性能提升12.2%,pass@1达到45.8%。
英文摘要:
With the rise of powerful closed-sourced LLMs (ChatGPT, GPT-4), there are increasing interests in distilling the capabilies of close-sourced LLMs to smaller open-sourced LLMs. Previous distillation methods usually prompt ChatGPT to generate a set of instructions and answers, for the student model to learn. However, such standard distillation approach neglects the merits and conditions of the student model. Inspired by modern teaching principles, we design a personalised distillation process, in which the student attempts to solve a task first, then the teacher provides an adaptive refinement for the student to improve. Instead of feeding the student with teacher's prior, personalised distillation enables personalised learning for the student model, as it only learns on examples it makes mistakes upon and learns to improve its own solution. On code generation, personalised distillation consistently outperforms standard distillation with only one third of the data. With only 2.5-3K personalised examples that incur a data-collection cost of 4-6$, we boost CodeGen-mono-16B by 7% to achieve 36.4% pass@1 and StarCoder by 12.2% to achieve 45.8% pass@1 on HumanEval.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。