CodeT5
CodeT5 is an open-source, identifier-aware pre-trained encoder-decoder model for code, built by Salesforce Research and presented at EMNLP 2021. It handles both code understanding tasks such as defect detection and clone detection, and generation tasks such as code summarization, text-to-code generation, code translation and code refinement. It was pre-trained on 8.35 million functions in 8 programming languages (Python, Java, JavaScript, PHP, Ruby, Go, C and C#), and Salesforce used it to power an AI coding assistant for Apex developers with text-to-code generation, autocompletion and summarization.
Free - open-source model; Salesforce released the code and pre-trained models publicly on GitHub.
How to use CodeT5
- Get the code and pre-trained models from the public GitHub repository, or the released checkpoints on Hugging Face.
- Pick your task: code understanding such as defect detection and clone detection, or generation such as code summarization, text-to-code generation, code translation and code refinement.
- Fine-tune a checkpoint for your downstream task — Salesforce released fine-tuned checkpoints for the tasks covered in the paper.
- Deploy it as a coding assistant: Salesforce's own demo used CodeT5 as a VS Code plugin for text-to-code generation, code autocompletion and code summarization.
Frequently asked questions
Is CodeT5 free?
Yes. CodeT5 is open source under the BSD-3-Clause license, and Salesforce released the code and pre-trained models publicly on GitHub.
Do I need an account to use CodeT5?
No. The repository is public, so the code and models can be downloaded without signing up; the checkpoints are also published on Hugging Face.
What is CodeT5 best for?
Code intelligence research and building coding assistants: it was pre-trained on 8.35 million functions in 8 programming languages (Python, Java, JavaScript, PHP, Ruby, Go, C and C#) and handles both understanding and generation tasks.
Pros & cons
Pros
- Free and open source under the BSD-3-Clause license, with code and pre-trained models released publicly.
- One model family handles both code understanding (defect and clone detection) and generation (summarization, text-to-code, translation, refinement).
- Pre-trained on 8.35 million functions across 8 programming languages, with fine-tuned checkpoints released for the paper's downstream tasks.
Cons
- CodeT5 is a research model, not a ready-made app — using it means setting up, fine-tuning and deploying the model yourself.
- The GitHub repository is archived (public archive), so it is no longer actively maintained by Salesforce Research.
Related Coding & Development tools
- GitHub CopilotFreemium · ★4.7 · GitHub / Microsoft
- CursorFreemium · ★4.7 · Anysphere
- WindsurfFreemium · Cognition
- Replit AIFreemium · Replit
- Amazon Q DeveloperFreemium · Amazon
- Sourcegraph CodyPaid · Sourcegraph
- DevinFreemium · Cognition
- AiderFree · Aider