24/12/2022
Using CodeGeeX as a GitHub Copilot alternative:
When GitHub Copilot was released to the public in June 2022, developers worldwide were over the moon, mainly because they’d been waiting for this since the preview was launched in 2021. The wait was worth it, as Copilot fulfilled the goal of helping developers code faster while reducing work. It was almost perfect, except for one thing – Copilot isn’t free.
While the paywall is not a deal breaker for most people, it has led to many people seeking an alternative to Copilot. That’s where CodeGeeX comes in. In this article, we’ll dive into CodeGeeX and see why it can serve as a useful replacement for Copilot.
What is CodeGeeX?
According to its official docs, “CodeGeeX is a large-scale multilingual code generation model with 13 billion parameters pre-trained on a large code corpus of more than 20 programming languages”. Simply put, CodeGeeX is a code generation tool powered by artificial intelligence that helps you write code faster.
CodeGeeX does this by taking your comments and generating code that fits with them or suggesting the next line of code for you based on your previous lines of code.
Unlike Copilot, which is powered by OpenAI Codex, CodeGeeX trains its AI on a cluster of Ascend 910 AI processors (arguably the world’s most powerful AI processor) to power their software. The Ascend 910 AI processors are known to be so powerful that when combined with Mindspore, they are twice as powerful as other AI training cards, such as Tensorflow.
The Ascend 910 AI processors are protected by the HUAWEI Trademark Policy, but CodeGeeX uses the Apache License 2.0 license to protect its copyright. The Apache license is a free and open source software (FOSS) licensing agreement from the Apache Software Foundation.
In terms of performance and ease of use, CodeGeeX is on par with GitHub Copilot. It even has a few unique features that make it a fantastic alternative, and we’ll look at them below.
CodeGeeX code generation tool
The CodeGeeX code generation tool is one of the most incredible things to happen to developers this year. It allows users to generate blocks of code by just inputting what they want as comments. CodeGeeX reads the comments and then generates the code users want, line by line.
CodeGeeX’s generated code is able to be edited, so if you have specific modifications, you can directly edit it. The code generation tool also has a Candidate feature that allows it to generate multiple versions of the same line of code, and then you can choose which one you like: