プロジェクトレベルのコード補完のための事前学習について
On Pretraining for Project-Level Code Completion
October 15, 2025
著者: Maksim Sapronov, Evgeniy Glukhov
cs.AI
要旨
リポジトリレベルでの事前学習は、大規模言語モデルがコードベース全体の文脈を活用するために一般的に使用される。これにより、正確で文脈を考慮したコード補完を生成する能力が向上する。本研究では、1.5BパラメータのモデルであるOpenCoderにおいて、異なるリポジトリ処理戦略がインコンテキスト学習にどのように影響するかを調査する。我々は、追加の1Bトークンのキュレーションされたリポジトリレベルのデータを学習することで、そのコンテキストウィンドウを4,096トークンから16,384トークンに拡張した。競合モデル(しばしば数百億トークンを使用する)よりも小規模なデータセットに依存しているにもかかわらず、我々のモデルはLong Code Arenaベンチマークで同等の性能を達成する。様々なリポジトリ処理技術が同様に強力な結果をもたらすことがわかり、主な利得は新しいロータリーポジショナルエンベディング(RoPE)スケーリングパラメータへの適応から得られる。最後に、元のシーケンス長でのよりシンプルなファイルレベルでの学習アプローチが依然として非常に有効であることを示し、データと計算リソースがより制約された環境でのリポジトリレベルのコード補完研究の可能性を開く。
English
Repository-level pretraining is commonly used to enable large language models
for code to leverage codebase-wide context. This enhances their ability to
generate accurate and context-aware code completions. In this work, we
investigate how different repository-processing strategies affect in-context
learning in OpenCoder, a 1.5B-parameter model. We extend its context window
from 4,096 to 16,384 tokens by training on additional 1B tokens of curated
repository-level data. Despite relying on a smaller dataset than competing
models (which often use hundreds of billions of tokens), our model achieves
comparable performance on the Long Code Arena benchmark. We find that various
repository-processing techniques yield similarly strong results, with the
primary gain coming from adapting to a new rotary positional embedding (RoPE)
scaling parameter. Finally, we show that a simpler file-level training approach
at the original sequence length remains highly effective, opening up
repository-level code completion research to settings with more constrained
data and compute resources.