Granite Code Models: A Family of Open Foundation Models for Code Intelligence
作者: Mayank Mishra, Matt Stallone, Gaoyuan Zhang, Yikang Shen, Aditya Prasad, Adriana Meza Soria, Michele Merler, Parameswaran Selvam, Saptha Surendran, Shivdeep Singh, Manish Sethi, Xuan-Hong Dang, Pengyuan Li, Kun-Lung Wu, Syed Zawad, Andrew Coleman, Matthew White, Mark Lewis, Raju Pavuluri, Yan Koyfman, Boris Lublinsky, Maximilien de Bayser, Ibrahim Abdelaziz, Kinjal Basu, Mayank Agarwal, Yi Zhou, Chris Johnson, Aanchal Goyal, Hima Patel, Yousaf Shah, Petros Zerfos, Heiko Ludwig, Asim Munawar, Maxwell Crouse, Pavan Kapanipathi, Shweta Salaria, Bob Calio, Sophia Wen, Seetharami Seelam, Brian Belgodere, Carlos Fonseca, Amith Singhee, Nirmit Desai, David D. Cox, Ruchir Puri, Rameswar Panda
分类: cs.AI, cs.CL, cs.SE
发布日期: 2024-05-07
备注: Corresponding Authors: Rameswar Panda, Ruchir Puri; Equal Contributors: Mayank Mishra, Matt Stallone, Gaoyuan Zhang
💡 一句话要点
发布Granite代码模型系列,为代码智能提供开源基础模型
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 代码大语言模型 代码生成 代码修复 开源模型 企业软件开发
📋 核心要点
- 代码大语言模型在软件开发中日益重要,但现有模型在能力范围和企业应用优化方面仍有提升空间。
- Granite代码模型系列通过不同规模的模型,覆盖多种应用场景,并针对企业软件开发工作流程进行了优化。
- 实验表明,Granite代码模型在代码生成、修复和解释等任务中,性能达到开源代码LLM的领先水平。
📝 摘要(中文)
本文介绍了Granite系列解码器式代码生成模型,该模型使用116种编程语言的代码进行训练。Granite代码模型系列包含参数规模从30亿到340亿的模型,适用于从复杂的应用程序现代化任务到设备上内存受限的用例等多种应用场景。在全面的任务评估中,Granite代码模型始终在可用的开源代码LLM中达到最先进的性能。Granite代码模型系列针对企业软件开发工作流程进行了优化,并在各种编码任务(例如代码生成、修复和解释)中表现良好,使其成为一种通用的全能代码模型。所有Granite代码模型均以Apache 2.0许可发布,供研究和商业用途。
🔬 方法详解
问题定义:现有代码大语言模型虽然在软件开发中展现出潜力,但在企业级应用中,需要考虑模型规模、任务覆盖范围以及对特定工作流程的优化。此外,开源模型的性能仍有提升空间,尤其是在代码生成、修复和解释等关键任务上。
核心思路:Granite代码模型系列的核心思路是提供一系列不同规模的解码器式模型,以满足不同应用场景的需求。通过在大量代码数据上进行训练,并针对企业软件开发工作流程进行优化,旨在打造一个通用的、高性能的代码智能基础模型。
技术框架:Granite代码模型系列采用解码器式架构,使用116种编程语言的代码进行训练。该系列包含参数规模从30亿到340亿的模型,以适应不同的计算资源和应用场景。模型的训练过程包括数据预处理、模型训练和评估等阶段。
关键创新:Granite代码模型的主要创新在于其模型家族的设计,提供了不同规模的模型选择,从而更好地适应各种资源约束和性能需求。此外,该模型针对企业软件开发工作流程进行了优化,使其在实际应用中更具实用性。
关键设计:具体的参数设置、损失函数和网络结构等技术细节在论文中没有详细说明,属于未知信息。但可以推测,模型训练过程中可能采用了常见的语言模型训练技巧,例如Transformer架构、交叉熵损失函数等。针对企业软件开发工作流程的优化可能涉及到特定的数据增强、微调或模型结构调整。
🖼️ 关键图片
📊 实验亮点
Granite代码模型在代码生成、修复和解释等任务中表现出色,在可用的开源代码LLM中达到了最先进的性能。具体的性能数据和对比基线在摘要中没有明确给出,属于未知信息,但强调了其在开源模型中的领先地位。
🎯 应用场景
Granite代码模型可广泛应用于软件开发领域,例如代码生成、错误修复、代码解释和文档生成等。该模型可用于提高开发人员的生产力,并支持自动化软件开发流程。此外,该模型还可用于应用程序现代化和设备上的代码智能应用,具有重要的实际价值和广泛的应用前景。
📄 摘要(原文)
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.