Distilled GPT for source code summarization

被引:0
作者
Chia-Yi Su
Collin McMillan
机构
[1] University of Notre Dame,Department of Computer Science
来源
Automated Software Engineering | 2024年 / 31卷
关键词
Source code summarization; Software documentation generation; Language model;
D O I
暂无
中图分类号
学科分类号
摘要
A code summary is a brief natural language description of source code. Summaries are usually only a single sentence long, and yet form the backbone of developer documentation. A short descriptions such as “changes all visible polygons to the color blue” can give a programmer a high-level idea of what code does without the effort of reading the code itself. Recently, products based on Large Language Models such as ChatGPT have demonstrated a strong ability to write these descriptions automatically. However, to use these tools, programmers must send their code to untrusted third parties for processing (e.g., via an API call). This loss of custody is not acceptable to many organizations. In this paper, we present an alternative: we train an open source model using sample output generated by GPT-\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$-$$\end{document}3.5 in a process related to knowledge distillation. Our model is small enough (350 m parameters) to be run on a single 16gb GPU, yet we show in our evaluation that it is large enough to mimic GPT-\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$-$$\end{document}3.5 on this task.
引用
收藏
相关论文
共 27 条
[1]  
Delgado R(2019)Why Cohen’s kappa should be avoided as performance measure in classification PloS one 14 55-64
[2]  
Tibau XA(1993)Interpretation of low kappa values Int. J. Bio Med. Comput. 33 1095-1109
[3]  
Donker D(2017)Autofolding for source code summarization IEEE Transact. Softw. Eng. 43 1789-1819
[4]  
Hasman A(2021)Knowledge distillation: a survey Int. J. Comput. Vis 129 31-33
[5]  
Van Geijn H(2021)The growing cost of deep learning for source code Commun. ACM 65 258-273
[6]  
Fowkes J(2023)Setransformer: a transformer-based code semantic parser for code comment generation IEEE Transact. Reliab. 72 120-145
[7]  
Chanthirasegaran P(2016)Automated feature discovery via sentence selection and source code summarization J. Softw. Evol. Process 28 2621-2624
[8]  
Ranca R(2016)Cognitive fatigue influences students’ performance on standardized tests Proc. Natl. Acad. Sci. 113 3048-3068
[9]  
Gou J(2021)Knowledge distillation and student-teacher learning for visual intelligence: a review and new outlooks IEEE Transact. Pattern Anal. Mach. Intell. 44 13B-undefined
[10]  
Yu B(2023)Llama-adapter: efficient fine-tuning of language models with zero-init attention Parameters 7 undefined-undefined