---
title: "CodeBERT vs CodeGeeX"
type: "comparison"
canonical_url: "https://www.graphcanon.com/compare/microsoft-codebert-vs-zai-org-codegeex"
tools: ["microsoft-codebert", "zai-org-codegeex"]
---

# CodeBERT vs CodeGeeX

*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 CodeGeeX if codeGeeX is an open-source multilingual code generation model, originally developed with MindSpore and compatible with PyTorch through DeepSpeed integration.

[CodeBERT](https://github.com/microsoft/CodeBERT) reports 2.8k GitHub stars, 497 forks, and 86 open issues, last pushed Jul 9, 2023. [CodeGeeX](https://codegeex.cn) has 8.8k stars, 688 forks, and 188 open issues, last pushed Aug 13, 2024. Figures are from public GitHub metadata via [CodeBERT's repository](https://github.com/microsoft/CodeBERT) and [CodeGeeX's repository](https://github.com/zai-org/CodeGeeX).

| | [CodeBERT](/tools/microsoft-codebert.md) | [CodeGeeX](/tools/zai-org-codegeex.md) |
| --- | --- | --- |
| Tagline | CodeBERT series models for code pretraining in Python and programming languages | CodeGeeX is an open multilingual code generation model implemented in Mindspore and available via PyTorch. |
| Stars | 2,787 | 8,809 |
| Forks | 497 | 688 |
| Open issues | 86 | 188 |
| 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. | CodeGeeX is an open-source multilingual code generation model, originally developed with MindSpore and compatible with PyTorch through DeepSpeed integration. |
| Persona | - | - |
| Runtime | - | - |
| License | MIT | Apache-2.0 |
| Categories | Model Training | LLM Frameworks, Model Training |

## Trust and health

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

| | [CodeBERT](/tools/microsoft-codebert.md) | [CodeGeeX](/tools/zai-org-codegeex.md) |
| --- | --- | --- |
| Days since push | 1123d | 719d |
| Open issues (now) | 86 | 188 |
| Full report | [trust report](/tools/microsoft-codebert/trust.md) | [trust report](/tools/zai-org-codegeex/trust.md) |

## Shared compatibility

- **Python**: [CodeBERT](/tools/microsoft-codebert.md) - Python runtime; [CodeGeeX](/tools/zai-org-codegeex.md) - Python runtime

## 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: CodeGeeX

- **Adopt for:** CodeGeeX is an open-source multilingual code generation model, originally developed with MindSpore and compatible with PyTorch through DeepSpeed integration.

## Choose when

### Choose CodeBERT if…

- License: CodeBERT is MIT, CodeGeeX is Apache-2.0.
- 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 CodeGeeX if…

- License: CodeGeeX is Apache-2.0, CodeBERT is MIT.
- Tags unique to CodeGeeX: ai programming tools, code generation, pretrained-models.
- Also covers LLM Frameworks.
- When you require support for multilingual code generation and your project has a Python-based infrastructure with CUDA GPU availability.

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

- If your development environment lacks the necessary dependencies like Python 3.7+, CUDA 11+, PyTorch 1.10+, and DeepSpeed 0.6+.
- In scenarios where an open-source solution is not preferable or when support for exclusively one language's syntax is sufficient.

## Common questions

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

CodeBERT: CodeBERT series models for code pretraining in Python and programming languages. CodeGeeX: CodeGeeX is an open multilingual code generation model implemented in Mindspore and available via PyTorch.. See the comparison table for live GitHub stats and shared categories.

### When should I choose CodeBERT over CodeGeeX?

Choose CodeBERT over CodeGeeX when License: CodeBERT is MIT, CodeGeeX is Apache-2.0; 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 CodeGeeX over CodeBERT?

Choose CodeGeeX over CodeBERT when License: CodeGeeX is Apache-2.0, CodeBERT is MIT; Tags unique to CodeGeeX: ai programming tools, code generation, pretrained-models; Also covers LLM Frameworks; When you require support for multilingual code generation and your project has a Python-based infrastructure with CUDA GPU availability.

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

If your development environment lacks the necessary dependencies like Python 3.7+, CUDA 11+, PyTorch 1.10+, and DeepSpeed 0.6+. In scenarios where an open-source solution is not preferable or when support for exclusively one language's syntax is sufficient.

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

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

### Are CodeBERT and CodeGeeX open source?

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

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

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

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

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

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