Large language models (LLMs) have made significant advancements in code-related tasks, yet many LLMs treat code as simple sequences, neglecting its structured nature. We introduce AST-T5, a novel pretraining paradigm that leverages the Abstract Syntax Tree (AST) for enhanced code generation, transpilation, and understanding. Using dynamic programming, our AST-Aware Segmentation retains code structure, while our AST-Aware Span Corruption objective equips the model to reconstruct various code structures. Unlike other models, AST-T5 avoids intricate program analyses or architectural changes, so it integrates seamlessly with any encoder-decoder Transformer. Evaluations show that AST-T5 consistently outperforms similar-sized LMs across various code-related tasks. Structure-awareness makes AST-T5 particularly powerful in code-to-code tasks, surpassing CodeT5 by 2 points in exact match score for the Bugs2Fix task and by 3 points in exact match score for Java-C# Transpilation in CodeXGLUE. Our code and model are publicly available at https://github.com/gonglinyuan/ast_t5.
Source-Aware Training Enables Knowledge Attribution in Language Models
University of Michigan(密歇根大学);Allen Institute for AI(艾伦人工智能研究所);Carnegie Mellon University(卡内基梅隆大学);University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校)
School of Computer Science and Technology, Huazhong University of Science and Technology(华中科技大学计算机科学与技术学院);School of Software Engineering, Huazhong University of Science and Technology(华中科技大学软件学院)
Center for Information and Language Processing, LMU Munich(信息与语言处理中心,慕尼黑莱茵河大学);Munich Center for Machine Learning (MCML)(慕尼黑机器学习中心(MCML));Bosch Center for Artificial Intelligence(博世人工智能中心)
AstroMLab 2: AstroLLaMA-2-70B Model and Benchmarking Specialised LLMs for Astronomy
University of Illinois Urbana-Champaign(伊利诺伊大学厄巴纳-香槟分校);University of Pennsylvania(宾夕法尼亚大学);Indian Institute of Technology Patna(印度理工学院巴特那分校);Center for Astrophysics Harvard University(哈佛-史密松天体物理中心);Oak Ridge National Laboratory(橡树岭国家实验室);The Ohio State University(俄亥俄州立大学)
DatedGPT: Preventing Lookahead Bias in Large Language Models with Time-Aware Pretraining
Department of Finance, CUHK Business School, The Chinese University of Hong Kong(香港中文大学商学院金融系,香港中文大学);Centre for Artificial Intelligence, University College London(伦敦大学学院人工智能中心)
Static Program Slicing Using Language Models With Dataflow-Aware Pretraining and Constrained Decoding
Department of Computer Science, University of Manitoba(曼尼托巴大学计算机科学系);School of Engineering and Computer Science, Concordia University(Concordia大学工程与计算机科学学院);School of Computer Science, University of Windsor(温莎大学计算机科学学院)
Contextualized Code Pretraining for Code Generation
Key Lab of HCST (PKU), MOE(高性能计算技术教育部重点实验室;计算机科学与技术学院,北京大学);SCS, Peking University(计算机科学与技术的学院,北京航空航天大学);School of Computer Science & Technology, Beihang University(空间信息集成系统国家重点实验室,中国科学院软件研究所);National Key Laboratory of Space Integrated Information System, Institute of Software Chinese Academy of Sciences(互联网信息协同深圳市重点实验室,哈尔滨工业大学(深圳));Shenzhen Key Laboratory of Internet Information Collaboration, Harbin Institute of Technology, Shenzhen