Run this model with HF Jobs
Run zai-org/GLM-5 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/zai-org/GLM-5. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/zai-org/GLM-5 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/zai-org/GLM-5. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/zai-org/GLM-5. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use zai-org/GLM-5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/GLM-5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zai-org/GLM-5") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zai-org/GLM-5") model = AutoModelForCausalLM.from_pretrained("zai-org/GLM-5", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zai-org/GLM-5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zai-org/GLM-5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zai-org/GLM-5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zai-org/GLM-5
- SGLang
How to use zai-org/GLM-5 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "zai-org/GLM-5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zai-org/GLM-5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "zai-org/GLM-5" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zai-org/GLM-5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zai-org/GLM-5 with Docker Model Runner:
docker model run hf.co/zai-org/GLM-5
fine-tune
#52
by m-hasnain-sabqi - opened
Files changed (9)
- .eval_results/MathArena--aime_2026.yamlDeleted-8
- .eval_results/MathArena--hmmt_feb_2026.yamlDeleted-8
- .eval_results/swe-bench_multilingual.yamlDeleted-8
- .eval_results/swe_bench_verified.yamlDeleted-19
- .eval_results/terminal_bench.yamlDeleted-11
- .eval_results/terminal_bench_2.yamlDeleted-10
- .eval_results/yc-bench.yamlDeleted-9
- README.md+37-32
- chat_template.jinja+2-2
12345678- dataset: id: MathArena/aime_2026 task_id: MathArena/aime_2026 value: 95.83 date: '2026-02-18' source: url: https://matharena.ai/?comp=aime--aime_2026 name: Official MathArena Evaluation12345678- dataset: id: MathArena/hmmt_feb_2026 task_id: MathArena/hmmt_feb_2026 value: 86.36 date: '2026-02-23' source: url: https://matharena.ai/?comp=hmmt--hmmt_feb_2026 name: Official MathArena Evaluation12345678- dataset: id: SWE-bench/SWE-bench_Multilingual task_id: swe_bench_multilingual_%_resolved value: 73.3 source: url: https://huggingface.co/zai-org/GLM-5 name: Model Card
12345678910111213141516171819- dataset: id: SWE-bench/SWE-bench_Verified task_id: swe_bench_%_resolved value: 72.80 source: url: https://www.swebench.com/ name: SWE-Bench official evaluation user: nielsr notes: high reasoning, official
- dataset: id: SWE-bench/SWE-bench_Verified task_id: swe_bench_%_resolved value: 77.8 source: url: https://huggingface.co/zai-org/GLM-5/ name: Model card user: nielsr notes: Z.ai reported number1234567891011- dataset: id: harborframework/terminal-bench-2.0 task_id: terminal_bench value: 52.4 date: '2026-02-23' source: url: https://www.tbench.ai/leaderboard/terminal-bench/2.0 name: Terminal-Bench Leaderboard user: burtenshaw notes: "agent: Terminus 2"
12345678910- dataset: id: harborframework/terminal-bench-2.0 task_id: terminalbench_2 value: 52.4 date: '2026-02-23' source: url: https://www.tbench.ai/leaderboard/terminal-bench/2.0 name: Terminal-Bench Leaderboard user: SaylorTwift notes: "agent: Terminus 2"123456789- dataset: id: collinear-ai/yc-bench task_id: medium value: 1208190 date: "2026-03-24" source: url: https://github.com/collinear-ai/yc-bench name: "YC-Bench eval" notes: "avg final funds (USD) across seeds 1,2,3. GLM-5 (via OpenRouter z-ai/glm-5)"123456714 unmodified lines222324252627282930313245 unmodified lines787980818283848586878889909192939495969798991001011021031041051 unmodified line1071081091101111121131142 unmodified lines1171181191201211221238 unmodified lines132133134135136137138139140141142143144145146147---language:- en- zhlibrary_name: transformerslicense: mitpipeline_tag: text-generation14 unmodified lines👉 One click to <a href="https://chat.z.ai">GLM-5</a>.</p><p align="center">[<a href="https://huggingface.co/papers/2602.15763" target="_blank">Paper</a>][<a href="https://github.com/zai-org/GLM-5" target="_blank">GitHub</a>]</p>## IntroductionWe are launching GLM-5, targeting complex systems engineering and long-horizon agentic tasks. Scaling is still one of the most important ways to improve the intelligence efficiency of Artificial General Intelligence (AGI). Compared to GLM-4.5, GLM-5 scales from 355B parameters (32B active) to 744B parameters (40B active), and increases pre-training data from 23T to 28.5T tokens. GLM-5 also integrates DeepSeek Sparse Attention (DSA), largely reducing deployment cost while preserving long-context capacity.45 unmodified lines### Prepare environmentThe following open-source frameworks support local deployment of GLM-5:- [vLLM](https://github.com/vllm-project/vllm) (v0.19.0+)- [SGLang](https://github.com/sgl-project/sglang) (v0.5.10+)- [KTransformers](https://github.com/kvcache-ai/ktransformers) (v0.5.3+)- [Transformers](https://github.com/huggingface/transformers) (v0.5.4+)- [xLLM](https://github.com/jd-opensource/xllm) (v0.8.0+)### Deploy+ vLLM```shellvllm serve zai-org/GLM-5 \--tensor-parallel-size 8 \--gpu-memory-utilization 0.85 \--speculative-config.method mtp \--speculative-config.num_speculative_tokens 3 \--tool-call-parser glm47 \--reasoning-parser glm45 \--enable-auto-tool-choice \--served-model-name glm-5```Check the [recipes](https://github.com/vllm-project/recipes/blob/main/GLM/GLM5.md) for more details.1 unmodified line+ SGLang```shellsglang serve \--model-path zai-org/GLM-5 \--tp-size 8 \--tool-call-parser glm47 \--reasoning-parser glm45 \2 unmodified lines--speculative-eagle-topk 1 \--speculative-num-draft-tokens 4 \--mem-fraction-static 0.85 \--served-model-name glm-5```Check the [sglang cookbook](https://cookbook.sglang.io/autoregressive/GLM/GLM-5) for more details.8 unmodified lines## CitationIf you find GLM-5 useful in your research, please cite our technical report:```bibtex@misc{glm5team2026glm5vibecodingagentic,title={GLM-5: from Vibe Coding to Agentic Engineering},author={GLM-5-Team and : and Aohan Zeng and Xin Lv and Zhenyu Hou and Zhengxiao Du and Qinkai Zheng and Bin Chen and Da Yin and Chendi Ge and Chenghua Huang and Chengxing Xie and Chenzheng Zhu and Congfeng Yin and Cunxiang Wang and Gengzheng Pan and Hao Zeng and Haoke Zhang and Haoran Wang and Huilong Chen and Jiajie Zhang and Jian Jiao and Jiaqi Guo and Jingsen Wang and Jingzhao Du and Jinzhu Wu and Kedong Wang and Lei Li and Lin Fan and Lucen Zhong and Mingdao Liu and Mingming Zhao and Pengfan Du and Qian Dong and Rui Lu and Shuang-Li and Shulin Cao and Song Liu and Ting Jiang and Xiaodong Chen and Xiaohan Zhang and Xuancheng Huang and Xuezhen Dong and Yabo Xu and Yao Wei and Yifan An and Yilin Niu and Yitong Zhu and Yuanhao Wen and Yukuo Cen and Yushi Bai and Zhongpei Qiao and Zihan Wang and Zikang Wang and Zilin Zhu and Ziqiang Liu and Zixuan Li and Bojie Wang and Bosi Wen and Can Huang and Changpeng Cai and Chao Yu and Chen Li and Chengwei Hu and Chenhui Zhang and Dan Zhang and Daoyan Lin and Dayong Yang and Di Wang and Ding Ai and Erle Zhu and Fangzhou Yi and Feiyu Chen and Guohong Wen and Hailong Sun and Haisha Zhao and Haiyi Hu and Hanchen Zhang and Hanrui Liu and Hanyu Zhang and Hao Peng and Hao Tai and Haobo Zhang and He Liu and Hongwei Wang and Hongxi Yan and Hongyu Ge and Huan Liu and Huanpeng Chu and Jia'ni Zhao and Jiachen Wang and Jiajing Zhao and Jiamin Ren and Jiapeng Wang and Jiaxin Zhang and Jiayi Gui and Jiayue Zhao and Jijie Li and Jing An and Jing Li and Jingwei Yuan and Jinhua Du and Jinxin Liu and Junkai Zhi and Junwen Duan and Kaiyue Zhou and Kangjian Wei and Ke Wang and Keyun Luo and Laiqiang Zhang and Leigang Sha and Liang Xu and Lindong Wu and Lintao Ding and Lu Chen and Minghao Li and Nianyi Lin and Pan Ta and Qiang Zou and Rongjun Song and Ruiqi Yang and Shangqing Tu and Shangtong Yang and Shaoxiang Wu and Shengyan Zhang and Shijie Li and Shuang Li and Shuyi Fan and Wei Qin and Wei Tian and Weining Zhang and Wenbo Yu and Wenjie Liang and Xiang Kuang and Xiangmeng Cheng and Xiangyang Li and Xiaoquan Yan and Xiaowei Hu and Xiaoying Ling and Xing Fan and Xingye Xia and Xinyuan Zhang and Xinze Zhang and Xirui Pan and Xu Zou and Xunkai Zhang and Yadi Liu and Yandong Wu and Yanfu Li and Yidong Wang and Yifan Zhu and Yijun Tan and Yilin Zhou and Yiming Pan and Ying Zhang and Yinpei Su and Yipeng Geng and Yong Yan and Yonglin Tan and Yuean Bi and Yuhan Shen and Yuhao Yang and Yujiang Li and Yunan Liu and Yunqing Wang and Yuntao Li and Yurong Wu and Yutao Zhang and Yuxi Duan and Yuxuan Zhang and Zezhen Liu and Zhengtao Jiang and Zhenhe Yan and Zheyu Zhang and Zhixiang Wei and Zhuo Chen and Zhuoer Feng and Zijun Yao and Ziwei Chai and Ziyuan Wang and Zuzhou Zhang and Bin Xu and Minlie Huang and Hongning Wang and Juanzi Li and Yuxiao Dong and Jie Tang},year={2026},eprint={2602.15763},archivePrefix={arXiv},primaryClass={cs.LG},url={https://arxiv.org/abs/2602.15763},}```123456714 unmodified lines22232425262745 unmodified lines7374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221 unmodified line1241251261271281291301312 unmodified lines1341351361371381391408 unmodified lines149150151152---language:- en- zhlibrary_name: transformerslicense: mitpipeline_tag: text-generation14 unmodified lines👉 One click to <a href="https://chat.z.ai">GLM-5</a>.</p>## IntroductionWe are launching GLM-5, targeting complex systems engineering and long-horizon agentic tasks. Scaling is still one of the most important ways to improve the intelligence efficiency of Artificial General Intelligence (AGI). Compared to GLM-4.5, GLM-5 scales from 355B parameters (32B active) to 744B parameters (40B active), and increases pre-training data from 23T to 28.5T tokens. GLM-5 also integrates DeepSeek Sparse Attention (DSA), largely reducing deployment cost while preserving long-context capacity.45 unmodified lines### Prepare environmentvLLM, SGLang, KTransformers, and xLLM all support local deployment of GLM-5. A simple deployment guide is provided here.+ vLLMUsing Docker as:```shelldocker pull vllm/vllm-openai:nightly```or using pip:```shellpip install -U vllm --pre --index-url https://pypi.org/simple --extra-index-url https://wheels.vllm.ai/nightly```then upgrade transformers:```pip install git+https://github.com/huggingface/transformers.git```+ SGLangUsing Docker as:```bashdocker pull lmsysorg/sglang:glm5-hopper # For Hopper GPUdocker pull lmsysorg/sglang:glm5-blackwell # For Blackwell GPU```### Deploy+ vLLM```shellvllm serve zai-org/GLM-5-FP8 \--tensor-parallel-size 8 \--gpu-memory-utilization 0.85 \--speculative-config.method mtp \--speculative-config.num_speculative_tokens 1 \--tool-call-parser glm47 \--reasoning-parser glm45 \--enable-auto-tool-choice \--served-model-name glm-5-fp8```Check the [recipes](https://github.com/vllm-project/recipes/blob/main/GLM/GLM5.md) for more details.1 unmodified line+ SGLang```shellpython3 -m sglang.launch_server \--model-path zai-org/GLM-5-FP8 \--tp-size 8 \--tool-call-parser glm47 \--reasoning-parser glm45 \2 unmodified lines--speculative-eagle-topk 1 \--speculative-num-draft-tokens 4 \--mem-fraction-static 0.85 \--served-model-name glm-5-fp8```Check the [sglang cookbook](https://cookbook.sglang.io/autoregressive/GLM/GLM-5) for more details.8 unmodified lines## CitationOur technical report is coming soon.
31 unmodified lines3233343536373839404131 unmodified lines{%- set ns = namespace(last_user_index=-1) %}{%- for m in messages %}{%- if m.role == 'user' %}{%- set ns.last_user_index = loop.index0 -%}{%- endif %}{%- endfor %}{%- for m in messages -%}{%- if m.role == 'user' -%}<|user|>{{ visible_text(m.content) }}{%- elif m.role == 'assistant' -%}<|assistant|>31 unmodified lines3233343536373839404131 unmodified lines{%- set ns = namespace(last_user_index=-1) %}{%- for m in messages %}{%- if m.role == 'user' %}{% set ns.last_user_index = loop.index0 -%}{%- endif %}{%- endfor %}{% for m in messages %}{%- if m.role == 'user' -%}<|user|>{{ visible_text(m.content) }}{%- elif m.role == 'assistant' -%}<|assistant|>
.eval_results/MathArena--aime_2026.yamlDeleted-8
.eval_results/MathArena--hmmt_feb_2026.yamlDeleted-8
.eval_results/swe-bench_multilingual.yamlDeleted-8
.eval_results/swe_bench_verified.yamlDeleted-19
.eval_results/terminal_bench.yamlDeleted-11
.eval_results/terminal_bench_2.yamlDeleted-10
.eval_results/yc-bench.yamlDeleted-9
README.md+37-32
chat_template.jinja+2-2