百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

CodeGeeX4

> 编程语言
开源

CodeGeeX4-ALL-9B,一个适用于所有AI软件开发场景的多功能模型,包括代码补全、代码解释器、网络搜索、函数调用、仓库

2.6K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

CodeGeeX4-ALL-9B,一个适用于所有AI软件开发场景的多功能模型,包括代码补全、代码解释器、网络搜索、函数调用、仓库

Homepage| Extensions VS Code, Jetbrains| HF Repo | HF DEMO

English | 中文 | 日本語

CodeGeeX4: Open Multilingual Code Generation Model

We introduce CodeGeeX4-ALL-9B, the open-source version of the latest CodeGeeX4 model series. It is a multilingual code generation model continually trained on the GLM-4-9B, significantly enhancing its code generation capabilities. Using a single CodeGeeX4-ALL-9B model, it can support comprehensive functions such as code completion and generation, code interpreter, web search, function call, repository-level code Q&A, covering various scenarios of software development. CodeGeeX4-ALL-9B has achieved highly competitive performance on public benchmarks, such as BigCodeBench and NaturalCodeBench. It is currently the most powerful code generation model with less than 10B parameters, even surpassing much larger general-purpose models, achieving the best balance in terms of inference speed and model performance.

Model List

Model Type Seq Length Download
codegeex4-all-9b Chat 128K Huggingface ModelScope WiseModel

Get Started

Ollama

CodeGeeX4 is now available on Ollama! Please install Ollama 0.2 or later and run the following command:

bash
ollama run codegeex4

To connect the local model to our VS Code / Jetbrains extensions, please check Local Mode Guideline.

Huggingface transformers

Use 4.39.0<=transformers<=4.40.2 to quickly launch codegeex4-all-9b:

…

vLLM

Use vllm==0.5.1 to quickly launch codegeex4-all-9b:

…

Set up OpenAI Compatible Server via vllm, detailed please check OpenAI Compatible Server

bash
python -m vllm.entrypoints.openai.api_server \
     --model THUDM/codegeex4-all-9b \
     --trust_remote_code

Rust-candle

Codegeex4 now suport Candle framwork Repo

Cli

Use Rust to launch codegeex4-all-9b:

bash
	cd candle_demo
	cargo build -p codegeex4-cli --release --features cuda # for Cuda
	cargo build -p codegeex4-cli --release # for cpu
	./target/release/codegeex4-cli --sample-len 512

Tutorials

CodeGeeX4-ALL-9B provides three user guides to help users quickly understand and use the model:

  1. System Prompt Guideline: This guide introduces how to use system prompts in CodeGeeX4-ALL-9B, including the VSCode extension official system prompt, customized system prompts, and some tips for maintaining multi-turn dialogue history.

  2. Infilling Guideline: This guide explains the VSCode extension official infilling format, covering general infilling, cross-file infilling, and generating a new file in a repository.

  3. Repository Tasks Guideline: This guide demonstrates how to use repository tasks in CodeGeeX4-ALL-9B, including QA tasks at the repository level and how to trigger the aicommiter capability of CodeGeeX4-ALL-9B to perform deletions, additions, and changes to files at the repository level.

  4. Local Mode Guideline:This guide introduces how to deploy CodeGeeX4-ALL-9B locally and connect it to Visual Studio Code / Jetbrains extensions.

These guides aim to provide a comprehensive understanding and facilitate efficient use of the model.

Evaluation

CodeGeeX4-ALL-9B is ranked as the most powerful model under 10 billion parameters, even surpassing general models several times its size, achieving the best balance between inference performance and model effectiveness.

Model Seq Length HumanEval MBPP NCB LCB HumanEvalFIM CRUXEval-O
Llama3-70B-intruct 8K 77.4 82.3 37.0 27.4 - -
DeepSeek Coder 33B Instruct 16K 81.1 80.4 39.3 29.3 78.2 49.9
Codestral-22B 32K 81.1 78.2 46.0 35.3 91.6 51.3
CodeGeeX4-All-9B 128K 82.3 75.7 40.4 28.5 85.0 47.1

CodeGeeX4-ALL-9B scored 48.9 and 40.4 for the complete and instruct tasks of BigCodeBench, which are the highest scores among models with less than 20 billion parameters.

In CRUXEval, a benchmark for testing code reasoning, understanding, and execution capabilities, CodeGeeX4-ALL-9B presented remarkable results with its COT (chain-of-thought) abilities. From easy code generation tasks in HumanEval and MBPP, to very challenging tasks in NaturalCodeBench, CodeGeeX4-ALL-9B also achieved outstanding performance at its scale. It is currently the only code model that supports Function Call capabilities and even achieves a better execution success rate than GPT-4.

Furthermore, in the "Code Needle In A Haystack" (NIAH) evaluation, the CodeGeeX4-ALL-9B model demonstrated its ability to retrieve code within contexts up to 128K, achieving a 100% retrieval accuracy in all python scripts.

Details of the evaluation results can be found in the Evaluation.

License

The code in this repository is open source under the Apache-2.0 license. The model weights are licensed under the Model License. CodeGeeX4-9B weights are open for academic research. For users who wish to use the models for commercial purposes, please fill in the registration form.

Citation

If you find our work helpful, please feel free to cite the following paper:

bibtex
@inproceedings{zheng2023codegeex,
  title={CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-X},
  author={Qinkai Zheng and Xiao Xia and Xu Zou and Yuxiao Dong and Shan Wang and Yufei Xue and Zihan Wang and Lei Shen and Andi Wang and Yang Li and Teng Su and Zhilin Yang and Jie Tang},
  booktitle={Proceedings of the 29th ACM SIGKDD Conference on Knowledge Discovery and Data Mining},
  pages={5673--5684},
  year={2023}
}

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Python

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言