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

# CodeBERT vs CodeT

*GraphCanon updated Aug 5, 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 CodeT if projects from Microsoft to upgrade large-scale pretrained language models for programming and reasoning tasks.

[CodeBERT](https://github.com/microsoft/CodeBERT) reports 2.8k GitHub stars, 497 forks, and 86 open issues, last pushed Jul 9, 2023. [CodeT](https://github.com/microsoft/CodeT) has 678 stars, 86 forks, and 10 open issues, last pushed Nov 1, 2024. Figures are from public GitHub metadata via [CodeBERT's repository](https://github.com/microsoft/CodeBERT) and [CodeT's repository](https://github.com/microsoft/CodeT).

| | [CodeBERT](/tools/microsoft-codebert.md) | [CodeT](/tools/microsoft-codet.md) |
| --- | --- | --- |
| Tagline | CodeBERT series models for code pretraining in Python and programming languages | CodeT |
| Stars | 2,787 | 678 |
| Forks | 497 | 86 |
| Open issues | 86 | 10 |
| 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. | Projects from Microsoft to upgrade large-scale pretrained language models for programming and reasoning tasks. |
| Persona | - | - |
| Runtime | - | - |
| License | MIT | MIT |
| Categories | Model Training | Developer Tools, Model Training |

## Trust and health

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

| | [CodeBERT](/tools/microsoft-codebert.md) | [CodeT](/tools/microsoft-codet.md) |
| --- | --- | --- |
| Days since push | 1123d | 642d |
| Open issues (now) | 86 | 10 |
| Full report | [trust report](/tools/microsoft-codebert/trust.md) | [trust report](/tools/microsoft-codet/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: CodeT

- **Adopt for:** Projects from Microsoft to upgrade large-scale pretrained language models for programming and reasoning tasks.

## Choose when

### Choose CodeBERT if…

- 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 CodeT if…

- Tags unique to CodeT: language-models, programming, reasoning.
- Also covers Developer Tools.
- When you need advanced code generation with test generation features.

## 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 CodeT

- Avoid if your project strictly needs a different programming task than those provided by CodeT projects.
- Skip if your workflow does not support or benefit from an enhanced reasoning capability in models.

## Common questions

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

CodeBERT: CodeBERT series models for code pretraining in Python and programming languages. CodeT: CodeT. See the comparison table for live GitHub stats and shared categories.

### When should I choose CodeBERT over CodeT?

Choose CodeBERT over CodeT when 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 CodeT over CodeBERT?

Choose CodeT over CodeBERT when Tags unique to CodeT: language-models, programming, reasoning; Also covers Developer Tools; When you need advanced code generation with test generation features.

### 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 CodeT?

Avoid if your project strictly needs a different programming task than those provided by CodeT projects. Skip if your workflow does not support or benefit from an enhanced reasoning capability in models.

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

CodeBERT has more GitHub stars (2,787 vs 678). Stars measure visibility, not whether either tool fits your constraints.

### Are CodeBERT and CodeT open source?

Yes - both are open-source projects on GitHub (CodeBERT: MIT, CodeT: MIT).

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

GraphCanon lists graph-backed alternatives at [CodeBERT alternatives](/tools/microsoft-codebert/alternatives) and [CodeT alternatives](/tools/microsoft-codet/alternatives) ([CodeBERT markdown twin](/tools/microsoft-codebert/alternatives.md), [CodeT markdown twin](/tools/microsoft-codet/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-microsoft-codet.md) mirrors this page for agents and LLM crawlers, with the same stats table and FAQ answers.

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

CodeBERT: Dormant. CodeT: Dormant. 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 CodeT?

GraphCanon publishes per-repo trust reports with dated maintenance, provenance, and scan summaries: [CodeBERT trust report](/tools/microsoft-codebert/trust); [CodeT trust report](/tools/microsoft-codet/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/_
