---
title: "CodeBERT vs CodeT5"
type: "comparison"
canonical_url: "https://www.graphcanon.com/compare/microsoft-codebert-vs-salesforce-codet5"
tools: ["microsoft-codebert", "salesforce-codet5"]
---

# CodeBERT vs CodeT5

*GraphCanon updated Oct 8, 2026*

## Verdict

Pick CodeBERT if codeBERT is an advanced pre-trained model for programming and natural language tasks in multiple languages like Python and Java; pick CodeT5 if codeT5 is a large language model for code understanding and generation, developed by Salesforce, and is released under the BSD-3-Clause license.

[CodeBERT](https://github.com/microsoft/CodeBERT) reports 2.8k GitHub stars, 497 forks, and 87 open issues, last pushed Jul 9, 2023. [CodeT5](https://arxiv.org/abs/2305.07922) has 3.1k stars, 486 forks, and 88 open issues, last pushed Jun 25, 2026. Figures are from public GitHub metadata via [CodeBERT's repository](https://github.com/microsoft/CodeBERT) and [CodeT5's repository](https://github.com/salesforce/CodeT5).

| | [CodeBERT](/tools/microsoft-codebert.md) | [CodeT5](/tools/salesforce-codet5.md) |
| --- | --- | --- |
| Tagline | CodeBERT series models for code pretraining in Python and programming languages | Open Code LLMs for Code Understanding and Generation |
| Stars | 2,791 | 3,093 |
| Forks | 497 | 486 |
| Open issues | 87 | 88 |
| Language | Python | Python |
| Adopt for | CodeBERT is an advanced pre-trained model for programming and natural language tasks in multiple languages like Python and Java. | CodeT5 is a large language model for code understanding and generation, developed by Salesforce, and is released under the BSD-3-Clause license. |
| Persona | - | - |
| Runtime | - | - |
| License | MIT | CodeT5 is released under the BSD-3-Clause license, which allows for free use, modification, and distribution, provided that the original copyright notice and disclaimer are included. |
| Categories | Model Training | LLM Frameworks, Model Training |

## Trust and health

_Sourced signals - not a safety guarantee. No winner column._

| | [CodeBERT](/tools/microsoft-codebert.md) | [CodeT5](/tools/salesforce-codet5.md) |
| --- | --- | --- |
| Maintenance | Dormant (18%) | Archived (8%) |
| Days since push | 1186d | 84d |
| Archived on GitHub | No | Yes |
| Open issues (now) | 87 | 88 |
| Stars delta | +3 (30d) | -5 (30d) |
| Open issues delta | +1 (30d) | 0 (30d) |
| Full report | [trust report](/tools/microsoft-codebert/trust.md) | [trust report](/tools/salesforce-codet5/trust.md) |

## Decision facts: CodeBERT

- **Requirements:** Install torch and transformers via pip before using CodeBERT for embedding generation or other tasks; Ensure Python and Hugging Face's transformers framework are available, as they form the core execution environment for utilizing this model
- **Adopt for:** CodeBERT is an advanced pre-trained model for programming and natural language tasks in multiple languages like Python and Java.

## Decision facts: CodeT5

- **Requirements:** Min 8 GB RAM; The model may require significant computational resources for training and inference.
- **Adopt for:** CodeT5 is a large language model for code understanding and generation, developed by Salesforce, and is released under the BSD-3-Clause license.
- **License detail:** CodeT5 is released under the BSD-3-Clause license, which allows for free use, modification, and distribution, provided that the original copyright notice and disclaimer are included.

## Choose when

### Choose CodeBERT if…

- License: CodeBERT is MIT, CodeT5 is BSD-3-Clause.
- Requirements: Install torch and transformers via pip before using CodeBERT for embedding generation or other tasks; Ensure Python and Hugging Face's transformers framework are available, as they form the core execution environment for utilizing this model.
- Tags unique to CodeBERT: code pretraining, transformers framework.
- When you need to work on tasks involving both programming and natural language processing across six different programming languages: Python, Java, JavaScript, PHP, Ruby, Go

### Choose CodeT5 if…

- License: CodeT5 is BSD-3-Clause, CodeBERT is MIT.
- Requirements: Min 8 GB RAM; The model may require significant computational resources for training and inference..
- Tags unique to CodeT5: code-generation, code-intelligence, code-understanding, language-model.
- Also covers LLM Frameworks.
- When you need a tool specifically for code understanding and generation tasks, as CodeT5 is designed with a focus on these areas.

## When NOT to use CodeBERT

- Avoid for direct mask prediction tasks without MLM (Masked Language Model) fine-tuning as CodeBERT is not natively equipped for such tasks unlike its variant designed with MLM capabilities
- Do not consider it if your project requires pre-training models on a wider variety of programming languages beyond the six supported by this model

## When NOT to use CodeT5

- If your project involves promoting or profiting from violence, hate, division, environmental destruction, abuse of human rights, or the destruction of people's physical and mental health, as these are

## Common questions

### What is the difference between CodeBERT and CodeT5?

CodeBERT: CodeBERT series models for code pretraining in Python and programming languages. CodeT5: Open Code LLMs for Code Understanding and Generation. See the comparison table for live GitHub stats and shared categories.

### When should I choose CodeBERT over CodeT5?

Choose CodeBERT over CodeT5 when License: CodeBERT is MIT, CodeT5 is BSD-3-Clause; Requirements: Install torch and transformers via pip before using CodeBERT for embedding generation or other tasks; Ensure Python and Hugging Face's transformers framework are available, as they form the core execution environment for utilizing this model; Tags unique to CodeBERT: code pretraining, transformers framework; When you need to work on tasks involving both programming and natural language processing across six different programming languages: Python, Java, JavaScript, PHP, Ruby, Go.

### When should I choose CodeT5 over CodeBERT?

Choose CodeT5 over CodeBERT when License: CodeT5 is BSD-3-Clause, CodeBERT is MIT; Requirements: Min 8 GB RAM; The model may require significant computational resources for training and inference.; Tags unique to CodeT5: code-generation, code-intelligence, code-understanding, language-model; Also covers LLM Frameworks; When you need a tool specifically for code understanding and generation tasks, as CodeT5 is designed with a focus on these areas.

### When should I avoid CodeBERT?

Avoid for direct mask prediction tasks without MLM (Masked Language Model) fine-tuning as CodeBERT is not natively equipped for such tasks unlike its variant designed with MLM capabilities Do not consider it if your project requires pre-training models on a wider variety of programming languages beyond the six supported by this model

### When should I avoid CodeT5?

If your project involves promoting or profiting from violence, hate, division, environmental destruction, abuse of human rights, or the destruction of people's physical and mental health, as these are

### Is CodeBERT or CodeT5 more popular on GitHub?

CodeT5 has more GitHub stars (3,093 vs 2,791). Stars measure visibility, not whether either tool fits your constraints.

### Are CodeBERT and CodeT5 open source?

Yes - both are open-source projects on GitHub (CodeBERT: MIT, CodeT5: BSD-3-Clause).

### Where can I find alternatives to CodeBERT or CodeT5?

GraphCanon lists graph-backed alternatives at [CodeBERT alternatives](/tools/microsoft-codebert/alternatives) and [CodeT5 alternatives](/tools/salesforce-codet5/alternatives) ([CodeBERT markdown twin](/tools/microsoft-codebert/alternatives.md), [CodeT5 markdown twin](/tools/salesforce-codet5/alternatives.md)), ranked by typed relationship edges rather than popularity votes.

### Is there a machine-readable version of this comparison?

Yes. The markdown twin at [this comparison](/compare/microsoft-codebert-vs-salesforce-codet5.md) mirrors this page for agents and LLM crawlers, with the same stats table and FAQ answers.

### Which is better maintained, CodeBERT or CodeT5?

CodeBERT: Dormant. CodeT5: Archived. Compare maintenance labels, days since push, and release cadence in the trust section below - stars alone do not measure maintenance.

### Where are the full trust reports for CodeBERT and CodeT5?

GraphCanon publishes per-repo trust reports with dated maintenance, provenance, and scan summaries: [CodeBERT trust report](/tools/microsoft-codebert/trust); [CodeT5 trust report](/tools/salesforce-codet5/trust).

---

**Machine-readable endpoints**

- JSON: [`/api/graphcanon/graph?tool=microsoft-codebert`](/api/graphcanon/graph?tool=microsoft-codebert)
- LLM index: [/llms.txt](/llms.txt)
- Full corpus: [/llms-full.txt](/llms-full.txt)

_GraphCanon - The knowledge graph for AI development. https://www.graphcanon.com/_
