While code large language models have demonstrated remarkable progress in code generation, the generated code often exhibits poor runtime efficiency, limiting its practical application in performance-sensitive scenarios. To address this limitation, we propose an efficiency-oriented reinforcement learning framework guided by a novel performance reward. Based on this framework, we take a deeper dive into the code efficiency problem, identifying then proposing methods to overcome key bottlenecks: (1) Dynamic exploration overcomes the static data constraints of offline fine-tuning, enabling the discovery of more efficient code implementations. (2) The error-insensitive reinforcement learning method and high-contrast efficiency signals are crucial for mitigating systematic errors and achieving effective optimization. (3) Online exploration is most effective when starting from a high-correctness baseline, as this allows for efficiency improvements without sacrificing accuracy. With these discoveries, we finally propose a two-stage tuning method, which achieves high and balanced performance across correctness and efficiency. The results of experiments show the effectiveness of the method, which improves code correctness by 10.18\% and runtime efficiency by 7.75\% on a 7B model, achieving performance comparable to much larger model.
CirrusBench: Evaluating LLM-based Agents Beyond Correctness in Real-World Cloud Service Environments
School of Mathematics and Sciences, Fudan University(复旦大学数学科学学院);Shanghai Center for Mathematical Sciences, Fudan University(复旦大学上海数学中心);Alibaba Group(阿里巴巴集团);Institute of Science and Technology for Brain-Inspired Intelligence, Fudan University(复旦大学类脑智能科学与技术研究院);Center for Applied Mathematics & Shanghai Key Laboratory of Contemporary Applied Mathematics, Fudan University(复旦大学应用数学中心暨上海市现代应用数学重点实验室)
Beyond Correctness: Benchmarking Multi-dimensional Code Generation for Large Language Models
University of Chinese Academy of Sciences(中国科学院大学);Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所);Chinese Information Processing Laboratory(中文信息处理实验室);State Key Laboratory of Computer Science(计算机科学国家重点实验室);Key Laboratory of System Software, Chinese Academy of Sciences(中国科学院系统软件重点实验室)
LEAD: Length-Efficient Adaptive and Dynamic Reasoning for Large Language Models
University of Texas at Dallas(德克萨斯大学达拉斯分校);Emory University(埃默里大学);Individual Researcher(独立研究员);University of Texas at Arlington(德克萨斯大学阿灵顿分校);University of Florida(佛罗里达大学)
TRACE: Evaluating Execution Efficiency of LLM-Based Code Translation
Key Lab of HCST (PKU), MOE(北京大学智能语言研究实验室(教育部);计算机科学与技术系);SCS, Peking University(中国科学院软件研究所);Institute of Software, Chinese Academy of Sciences(新加坡国立大学);National University of Singapore(伦敦国王学院);King’s College London(北京大学深圳研究生院电子与计算机工程学院);School of Electronic and Computer Engineering, PKU Shenzhen Graduate School
DSEffi-Bench: Demystifying Large Language Models' Capability in Efficient Data Science Code Generation
Key Lab of HCST (PKU), MOE(北京大学计算机辅助设计与图形学教育部重点实验室;北京大学信息科学技术学院);SCS, Peking University, China(北京大学深圳研究生院电子与计算机工程学院);School of Electronic and Computer Engineering, PKU Shenzhen Graduate School, China(新加坡国立大学);National University of Singapore, Singapore(中国科学院软件研究所);Institute of Software, Chinese Academy of Sciences, Beijing, China(伦敦国王学院);King’s College London, London, United Kingdom
PEACE: Towards Efficient Project-Level Efficiency Optimization via Hybrid Code Editing
Hangzhou High-Tech Zone (Binjiang) Institute of Blockchain and Data Security, Zhejiang University(浙江大学杭州高技区(滨江)区块链与数据安全研究院);The Chinese University of Hong Kong(香港中文大学)
EffiCoder: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuning
University of Hong Kong(香港大学);Singapore University of Technology(新加坡科技设计大学);University of Edinburgh(爱丁堡大学);National University of Singapore(新加坡国立大学);Beijing University of Posts(北京邮电大学);University of Cambridge(剑桥大学);King’s College London(伦敦国王学院)