Explicit Knowledge Transfer for Weakly-Supervised Code Generation

11/30/2022
by   Zhangir Azerbayev, et al.
0

Large language models (LLMs) can acquire strong code-generation capabilities through few-shot learning. In contrast, supervised fine-tuning is still needed for smaller models to achieve good performance. Such fine-tuning demands a large number of task-specific NL-code pairs, which are expensive to obtain. In this paper, we attempt to transfer the code generation ability of an LLM to a smaller model with the aid of weakly-supervised data. More specifically, we propose explicit knowledge transfer (EKT), which uses the few-shot capabilities of a teacher LLM to create NL-code pairs that we then filter for correctness and fine-tune the student on. We evaluate EKT on the task of generating code solutions to math word problems from the GSM8k dataset. We find that EKT not only yields better performance than training with expert iteration, but also outperforms knowledge distillation, another form of knowledge transfer. A GPT-Neo 1.3B model trained using EKT with a GPT-J teacher achieves a 12.4 pass@100 on GSM8k, while the same student and teacher trained with knowledge distillation yield only a 3.7 student model to outperform the teacher using EKT.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/18/2022

On effects of Knowledge Distillation on Transfer Learning

Knowledge distillation is a popular machine learning technique that aims...
research
07/19/2022

Context Unaware Knowledge Distillation for Image Retrieval

Existing data-dependent hashing methods use large backbone networks with...
research
10/10/2020

Structural Knowledge Distillation

Knowledge distillation is a critical technique to transfer knowledge bet...
research
05/21/2023

Understanding the Effect of Data Augmentation on Knowledge Distillation

Knowledge distillation (KD) requires sufficient data to transfer knowled...
research
09/18/2023

VisualProg Distiller: Learning to Fine-tune Non-differentiable Visual Programming Frameworks

As an interpretable and universal neuro-symbolic paradigm based on Large...
research
09/06/2023

Unity is Strength: Cross-Task Knowledge Distillation to Improve Code Review Generation

Code review is a fundamental process in software development that plays ...
research
07/09/2020

Patient-Specific Domain Adaptation for Fast Optical Flow Based on Teacher-Student Knowledge Transfer

Fast motion feedback is crucial in computer-aided surgery (CAS) on movin...

Please sign up or login with your details

Forgot password? Click here to reset