Skip to main content
QUICK REVIEW

[논문 리뷰] DeepSeek-Coder: When the Large Language Model Meets Programming -- The Rise of Code Intelligence

Daya Guo, Qihao Zhu|arXiv (Cornell University)|2024. 01. 25.
Software Engineering Research인용 수 104
한 줄 요약

DeepSeek-Coder는 2조 토큰의 리포지토리 수준 데이터와 Fill-In-Middle 학습으로 학습된 1.3B–33B 규모의 오픈 소스 코드 LLM를 제공하며, 오픈 소스 분야에서 최상위 성능을 달성하고 비공개 모델에 비해 경쟁력 있는 성능을 보인다.

ABSTRACT

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.

연구 동기 및 목표

  • 클로즈드 소스가 지배하는 코드 인텔리전스에서 연구 격차를 해소하기 위해 오픈 소스 코드 모델을 개발한다.
  • 대규모 고품질 말뭉치에서 리포지토리 인식 및 긴 컨텍스트를 갖춘 코드 LLM 묶음을 처음부터 학습시킨다.
  • 리포지토리 수준의 데이터 구성과 Fill-In-Middle 학습이 파일 간 코드 생성 및 전반적인 코드 능력에 미치는 영향을 평가한다.
  • 지시사항 조정된 변형과 다국어 코딩 능력 및 실세계 적용성을 평가하는 포괄적 벤치마크를 제공한다.

제안 방법

  • 리포지토리 수준으로 구성된 대규모 오픈 소스 코드 말뭉치(87개 언어, 2T 토큰)를 구축한다.
  • 파일 의존성에 따라 학습 데이터를 의존성 기반 위상 정렬로 배열한다.
  • 반복을 줄이면서 리포지토리 구조를 보존하기 위해 리포지토리 수준의 근접 중복 제거를 수행한다.
  • 다음 토큰 예측 및 Fill-In-Middle(FIM) 목표(PSM/ MSP 변형)와 16K 컨텍스트 윈도우로 디코더 전용 트랜스포머(1.3B, 6.7B, 33B)를 프리트레이닝한다.
  • RoPE 컨텍스트를 확장하고 RoPE 기반의 롱 컨텍스트 스케일링을 최대 64K 토큰까지 적용한다(실험적으로 16K 근처가 최적).
  • Alpaca 스타일 데이터와 별도의 평가 프로토콜을 사용한 지시 학습으로 DeepSeek-Coder-Instruct를 훈련한다.

실험 결과

연구 질문

  • RQ1리포지토리 수준의 데이터 구성이 파일 수준 데이터에 비해 파일 간 코드 생성 향상에 기여하는가?
  • RQ2Fill-In-the-Middle 학습 구성(PSM 대 MSP)이 코드 생성 및 완성 성능에 미치는 영향은?
  • RQ3표준 코드 벤치마크 및 실세계 과제에서 오픈 소스 DeepSeek-Coder 모델이 클로즈드 소스 모델(Codex, GPT-3.5, GPT-4)과 어떻게 비교되는가?
  • RQ4지시 학습(DeepSeek-Coder-Instruct)이 다국어 코드 작업에서 클로즈드 모델과의 격차를 메우는가?
  • RQ5리포지토리 규모의 코딩 시나리오에서 롱 컨텍스트 적응이 성능에 미치는 영향은?

주요 결과

모델크기파이썬C++자바PHPTSC#배시자바스크립트평균MBPP
DeepSeek-Coder-Base1.3B34.8%31.1%32.3%24.2%28.9%36.7%10.1%28.6%28.3%50.3%46.2%
DeepSeek-Coder-Base6.7B49.4%50.3%43.0%38.5%49.7%50.0%28.5%48.4%44.7%60.6%66.1%
DeepSeek-Coder-Base33B56.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-Instruct1.3B65.2%45.3%51.9%45.3%59.7%55.1%12.7%52.2%48.4%49.4%
DeepSeek-Coder-Instruct6.7B78.6%63.4%68.4%68.9%67.2%72.8%36.7%72.7%66.1%65.4%
DeepSeek-Coder-Instruct33B79.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는 일부 설정에서 5배 더 큰 모델들(예: CodeLlama-33B)과 경쟁력 있다.
  • 리포지토리 수준의 데이터 구성은 파일 간 코드 생성 능력을 크게 향상시킨다.
  • 50% PSM 비율의 Fill-In-Middle 학습은 코드 완성과 FIM의 효과 사이의 균형을 제공한다.
  • DeepSeek-Coder-Instruct 모델은 LeetCode Contest에서 강한 성능을 보이며 33B가 여러 오픈 소스 기준치를 상회하고 일부 과제에서 GPT-4 수준에 근접한다.
  • DS-1000 데이터 과학 벤치마크에서 DeepSeek-Coder-33B가 Matplotlib, NumPy, Pandas, PyTorch, SciKit-Learn, TensorFlow 등 라이브러리별 정확도에서 주목할 만한 성과를 보인다.

더 나은 연구,지금 바로 시작하세요

연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.