paper-with-me

Papers

EffiLearner: Enhancing Efficiency of Generated Code via Self-Optimization

2024-05-24 · Dong Huang, Jianbo Dai, Han Weng, Puzhen Wu, Yuhao QING, Heming Cui, Zhijiang Guo, Jie M. Zhang

Large language models (LLMs) have shown remarkable progress in code generation, but their generated code often suffers from inefficiency, resulting in longer execution times and higher memory consumption. To address this issue, we propose \textbf{EffiLearner}, a self-optimization framework that utilizes execution overhead profiles to improve the efficiency of LLM-generated code. EffiLearner first generates code using an LLM, then executes it locally to capture execution time and memory usage profiles. These profiles are fed back to the LLM, which then revises the code to reduce overhead. To evaluate the effectiveness of EffiLearner, we conduct extensive experiments on the EffiBench, HumanEval, and MBPP with 16 open-source and 6 closed-source models. Our evaluation results demonstrate that through iterative self-optimization, EffiLearner significantly enhances the efficiency of LLM-generated code. For example, the execution time (ET) of StarCoder2-15B for the EffiBench decreases from 0.93 (s) to 0.12 (s) which reduces 87.1% the execution time requirement compared with the initial code. The total memory usage (TMU) of StarCoder2-15B also decreases from 22.02 (Mb*s) to 2.03 (Mb*s), which decreases 90.8% of total memory consumption during the execution process. The source code of EffiLearner was released in https://github.com/huangd1999/EffiLearner

📄 PDF Abstract BibTeX arXiv:2405.15189

Code (3)

huangd1999/effilearner 공식 구현
huangd1999/soap 공식 구현 pytorch
yangyucheng000/University/tree/main/model-3/starcoder2 mindspore

Tasks

Code GenerationHumanEvalmbpp

Similar Papers 제목 키워드 기반

PerfCodeGen: Improving Performance of LLM Generated Code with Execution Feedback

2024-11-18 · Yun Peng, Akhilesh Deepak Gotmare, Michael Lyu, Caiming Xiong 외

Large Language Models (LLMs) are widely adopted for assisting in software development tasks, yet their performance evaluations have narrowly focused on the functional correctness of generated code. Human programmers, how…

HumanEvalmbpp

Revisit Self-Debugging with Self-Generated Tests for Code Generation

2025-01-22 · Xiancai Chen, Zhengwei Tao, Kechi Zhang, Changzhi Zhou 외

Large language models (LLMs) have shown significant advancements in code generation, but still face challenges on tasks beyond their basic capabilities. Recently, the notion of self-debugging has been proposed to boost t…

Code Generation

Evaluating the Energy-Efficiency of the Code Generated by LLMs

2025-05-23 · Md Arman Islam, Devi Varaprasad Jonnala, Ritika Rekhi, Pratik Pokharel 외

As the quality of code generated by Large Language Models (LLMs) improves, their adoption in the software industry for automated code generation continues to grow. Researchers primarily focus on enhancing the functional …

Code Generation

CodeVision: Detecting LLM-Generated Code Using 2D Token Probability Maps and Vision Models

2025-01-06 · Zhenyu Xu, Victor S. Sheng

The rise of large language models (LLMs) like ChatGPT has significantly improved automated code generation, enhancing software development efficiency. However, this introduces challenges in academia, particularly in dist…

Code GenerationComputational Efficiency

DSTC: Direct Preference Learning with Only Self-Generated Tests and Code to Improve Code LMs

2024-11-20 · Zhihan Liu, Shenao Zhang, Yongfei Liu, Boyi Liu 외

Direct preference learning offers a promising and computation-efficient beyond supervised fine-tuning (SFT) for improving code generation in coding large language models (LMs). However, the scarcity of reliable preferenc…

Code GenerationHumanEvalmbpp