EffiCoder: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuning

Dong Huang, Guangtao Zeng, Jianbo Dai, Meng Luo, Han Weng +4 more
2/12/2026

No official code found. Best implementation: huangd1999/EffiCoder (16 stars, Apache-2.0, last commit 2025-05-24).

Abstract

As large language models (LLMs) play an increasingly important role in code generation, enhancing both correctness and efficiency has become crucial. Current methods primarily focus on correctness, often overlooking efficiency. To address this gap, we introduce EffiCoder to improve both aspects by fine-tuning LLMs on a high-quality dataset comprising correct and efficient code samples. Our methodology involves leveraging multiple LLMs to generate diverse candidate code solutions for various tasks across different programming languages. We then evaluate these solutions by measuring their execution time and memory usage through local execution. The code solution with the lowest execution time and memory consumption is selected as the final output for each task. Experimental results demonstrate significant improvements when fine-tuning with Effi-Instruct. For instance, Qwen2.5-Coder-7B-Instruct's pass@1 score increases from 44.8\% to 57.7\%, while the average execution time for correct tasks decreases by 48.4\%. EffiCoder offers a scalable and effective solution for advancing AI-driven code generation, benefiting software development and computational problem-solving. The source code of Effi-Code was released at https://github.com/huangd1999/EffiCoder.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

[ICML 2025] EffiCoder: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuning

161Shell, PythonOct 2, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{huang2026efficoder,
  title  = {EffiCoder: Enhancing Code Generation in Large Language Models through Efficiency-Aware Fine-tuning},
  author = {Dong Huang and Guangtao Zeng and Jianbo Dai and Meng Luo and Han Weng and Yuhao Qing and Heming Cui and Zhijiang Guo and Jie M. Zhang},
  year   = {2026},
  eprint = {2410.10209},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.10209},
  journal = {ICML 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.10209.svg)](https://codeofpaper.com/paper/2410.10209)

Discussion