zai-org / codegeex4-all-9b

huggingface.co
Total runs: 6.8K
24-hour runs: 0
7-day runs: 153
30-day runs: -1.9K
Model's Last Updated: July 18 2024
text-generation

Introduction of codegeex4-all-9b

Model Details of codegeex4-all-9b

CodeGeeX4: Open Multilingual Code Generation Model

CodeGeeX4

中文

GitHub

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.

Get Started

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

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained("THUDM/codegeex4-all-9b", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    "THUDM/codegeex4-all-9b",
    torch_dtype=torch.bfloat16,
    low_cpu_mem_usage=True,
    trust_remote_code=True
).to(device).eval()
inputs = tokenizer.apply_chat_template([{"role": "user", "content": "write a quick sort"}], add_generation_prompt=True, tokenize=True, return_tensors="pt", return_dict=True ).to(device)
with torch.no_grad():
    outputs = model.generate(**inputs, max_length=256)
    outputs = outputs[:, inputs['input_ids'].shape[1]:]
    print(tokenizer.decode(outputs[0], skip_special_tokens=True))

If you want to build the chat prompt manually, please make sure it follows the following format:

f"<|system|>\n{system_prompt}\n<|user|>\n{prompt}\n<|assistant|>\n"

Default system_prompt:

你是一位智能编程助手,你叫CodeGeeX。你会为用户回答关于编程、代码、计算机方面的任何问题,并提供格式规范、可以执行、准确安全的代码,并在必要时提供详细的解释。

The English version:

You are an intelligent programming assistant named CodeGeeX. You will answer any questions users have about programming, coding, and computers, and provide code that is formatted correctly.

For infilling ability, please use (without system prompt):

f"<|user|>\n<|code_suffix|>{suffix}<|code_prefix|>{prefix}<|code_middle|><|assistant|>\n"

Additional infos (like file path, programming language, mode) can be added. Example:

<|user|>
###PATH:src/example.py
###LANGUAGE:Python
###MODE:BLOCK
<|code_suffix|>{suffix}<|code_prefix|>{prefix}<|code_middle|><|assistant|>
Evaluation
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
License

The model weights are licensed under the following License .

Citation

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

@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}
}

Runs of zai-org codegeex4-all-9b on huggingface.co

6.8K
Total runs
0
24-hour runs
359
3-day runs
153
7-day runs
-1.9K
30-day runs

More Information About codegeex4-all-9b huggingface.co Model

More codegeex4-all-9b license Visit here:

https://choosealicense.com/licenses/codegeex4

codegeex4-all-9b huggingface.co

codegeex4-all-9b huggingface.co is an AI model on huggingface.co that provides codegeex4-all-9b's model effect (), which can be used instantly with this zai-org codegeex4-all-9b model. huggingface.co supports a free trial of the codegeex4-all-9b model, and also provides paid use of the codegeex4-all-9b. Support call codegeex4-all-9b model through api, including Node.js, Python, http.

codegeex4-all-9b huggingface.co Url

https://huggingface.co/zai-org/codegeex4-all-9b

zai-org codegeex4-all-9b online free

codegeex4-all-9b huggingface.co is an online trial and call api platform, which integrates codegeex4-all-9b's modeling effects, including api services, and provides a free online trial of codegeex4-all-9b, you can try codegeex4-all-9b online for free by clicking the link below.

zai-org codegeex4-all-9b online free url in huggingface.co:

https://huggingface.co/zai-org/codegeex4-all-9b

codegeex4-all-9b install

codegeex4-all-9b is an open source model from GitHub that offers a free installation service, and any user can find codegeex4-all-9b on GitHub to install. At the same time, huggingface.co provides the effect of codegeex4-all-9b install, users can directly use codegeex4-all-9b installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

codegeex4-all-9b install url in huggingface.co:

https://huggingface.co/zai-org/codegeex4-all-9b

Url of codegeex4-all-9b

codegeex4-all-9b huggingface.co Url

Provider of codegeex4-all-9b huggingface.co

zai-org
ORGANIZATIONS

Other API from zai-org

huggingface.co

Total runs: 8.0M
Run Growth: 4.2M
Growth Rate: 52.16%
Updated:April 14 2026
huggingface.co

Total runs: 1.3M
Run Growth: -2.9M
Growth Rate: -228.14%
Updated:April 05 2026
huggingface.co

Total runs: 658.2K
Run Growth: -777.3K
Growth Rate: -117.33%
Updated:January 29 2026
huggingface.co

Total runs: 648.7K
Run Growth: 600.0K
Growth Rate: 98.87%
Updated:April 16 2026
huggingface.co

Total runs: 442.5K
Run Growth: 230.6K
Growth Rate: 52.13%
Updated:April 05 2026
huggingface.co

Total runs: 426.5K
Run Growth: 284.7K
Growth Rate: 65.76%
Updated:March 13 2025
huggingface.co

Total runs: 414.6K
Run Growth: -30.2K
Growth Rate: -7.25%
Updated:August 04 2024
huggingface.co

Total runs: 395.1K
Run Growth: -3.5K
Growth Rate: -0.89%
Updated:August 11 2025
huggingface.co

Total runs: 256.5K
Run Growth: 236.2K
Growth Rate: 99.45%
Updated:April 16 2026
huggingface.co

Total runs: 254.4K
Run Growth: 172.7K
Growth Rate: 72.59%
Updated:December 23 2025
huggingface.co

Total runs: 89.8K
Run Growth: -57.8K
Growth Rate: -64.94%
Updated:January 29 2026
huggingface.co

Total runs: 86.7K
Run Growth: 17.2K
Growth Rate: 20.76%
Updated:August 11 2025
huggingface.co

Total runs: 76.0K
Run Growth: 18.0K
Growth Rate: 23.70%
Updated:December 05 2024
huggingface.co

Total runs: 69.5K
Run Growth: 6.1K
Growth Rate: 9.11%
Updated:March 03 2025
huggingface.co

Total runs: 61.8K
Run Growth: 12.0K
Growth Rate: 20.49%
Updated:October 25 2025
huggingface.co

Total runs: 35.7K
Run Growth: 5.9K
Growth Rate: 16.28%
Updated:November 23 2024
huggingface.co

Total runs: 33.3K
Run Growth: 10.6K
Growth Rate: 32.05%
Updated:September 30 2025
huggingface.co

Total runs: 23.8K
Run Growth: 10.1K
Growth Rate: 36.85%
Updated:November 23 2024
huggingface.co

Total runs: 20.8K
Run Growth: 2.7K
Growth Rate: 13.35%
Updated:April 14 2025
huggingface.co

Total runs: 18.0K
Run Growth: 7.9K
Growth Rate: 42.28%
Updated:October 16 2025
huggingface.co

Total runs: 16.5K
Run Growth: -10.3K
Growth Rate: -64.29%
Updated:October 25 2024
huggingface.co

Total runs: 10.5K
Run Growth: 1.5K
Growth Rate: 15.01%
Updated:April 22 2025
huggingface.co

Total runs: 7.5K
Run Growth: 3.7K
Growth Rate: 49.76%
Updated:August 04 2024
huggingface.co

Total runs: 6.3K
Run Growth: 2.3K
Growth Rate: 35.75%
Updated:December 09 2025
huggingface.co

Total runs: 6.1K
Run Growth: -121.2K
Growth Rate: -2006.59%
Updated:December 09 2025
huggingface.co

Total runs: 3.6K
Run Growth: -2.5K
Growth Rate: -66.51%
Updated:January 15 2026
huggingface.co

Total runs: 3.3K
Run Growth: 722
Growth Rate: 23.06%
Updated:March 11 2025
huggingface.co

Total runs: 3.2K
Run Growth: -7.3K
Growth Rate: -344.64%
Updated:October 25 2025
huggingface.co

Total runs: 2.1K
Run Growth: 875
Growth Rate: 39.13%
Updated:January 27 2025
huggingface.co

Total runs: 1.9K
Run Growth: 909
Growth Rate: 46.10%
Updated:January 13 2026
huggingface.co

Total runs: 1.6K
Run Growth: -1.3K
Growth Rate: -91.49%
Updated:October 25 2025
huggingface.co

Total runs: 1.1K
Run Growth: -4.6K
Growth Rate: -454.22%
Updated:January 02 2025
huggingface.co

Total runs: 1.1K
Run Growth: 32
Growth Rate: 3.05%
Updated:August 12 2025
huggingface.co

Total runs: 902
Run Growth: 842
Growth Rate: 96.45%
Updated:November 20 2023
huggingface.co

Total runs: 438
Run Growth: 244
Growth Rate: 81.33%
Updated:August 11 2025
huggingface.co

Total runs: 345
Run Growth: 76
Growth Rate: 19.39%
Updated:October 20 2023
huggingface.co

Total runs: 259
Run Growth: -15
Growth Rate: -5.62%
Updated:March 02 2023
huggingface.co

Total runs: 194
Run Growth: -22
Growth Rate: -11.34%
Updated:August 04 2024
huggingface.co

Total runs: 189
Run Growth: -130
Growth Rate: -70.65%
Updated:December 10 2024
huggingface.co

Total runs: 171
Run Growth: 26
Growth Rate: 15.38%
Updated:October 20 2023
huggingface.co

Total runs: 114
Run Growth: -38
Growth Rate: -33.33%
Updated:November 12 2025
huggingface.co

Total runs: 79
Run Growth: 1
Growth Rate: 1.27%
Updated:July 09 2025
huggingface.co

Total runs: 65
Run Growth: 0
Growth Rate: 0.00%
Updated:July 09 2025