Distillazione Personalizzata: Potenziare i Modelli Linguistici Open-Source con Apprendimento Adattivo per la Generazione di Codice
Personalised Distillation: Empowering Open-Sourced LLMs with Adaptive Learning for Code Generation
October 28, 2023
Autori: Hailin Chen, Amrita Saha, Steven Hoi, Shafiq Joty
cs.AI
Abstract
Con l'ascesa di potenti LLM (Large Language Models) proprietari (ChatGPT, GPT-4), è cresciuto l'interesse nel distillare le capacità di questi LLM proprietari in modelli open-source più piccoli. I metodi di distillazione precedenti solitamente richiedevano a ChatGPT di generare un insieme di istruzioni e risposte, affinché il modello studente potesse apprendere. Tuttavia, questo approccio standard di distillazione trascura i meriti e le condizioni del modello studente. Ispirati dai principi didattici moderni, abbiamo progettato un processo di distillazione personalizzato, in cui lo studente tenta prima di risolvere un compito, e poi l'insegnante fornisce un affinamento adattivo per aiutare lo studente a migliorare. Invece di fornire allo studente il sapere predefinito dell'insegnante, la distillazione personalizzata consente un apprendimento personalizzato per il modello studente, poiché esso impara solo sugli esempi in cui commette errori e migliora la propria soluzione. Nella generazione di codice, la distillazione personalizzata supera costantemente la distillazione standard utilizzando solo un terzo dei dati. Con soli 2,5-3K esempi personalizzati, che comportano un costo di raccolta dati di 4-6$, abbiamo migliorato CodeGen-mono-16B del 7%, raggiungendo il 36,4% di pass@1, e StarCoder del 12,2%, raggiungendo il 45,8% di pass@1 su HumanEval.
English
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.