OpenCodeInterpreter: Integrating Code Generation with Execution and Refinement

Tianyu Zheng, Ge Zhang, Tianhao Shen, Xueling Liu, Bill Yuchen Lin, Jie Fu, Wenhu Chen, Xiang Yue

arXiv:2402.14658 · 2026-07-27 공개 · arXiv · PDF

large-language-models code-generation open-source gpt-4 human-eval code-execution mbpp feedback-integration

Abstract

The introduction of large language models has significantly advanced code generation. However, open-source models often lack the execution capabilities and iterative refinement of advanced systems like the GPT-4 Code Interpreter. To address this, we introduce OpenCodeInterpreter, a family of open-source code systems designed for generating, executing, and iteratively refining code. Supported by Code-Feedback, a dataset featuring 68K multi-turn interactions, OpenCodeInterpreter integrates execution and human feedback for dynamic code refinement. Our comprehensive evaluation of OpenCodeInterpreter across key benchmarks such as HumanEval, MBPP, and their enhanced versions from EvalPlus reveals its exceptional performance. Notably, OpenCodeInterpreter-33B achieves an accuracy of 83.2 (76.4) on the average (and plus versions) of HumanEval and MBPP, closely rivaling GPT-4's 84.2 (76.2) and further elevates to 91.6 (84.6) with synthesized human feedback from GPT-4. OpenCodeInterpreter brings the gap between open-source code generation models and proprietary systems like GPT-4 Code Interpreter.

한국어 요약

한 줄 요약

OpenCodeInterpreter는 실행 및 피드백 기반 반복 개선을 통합한 오픈소스 코드 생성 모델로, GPT-4 Code Interpreter와 유사한 성능을 보인다.

핵심 기여도

핵심 아이디어

기존 코드 생성 모델은 단일 턴에서 생성된 코드만 제공하며, 실행 결과나 사용자 피드백을 반영하는 반복적 개선 기능이 부족하다. OpenCodeInterpreter는 이 문제를 해결하기 위해 실행 결과(컴파일러 진단)와 인간 피드백을 통합한 반복적 코드 개선 프로세스를 도입했다. Code-Feedback이라는 자체 구축 데이터셋을 통해 모델이 다중 턴 상호작용을 학습하도록 유도하여, 코드 생성 후 실행 결과나 사용자 피드백을 바탕으로 코드를 반복적으로 수정하도록 했다. 이는 기존의 단일 턴 기반 모델과 차별화되며, 특히 HumanEval+와 MBPP+에서 높은 성능을 보이는 이유 중 하나이다.

기술적 접근법

주요 결과

의의 및 한계

OpenCodeInterpreter는 오픈소스 코드 생성 모델의 한계를 극복하고, GPT-4 Code Interpreter와 유사한 반복적 개선 기능을 제공함으로써 코드 생성 분야의 새로운 기준을 제시한다. 특히, 실행 진단과 인간 피드백을 통한 반복적 개선 프로세스는 코드 품질과 사용자 맞춤성을 동시에 높이는 데 기여한다. 그러나, 일부 실험은 예산 제약으로 6.7B 및 33B 버전만 수행되었으며, 더 큰 모델의 성능은 명시되지 않았다. 또한, Code-Feedback 데이터셋의 일부 코드 스니펫이 일반적인 패턴을 포함하므로, 특정 벤치마크 성능 향상에 대한 영향은 제한적일 수 있다.

실용적 활용

OpenCodeInterpreter는 소프트웨어 개발 과정에서 사용자 피드백을 반영한 반복적 코드 개선이 필요한 상황에 적합하다. 특히, 코드 테스트 및 디버깅, 사용자 맞춤형 코드 생성, 코딩 교육 플랫폼 등에서 활용 가능하다. 오픈소스이기 때문에, 개발자들이 직접 모델을 사용하거나 커스터마이징하여 다양한 애플리케이션에 통합할 수 있다.