2604.00491v1 Apr 01, 2026 cs.PL

실행과 동시에 생성: LLM 코드 생성 시 실행 지연 숨기기

Executing as You Generate: Hiding Execution Latency in LLM Code Generation

Zhi Chen
Zhi Chen
Citations: 52
h-index: 4
Zhensu Sun
Zhensu Sun
Citations: 536
h-index: 11
Chengran Yang
Chengran Yang
Citations: 263
h-index: 9
Zhihao Lin
Zhihao Lin
Citations: 127
h-index: 7
Mingyi Zhou
Mingyi Zhou
Citations: 0
h-index: 0
Li Li
Li Li
Citations: 299
h-index: 7
David Lo
David Lo
Citations: 34
h-index: 4

현재 LLM 기반 코딩 에이전트는 직렬 실행 방식을 따릅니다. 모델이 먼저 전체 코드를 생성한 다음, 인터프리터를 호출하여 실행합니다. 이러한 순차적인 워크플로우는 생성 단계에서는 실행 엔진을 유휴 상태로 만들고, 실행 단계에서는 생성 엔진을 유휴 상태로 만들어 불필요한 전체 지연 시간을 발생시킵니다. 우리는 인간 개발자와 달리 LLM이 코드를 수정 없이 순차적으로 생성한다는 것을 관찰했고, 이를 통해 코드를 생성하는 동시에 실행하는 것이 가능하다는 점을 확인했습니다. 우리는 이러한 병렬 실행 방식을 공식화하고, 생성, 검사, 실행의 세 단계 파이프라인으로 모델링하며, 잠재적인 속도 향상 및 운영 환경을 특징짓는 폐쇄형 지연 시간 경계를 도출했습니다. 우리는 또한 AST 기반 청킹, 게이티드 실행을 통한 동적 배치, 그리고 초기 오류 중단을 특징으로 하는 구체적인 구현체인 Eager를 제시합니다. 우리는 Eager를 네 가지 벤치마크, 일곱 개의 LLM, 그리고 세 가지 실행 환경에서 평가했습니다. 결과는 Eager가 중복되지 않는 실행 지연 시간을 최대 99.9% 줄이고, 전체 지연 시간을 최대 55% 줄일 수 있다는 것을 보여줍니다 (일곱 개의 LLM 및 네 가지 벤치마크 기준).

Original Abstract

Current LLM-based coding agents follow a serial execution paradigm: the model first generates the complete code, then invokes an interpreter to execute it. This sequential workflow leaves the executor idle during generation and the generator idle during execution, resulting in unnecessary end-to-end latency. We observe that, unlike human developers, LLMs produce code tokens sequentially without revision, making it possible to execute code as it is being generated. We formalize this parallel execution paradigm, modeling it as a three-stage pipeline of generation, detection, and execution, and derive closed-form latency bounds that characterize its speedup potential and operating regimes. We then present Eager, a concrete implementation featuring AST-based chunking, dynamic batching with gated execution, and early error interruption. We evaluate Eager across four benchmarks, seven LLMs, and three execution environments. Results show that Eager reduces the non-overlapped execution latency by up to 99.9% and the end-to-end latency by up to 55% across seven LLMs and four benchmarks.

0 Citations
0 Influential
5.5 Altmetric
27.5 Score
Original PDF

No Analysis Report Yet

This paper hasn't been analyzed by Gemini yet.

Log in to request an AI analysis.

댓글

댓글을 작성하려면 로그인하세요.

아직 댓글이 없습니다. 첫 번째 댓글을 남겨보세요!