要約
ソフトウェアエンジニアリングアクティビティには、既存のコードの編集が頻繁に含まれます。
ただし、現代のコード言語モデル(LMS)には、多様な種類のコード編集要件を処理する機能がありません。
この作業では、(1)新しい合成データ生成パイプラインと(2)堅牢なモデル適応アルゴリズムを通じて、この欠点を克服しようとします。
シードコードの例と多様な編集基準から始めて、パイプラインは、異なるスタイルと冗長性の自然言語の指示とともに、元のコードと修正コードを含む高品質のサンプルを生成します。
今日のコードLMSには、コード生成や命令のフォローなど、強力な能力が束ねられます。これは、微調整のために失われるべきではありません。
これを確実にするために、(a)コード編集に最も重要な重みを識別するために密なグラデーションベースのステップを活用し、(b)過剰適合を避けるためにベースモデルにまばらな投影を行うという新しい適応アルゴリズムであるSelektを提案します。
アプローチを使用して、5つのコード編集ベンチマークで強力な結果を達成し、比較可能なサイズモデルを上回る、さらにはいくつかの大きなモデルでさえ、新しいシリーズNextCoder(QWENCODER-2.5から編集)を取得します。
2つのモデルファミリ(DeepSeekCoderとQWENCODER)でアプローチの一般性を示し、他の微調整アプローチと比較し、適応後のコード生成能力の保持を示すことにより堅牢性を示します。
要約(オリジナル)
Software engineering activities frequently involve edits to existing code. However, contemporary code language models (LMs) lack the ability to handle diverse types of code-edit requirements. In this work, we attempt to overcome this shortcoming through (1) a novel synthetic data generation pipeline and (2) a robust model adaptation algorithm. Starting with seed code examples and diverse editing criteria, our pipeline generates high-quality samples comprising original and modified code, along with natural language instructions in different styles and verbosity. Today’s code LMs come bundled with strong abilities, such as code generation and instruction following, which should not be lost due to fine-tuning. To ensure this, we propose a novel adaptation algorithm, SeleKT, that (a) leverages a dense gradient-based step to identify the weights that are most important for code editing, and (b) does a sparse projection onto the base model to avoid overfitting. Using our approach, we obtain a new series of models NextCoder (adapted from QwenCoder-2.5) that achieves strong results on five code-editing benchmarks, outperforming comparable size models and even several larger ones. We show the generality of our approach on two model families (DeepSeekCoder and QwenCoder), compare against other fine-tuning approaches, and demonstrate robustness by showing retention of code generation abilities post adaptation.
arxiv情報
著者 | Tushar Aggarwal,Swayam Singh,Abhijeet Awasthi,Aditya Kanade,Nagarajan Natarajan |
発行日 | 2025-03-05 16:39:04+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google