Wenwang: Toward Effectively Generating Code Beyond Standalone Functions via Generative Pre-trained Models

计算机科学 生成语法 编码(集合论) 程序设计语言 软件工程 人工智能 集合(抽象数据类型)
作者
Hao Yu,Bo Shen,J. Y. Zhang,Shaoxin Lin,Lin Li,Guangtai Liang,Ying Li,Qianxiang Wang,Tao Xie
出处
期刊:ACM Transactions on Software Engineering and Methodology [Association for Computing Machinery]
标识
DOI:10.1145/3725213
摘要

Code generation models based on the pre-training and fine-tuning paradigm have been increasingly attempted by both academia and industry, resulting in well-known industrial models such as Codex, CodeGen, and PanGu-Coder. After being pre-trained on a large-scale corpus of code, a model is further fine-tuned with datasets specifically for the target downstream task, e.g., generating code from natural language description. The target code being generated can be classified into two types: a standalone function, i.e., a function that invokes or accesses only built-in functions and standard libraries, and a non-standalone function, i.e., a function that invokes or accesses user-defined functions or third-party libraries. To effectively generate code especially non-standalone functions (largely ignored by existing work), in this article, we present Wenwang, an approach to improving the capability of a pre-trained model on generating code beyond standalone functions. Wenwang consists of two components: a fine-tuning dataset named WenwangData and a fine-tuned model named WenwangCoder. Compared with existing fine-tuning datasets, WenwangData additionally covers non-standalone functions. Besides the docstring and code snippet for a function, WenwangData also includes its contextual information collected via program analysis. Based on PanGu-Coder, we produce WenwangCoder by fine-tuning PanGu-Coder on WenwangData with our context-aware fine-tuning technique so that the contextual information can be fully leveraged during code generation. On CoderEval and HumanEval, WenwangCoder outperforms three state-of-the-art models with similar parameter sizes (at the scale of around 300M), namely CodeGen, PanGu-Coder, and PanGu-FT. Although WenwangCoder does not outperform ChatGPT on HumanEval, WenwangCoder with smaller model parameter sizes can achieve similar effects to ChatGPT on CoderEval. Our experimental results also shed light on a number of promising optimization directions based on existing pre-trained models.
最长约 10秒,即可获得该文献文件

科研通智能强力驱动
Strongly Powered by AbleSci AI
科研通是完全免费的文献互助平台,具备全网最快的应助速度,最高的求助完成率。 对每一个文献求助,科研通都将尽心尽力,给求助人一个满意的交代。
实时播报
周一完成签到 ,获得积分10
4秒前
谨慎乌完成签到,获得积分10
4秒前
Bonaventure完成签到,获得积分10
4秒前
CJ1977完成签到,获得积分10
6秒前
苏州河发布了新的文献求助10
6秒前
薛乎虚完成签到 ,获得积分10
7秒前
Unicorn_1完成签到,获得积分10
8秒前
hengheng完成签到 ,获得积分10
9秒前
myS完成签到 ,获得积分10
10秒前
601完成签到 ,获得积分10
14秒前
15秒前
revew666完成签到,获得积分0
16秒前
牛仔完成签到 ,获得积分10
17秒前
Fan发布了新的文献求助10
18秒前
orixero应助苏州河采纳,获得10
20秒前
chen完成签到,获得积分10
21秒前
cz完成签到,获得积分10
23秒前
29秒前
咕咕完成签到 ,获得积分10
31秒前
zrrr完成签到 ,获得积分10
31秒前
苏州河发布了新的文献求助10
32秒前
36秒前
Crssss完成签到 ,获得积分20
36秒前
称心的新之完成签到,获得积分10
37秒前
mufcyang完成签到,获得积分10
37秒前
biofresh完成签到,获得积分10
38秒前
山蒲完成签到 ,获得积分10
38秒前
cdercder应助稍等我在学习采纳,获得10
39秒前
香蕉觅云应助小航采纳,获得10
40秒前
永远永远有完成签到 ,获得积分10
41秒前
迷路绮南完成签到 ,获得积分10
42秒前
yhyhyhyh完成签到,获得积分10
43秒前
43秒前
多情的寻真完成签到,获得积分10
45秒前
心灵美听荷完成签到 ,获得积分10
46秒前
苏州河发布了新的文献求助10
46秒前
云歇雨住发布了新的文献求助10
47秒前
48秒前
梓越完成签到 ,获得积分10
48秒前
48秒前
高分求助中
(应助此贴封号)【重要!!请各用户(尤其是新用户)详细阅读】【科研通的精品贴汇总】 10000
Essentials of Carbohydrate Chemistry and Biochemistry, 4th Edition 800
Navigating Normative Orders. Interdisciplinary Perspectives 800
1 Peter and Christ's Descent to the Dead in Its Early Christian Reception 700
Organizational Behavior 510
Management and the Arts 510
Matrix Methods in Data Mining and Pattern Recognition Second Edition 510
热门求助领域 (近24小时)
化学 材料科学 医学 生物 纳米技术 工程类 有机化学 化学工程 生物化学 计算机科学 内科学 物理 复合材料 催化作用 细胞生物学 无机化学 光电子学 物理化学 电极 基因
热门帖子
关注 科研通微信公众号,转发送积分 7749963
求助须知:如何正确求助?哪些是违规求助? 9297633
关于积分的说明 20241238
捐赠科研通 7331436
什么是DOI,文献DOI怎么找? 3309469
关于科研通互助平台的介绍 2461094
邀请新用户注册赠送积分活动 2321840