Skip to main content
QUICK REVIEW

[논문 리뷰] Granite Code Models: A Family of Open Foundation Models for Code Intelligence

Mayank Mishra, Matt Stallone|arXiv (Cornell University)|2024. 05. 07.
Software Engineering Research인용 수 10
한 줄 요약

The Granite Code Models는 116개 프로그래밍 언어로 학습된 오픈 디코더-전용 코드 LLMs(3B–34B)의 가족으로, 코드 생성, 수정, 설명 등 다양한 작업에서 강력한 오픈 모델 성능을 달성하고 연구 및 상업적 사용을 위해 Apache 2.0 하에 출시되었습니다.

ABSTRACT

Large Language Models (LLMs) trained on code are revolutionizing the software development process. Increasingly, code LLMs are being integrated into software development environments to improve the productivity of human programmers, and LLM-based agents are beginning to show promise for handling complex tasks autonomously. Realizing the full potential of code LLMs requires a wide range of capabilities, including code generation, fixing bugs, explaining and documenting code, maintaining repositories, and more. In this work, we introduce the Granite series of decoder-only code models for code generative tasks, trained with code written in 116 programming languages. The Granite Code models family consists of models ranging in size from 3 to 34 billion parameters, suitable for applications ranging from complex application modernization tasks to on-device memory-constrained use cases. Evaluation on a comprehensive set of tasks demonstrates that Granite Code models consistently reaches state-of-the-art performance among available open-source code LLMs. The Granite Code model family was optimized for enterprise software development workflows and performs well across a range of coding tasks (e.g. code generation, fixing and explanation), making it a versatile all around code model. We release all our Granite Code models under an Apache 2.0 license for both research and commercial use.

연구 동기 및 목표

  • 효율적이고 엔터프라이즈에 적합한 코드 LLM의 필요성 및 코드 생성Beyond의 광범위한 기능성의 필요성에 대한 동기 부여.
  • Base 및 Instruct를 아우르는 3B, 8B, 20B, 34B 파라미터를 가진 오픈 Granite Code 모델 패밀리의 제시.
  • 데이터 수집, 모델 아키텍처, 학습/지시 튜닝, 그리고 다양한 코딩 작업에 대한 평가를 설명.

제안 방법

  • 116개 언어의 3.5–4.5T 코드+텍스트 토큰으로 구성된 2단계 사전학습(phase 1: 코드 전용; phase 2: 코드+언어 데이터).
  • 사전 정규화와 모델별 선택(RoPE, GQA/MQA, swiglu, RMSNorm/LN)을 포함한 디코더-전용 트랜스포머 아키텍처를 사이즈에 따라 채택.
  • FIM(Fill-In-the-Middle) objective와 혼합 손실 L = alpha*L_CLM + (1-alpha)*L_FIM를 사용하는 Caudal 언어 모델링 목표, 사전학습 시 alpha=0.5, 지시 튜닝 시 alpha=1.
  • CommitPack-filtered 데이터, NL-지시 데이터셋, MathInstruct/MetaMathQA, 합성 코드 데이터셋을 활용한 지시 튜닝으로 추론 능력 및 지시 이행 향상.
  • 다국어를 대상으로 한 광범위한 벤치마크(HumanEvalPack, MBPP(+), RepoBench, ReCode 등) 및 다국어/추론 중심 평가; 오픈 소스 코드 LLM과의 비교.
Figure 1: Comparison of Granite-8B-Code (Base/Instruct) with other open source (code) LLMs of similar size on HumanEvalPack (Muennighoff et al., 2023 ) , spanning 3 coding tasks and 6 programming languages. See Tables 3 , 10 , 11 for more details. Best viewed in color.
Figure 1: Comparison of Granite-8B-Code (Base/Instruct) with other open source (code) LLMs of similar size on HumanEvalPack (Muennighoff et al., 2023 ) , spanning 3 coding tasks and 6 programming languages. See Tables 3 , 10 , 11 for more details. Best viewed in color.

실험 결과

연구 질문

  • RQ1Granite Code 모델이 오픈 소스 모델 중에서 코드 생성, 수정, 설명, 편집, 번역 등 다양한 태스크에서 최첨단 성능이나 경쟁력 있는 성능을 달성할 수 있는가?
  • RQ2,
  • RQ3Base 및 지시 튜닝 Granite Code 모델이 Python 코드를 넘어 여러 언어 및 벤치마크에서 어떻게 성능을 발휘하는가?
  • RQ4데이터 수집, 필터링, 학습 전략이 오픈 코드 LLM의 신뢰할 수 있고 라이선스 허용 가능한 엔터프라이즈 사용을 가능하게 하는가?
  • RQ52단계 학습 및 지시 튜닝이 코드 태스크의 추론 및 문제해결 능력을 향상시키는가?
  • RQ6Granite Code 모델이 코드 관련 태스크에서 더 큰 또는 일반-purpose 오픈 LLM과 비교해 어떤 차이가 있는가?

주요 결과

  • Granite-8B-Code-Base는 HumanEvalPack에서 경쟁 모델 CodeGemma-8B 대비 약 12포인트 우수한 성능을 보였으며(33.2% vs 21.3%), 학습 토큰 수는 더 적은 4.5T를 사용했다(7.5T).
  • Granite-8B-Code-Base는 CodeFix/CodeExplain 성능이 뛰어나고 HumanEvalPack 및 MultiPL-E에서 다국어 성능이 경쟁력 있다.
  • 지시 튜닝된 Granite Code 모델은 동급 크기의 CodeLlama 지시 모델을 능가하며, Granite-3B/8B/20B가 여러 설정에서 더 큰 CodeLlama 변형을 앞서는 경우가 있다.
  • HumanEvalSynthesize(6개 언어)에서 Granite-3B-Code-Base/8B/20B-Base가 기본 모델 중 최상위 성능을 달성; 심지어 3B-Instruct도 때로는 더 큰 CodeLlama-Instruct 모델을 상회한다.
  • MultiPL-E(18개 언어) 전반에서 Granite-8B-Code-Base가 CodeLlama-7B를 16/18개 언어에서 앞서며, Granite-34B-Code-Base는 많은 언어에서 CodeLlama-34B를 종종 능가한다.
  • MBPP/MBPP+ 결과에서 Granite-8B-Base가 경쟁력 있는 성능을 보이고, 20B/34B 변형이 동료 대비 강한 점수를 달성한다.
Figure 2: An overview of depth upscaling (Kim et al., 2024 ) for efficient training of Granite-34B-Code. We utilize the 20B model after 1.6T tokens to start training of 34B model with the same code pretraining data without any changes to the training and inference framework.
Figure 2: An overview of depth upscaling (Kim et al., 2024 ) for efficient training of Granite-34B-Code. We utilize the 20B model after 1.6T tokens to start training of 34B model with the same code pretraining data without any changes to the training and inference framework.

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

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

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

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