[論文レビュー] DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligence
DeepSeek-Coder は オープンソースのコード LLM(1.3B–33B)を提供、2T トークンとリポジトリレベルデータおよび Fill-In-Middle トレーニングで訓練され、オープンソースの最先端結果を達成し、クローズドモデルに対して競争力を持つ。
The rapid development of large language models has revolutionized code intelligence in software development. However, the predominance of closed-source models has restricted extensive research and development. To address this, we introduce the DeepSeek-Coder series, a range of open-source code models with sizes from 1.3B to 33B, trained from scratch on 2 trillion tokens. These models are pre-trained on a high-quality project-level code corpus and employ a fill-in-the-blank task with a 16K window to enhance code generation and infilling. Our extensive evaluations demonstrate that DeepSeek-Coder not only achieves state-of-the-art performance among open-source code models across multiple benchmarks but also surpasses existing closed-source models like Codex and GPT-3.5. Furthermore, DeepSeek-Coder models are under a permissive license that allows for both research and unrestricted commercial use.
研究の動機と目的
- Closed-source の支配がコード知能分野でもたらす研究的ギャップを解消するためにオープンソースのコードモデルを開発する。
- 大規模で高品質なコーパスから、リポジトリを意識した長文脈コード LLM の一連をゼロから訓練する。
- リポジトリレベルのデータ構築と Fill-In-Middle 学習がファイル間コード生成と全体的なコード熟練度に与える影響を評価する。
- 指示適合型のバリアントと包括的なベンチマークを提供し、多言語のコーディング能力と実世界での適用性を評価する。
提案手法
- 大規模なオープンソースコードコーパスを作成する(87言語、2T トークン)、リポジトリレベルの組織化。
- 依存関係ベースのトポロジカル配置を適用して、ファイル依存関係で訓練データを並べ替える。
- リポジトリレベルの近似重複除去を実施してリポジトリ構造を維持しつつ繰り返しを削減。
- デコーダ中心の Transformers(1.3B、6.7B、33B)を next-token prediction と Fill-In-Middle(FIM)目的(PSM/ MSP バリアント)および 16K コンテキストウィンドウで事前訓練。
- RoPE コンテキストを拡張し RoPE ベースの長い文脈スケーリングを用いて最大 64K トークンまで適用(経験的には 16K が最適)。
- DeepSeek-Coder-Instruct を Alpaca 風データを用いた指示チューニングと別の評価プロトコルを用いて訓練。
実験結果
リサーチクエスチョン
- RQ1リポジトリレベルのデータ構築は、ファイルレベルのデータと比べて跨ファイルのコード生成を改善するか。
- RQ2PSM 対 MSP の Fill-In-the-Middle 学習設定は、コード生成と完了性能にどのような影響を与えるか。
- RQ3オープンソースの DeepSeek-Coder モデルは、Codex、GPT-3.5、GPT-4 といったクローズドソースモデルと標準的なコードベンチマークおよび実世界タスクで比較してどうか。
- RQ4指示チューニング(DeepSeek-Coder-Instruct)は、コードタスクにおいて言語を跨いでクローズドモデルとの差を埋めるか。
- RQ5長文脈適応がリポジトリ規模のコーディングシナリオで性能に与える影響は何か。
主な発見
| モデル | サイズ | Python | C++ | Java | PHP | TS | C# | Bash | JS | 平均 | MBPP | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| DeepSeek-Coder-Base | 1.3B | 34.8% | 31.1% | 32.3% | 24.2% | 28.9% | 36.7% | 10.1% | 28.6% | 28.3% | 50.3% | 46.2% |
| DeepSeek-Coder-Base | 6.7B | 49.4% | 50.3% | 43.0% | 38.5% | 49.7% | 50.0% | 28.5% | 48.4% | 44.7% | 60.6% | 66.1% |
| DeepSeek-Coder-Base | 33B | 56.1% | 58.4% | 51.9% | 44.1% | 52.8% | 51.3% | 32.3% | 55.3% | 50.3% | 69.2% | 70.0% |
| GPT-3.5-Turbo | - | - | - | - | - | - | - | - | - | 64.9% | - | |
| GPT-4 | - | - | - | - | - | - | - | - | - | 80.0% | - | |
| DeepSeek-Coder-Instruct | 1.3B | 65.2% | 45.3% | 51.9% | 45.3% | 59.7% | 55.1% | 12.7% | 52.2% | 48.4% | 49.4% | |
| DeepSeek-Coder-Instruct | 6.7B | 78.6% | 63.4% | 68.4% | 68.9% | 67.2% | 72.8% | 36.7% | 72.7% | 66.1% | 65.4% | |
| DeepSeek-Coder-Instruct | 33B | 79.3% | 68.9% | 73.4% | 72.7% | 67.9% | 74.1% | 43.0% | 73.9% | 69.2% | 70.0% |
- DeepSeek-Coder-Base 33B は、複数のベンチマークにおいてオープンソースのコードモデルの中で最先端のパフォーマンスを達成。
- DeepSeek-Coder-Instruct 33B は多くのベンチマークで GPT-3.5 Turbo を上回り、オープンモデル間で GPT-4 へのギャップを縮める。
- DeepSeek-Coder-Base 7B は、いくつかの設定で CodeLlama-33B のように5倍以上大きいモデルと競合可能。
- リポジトリレベルのデータ構築は、跨ファイルのコード生成能力を大幅に向上させる。
- Fill-In-Middle 学習で 50% の PSM レートは、コード完了と FIM 効果のバランスを提供。
- DeepSeek-Coder-Instruct モデルは LeetCode コンテストで高いパフォーマンスを示し、33B がいくつかのオープンソースベースラインを上回り、いくつかのタスクで GPT-4 レベルに近づく。
- DS-1000 データサイエンスベンチマークでは、DeepSeek-Coder-33B が Matplotlib、NumPy、Pandas、PyTorch、SciKit-Learn、TensorFlow などでライブラリ固有の精度を顕著に達成。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。