HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

CodeT5+: Open Code Large Language Models for Code Understanding and Generation

Yue Wang Hung Le Akhilesh Deepak Gotmare Nghi D.Q. Bui Junnan Li Steven C.H. Hoi

CodeT5+: Open Code Large Language Models for Code Understanding and Generation

Abstract

Large language models (LLMs) pretrained on vast source code have achieved prominent progress in code intelligence. However, existing code LLMs have two main limitations in terms of architecture and pretraining tasks. First, they often adopt a specific architecture (encoder-only or decoder-only) or rely on a unified encoder-decoder network for different downstream tasks. The former paradigm is limited by inflexibility in applications while in the latter, the model is treated as a single system for all tasks, leading to suboptimal performance on a subset of tasks. Secondly, they often employ a limited set of pretraining objectives which might not be relevant to some downstream tasks and hence result in substantial performance degrade. To address these limitations, we propose ``CodeT5+'', a family of encoder-decoder LLMs for code in which component modules can be flexibly combined to suit a wide range of downstream code tasks. Such flexibility is enabled by our proposed mixture of pretraining objectives to mitigate the pretrain-finetune discrepancy. These objectives cover span denoising, contrastive learning, text-code matching, and causal LM pretraining tasks, on both unimodal and bimodal multilingual code corpora. Furthermore, we propose to initialize CodeT5+ with frozen off-the-shelf LLMs without training from scratch to efficiently scale up our models, and explore instruction-tuning to align with natural language instructions. We extensively evaluate CodeT5+ on over 20 code-related benchmarks in different settings, including zero-shot, finetuning, and instruction-tuning. We observe state-of-the-art (SoTA) model performance on various code-related tasks, such as code generation and completion, math programming, and text-to-code retrieval tasks. Particularly, our instruction-tuned CodeT5+ 16B achieves new SoTA results on HumanEval code generation task against other open code LLMs.

Code Repositories

salesforce/codet5
Official
pytorch
Mentioned in GitHub
leiluk1/codesearcher
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
arithmetic-reasoning-on-gsm8kCodeT5+
Accuracy: 73.8
Parameters (Billion): 0.77
code-search-on-codesearchnetCodeT5+ 220M
Go: 92.4
JS: 70..8
Java: 76.1
Overall: 77.1
PHP: 69.8
Python: 75.6
Ruby: 77.7
code-search-on-codesearchnetCodeT5+ 770M
Go: 92.7
JS: 71.3
Java: 76.2
Overall: 77.4
PHP: 70.1
Python: 75.8
Ruby: 78.0
code-search-on-codexglue-advtestCodeT5+ 770M
MRR: 44.7
code-search-on-codexglue-advtestCodeT5+ 220M
MRR: 43.3

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp
CodeT5+: Open Code Large Language Models for Code Understanding and Generation | Papers | HyperAI