要約
既存のコード大規模言語モデル (コード LLM) は、コード生成において優れた機能を示しますが、その自己回帰逐次生成には本質的に可逆性が欠けています。
この制限により、人間のようにコーディング中に以前に欠落していたステートメントをタイムリーに修正することができなくなり、多くの場合、エラーの伝播や次善のパフォーマンスにつながります。
JumpCoder は、人間のようなオンライン変更とコード LLM を拡張するための非順次生成を可能にする新しいモデルに依存しないフレームワークです。
JumpCoder の背後にある重要なアイデアは、生成中に必要に応じて、現在生成されているコードに新しいコードを挿入することです。これは、コード LLM と連携して動作する補助埋め込みモデルによって実現されます。
最適な埋め込み位置を事前に特定するのは困難であるため、\textit{infill-first, judge-later} 戦略を採用します。これは、各行の生成後に $k$ の最も重要な位置での埋め込みを実験し、抽象構文を使用します。
ツリー (AST) パーサーと生成モデル スコアリングを併用して、潜在的な各埋め込みの妥当性を効果的に判断します。
複数の多言語ベンチマークにわたって 6 つの最先端のコード LLM を使用した広範な実験では、すべてのベースラインに対して大幅な改善が一貫して示されています。
私たちのコードは https://github.com/Keytoyze/JumpCoder で公開されています。
要約(オリジナル)
While existing code large language models (code LLMs) exhibit impressive capabilities in code generation, their autoregressive sequential generation inherently lacks reversibility. This limitation hinders them from timely correcting previous missing statements during coding as humans do, often leading to error propagation and suboptimal performance. We introduce JumpCoder, a novel model-agnostic framework that enables human-like online modification and non-sequential generation to augment code LLMs. The key idea behind JumpCoder is to insert new code into the currently generated code when necessary during generation, which is achieved through an auxiliary infilling model that works in tandem with the code LLM. Since identifying the best infill position beforehand is intractable, we adopt an \textit{infill-first, judge-later} strategy, which experiments with filling at the $k$ most critical positions following the generation of each line, and uses an Abstract Syntax Tree (AST) parser alongside the Generation Model Scoring to effectively judge the validity of each potential infill. Extensive experiments using six state-of-the-art code LLMs across multiple and multilingual benchmarks consistently indicate significant improvements over all baselines. Our code is public at https://github.com/Keytoyze/JumpCoder.
arxiv情報
| 著者 | Mouxiang Chen,Hao Tian,Zhongxin Liu,Xiaoxue Ren,Jianling Sun |
| 発行日 | 2024-06-05 14:12:03+00:00 |
| arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google