Views
No views yet
GLM-4.5V model, part of the GLM-V series.
GLM-4.5 language model.

2025/08/11: We released GLM-4.5V with significant improvements across multiple benchmarks. We also open-sourced our handcrafted desktop assistant app for debugging. Once connected to GLM-4.5V, it can capture visual information from your PC screen via screenshots or screen recordings. Feel free to try it out or customize it into your own multimodal assistant. Click here to download the installer or build from source!2025/07/16: We have open-sourced the VLM Reward System used to train GLM-4.1V-Thinking. View the code repository and run locally: python examples/reward_system_demo.py.2025/07/01: We released GLM-4.1V-9B-Thinking and its technical report.SGLang and transformers:1pip install transformers>=4.57.1
2pip install sglang>=0.5.3vLLM:pip install vllm>=0.10.21from transformers import AutoProcessor, Glm4vMoeForConditionalGeneration
2import torch
3
4MODEL_PATH = "zai-org/GLM-4.5V"
5messages = [
6 {
7 "role": "user",
8 "content": [
9 {
10 "type": "image",
11 "url": "https://upload.wikimedia.org/wikipedia/commons/f/fa/Grayscale_8bits_palette_sample_image.png"
12 },
13 {
14 "type": "text",
15 "text": "describe this image"
16 }
17 ],
18 }
19]
20processor = AutoProcessor.from_pretrained(MODEL_PATH)
21model = Glm4vMoeForConditionalGeneration.from_pretrained(
22 pretrained_model_name_or_path=MODEL_PATH,
23 torch_dtype="auto",
24 device_map="auto",
25)
26inputs = processor.apply_chat_template(
27 messages,
28 tokenize=True,
29 add_generation_prompt=True,
30 return_dict=True,
31 return_tensors="pt"
32).to(model.device)
33inputs.pop("token_type_ids", None)
34generated_ids = model.generate(**inputs, max_new_tokens=8192)
35output_text = processor.decode(generated_ids[0][inputs["input_ids"].shape[1]:], skip_special_tokens=False)
36print(output_text)<|begin_of_box|> and <|end_of_box|> in the response mark the answer’s bounding box in the image. The bounding box is given as four numbers — for example [x1, y1, x2, y2], where (x1, y1) is the top-left corner and (x2, y2)` is the bottom-right corner. The bracket style may vary ([], [[]], (), <>, etc.), but the meaning is the same: it encloses the coordinates of the box. These coordinates are relative values between 0 and 1000, normalized to the image size.
- Help me to locate
in the image and give me its bounding boxes. - Please pinpoint the bounding box [[x1,y1,x2,y2], …] in the image as per the given description.
<expr> is the description of the target object. The output bounding box is a quadruple $$[x_1,y_1,x_2,y_2]$$ composed of the coordinates of the top-left and bottom-right corners, where each value is normalized by the image width (for x) or height (for y) and scaled by 1000.<|begin_of_box|> and <|end_of_box|> are used to mark the image bounding box in the answer. The bracket style may vary ([], [[]], (), <>, etc.), but the meaning is the same: to enclose the coordinates of the box.examples/gui-agent: Demonstrates prompt construction and output handling for GUI Agents, including strategies for mobile, PC, and web. Prompt templates differ between GLM-4.1V and GLM-4.5V.examples/vlm-helper: A desktop assistant for GLM multimodal models (mainly GLM-4.5V, compatible with GLM-4.1V), supporting text, images, videos, PDFs, PPTs, and more. Connects to the GLM multimodal API for intelligent services across scenarios. Download the installer or build from source.1vllm serve zai-org/GLM-4.5V \
2 --tensor-parallel-size 4 \
3 --tool-call-parser glm45 \
4 --reasoning-parser glm45 \
5 --enable-auto-tool-choice \
6 --served-model-name glm-4.5v \
7 --allowed-local-media-path / \
8 --media-io-kwargs '{"video": {"num_frames": -1}}'1python3 -m sglang.launch_server --model-path zai-org/GLM-4.5V \
2 --tp-size 4 \
3 --tool-call-parser glm45 \
4 --reasoning-parser glm45 \
5 --served-model-name glm-4.5v \
6 --port 8000 \
7 --host 0.0.0.0FA3 attention backend in SGLang for higher inference performance and lower memory usage:
--attention-backend fa3 --mm-attention-backend fa3 --enable-torch-compile
Without FA3, large video inference may cause out-of-memory (OOM) errors.
We also recommend increasing SGLANG_VLM_CACHE_SIZE_MB (e.g., 1024) to provide sufficient cache space for video understanding.vLLM and SGLang, thinking mode is enabled by default. To disable the thinking switch, add:
extra_body={"chat_template_kwargs": {"enable_thinking": False}}finetune.json in the following format, This is an example for fine-tuning GLM-4.1V-9B.1[
2 {
3 "messages": [
4 {
5 "content": "<image>Who are they?",
6 "role": "user"
7 },
8 {
9 "content": "<think>
10User asked me to observe the image and find the answer. I know they are Kane and Goretzka from Bayern Munich.</think>
11<answer>They're Kane and Goretzka from Bayern Munich.</answer>",
12 "role": "assistant"
13 },
14 {
15 "content": "<image>What are they doing?",
16 "role": "user"
17 },
18 {
19 "content": "<think>
20I need to observe what these people are doing. Oh, they are celebrating on the soccer field.</think>
21<answer>They are celebrating on the soccer field.</answer>",
22 "role": "assistant"
23 }
24 ],
25 "images": [
26 "mllm_demo_data/1.jpg",
27 "mllm_demo_data/2.jpg"
28 ]
29 }
30]<think> ... </think> will not be stored as conversation history or in fine-tuning data.<image> tag will be replaced with the corresponding image information.1@misc{vteam2025glm45vglm41vthinkingversatilemultimodal,
2 title={GLM-4.5V and GLM-4.1V-Thinking: Towards Versatile Multimodal Reasoning with Scalable Reinforcement Learning},
3 author={V Team and Wenyi Hong and Wenmeng Yu and Xiaotao Gu and Guo Wang and Guobing Gan and Haomiao Tang and Jiale Cheng and Ji Qi and Junhui Ji and Lihang Pan and Shuaiqi Duan and Weihan Wang and Yan Wang and Yean Cheng and Zehai He and Zhe Su and Zhen Yang and Ziyang Pan and Aohan Zeng and Baoxu Wang and Bin Chen and Boyan Shi and Changyu Pang and Chenhui Zhang and Da Yin and Fan Yang and Guoqing Chen and Jiazheng Xu and Jiale Zhu and Jiali Chen and Jing Chen and Jinhao Chen and Jinghao Lin and Jinjiang Wang and Junjie Chen and Leqi Lei and Letian Gong and Leyi Pan and Mingdao Liu and Mingde Xu and Mingzhi Zhang and Qinkai Zheng and Sheng Yang and Shi Zhong and Shiyu Huang and Shuyuan Zhao and Siyan Xue and Shangqin Tu and Shengbiao Meng and Tianshu Zhang and Tianwei Luo and Tianxiang Hao and Tianyu Tong and Wenkai Li and Wei Jia and Xiao Liu and Xiaohan Zhang and Xin Lyu and Xinyue Fan and Xuancheng Huang and Yanling Wang and Yadong Xue and Yanfeng Wang and Yanzi Wang and Yifan An and Yifan Du and Yiming Shi and Yiheng Huang and Yilin Niu and Yuan Wang and Yuanchang Yue and Yuchen Li and Yutao Zhang and Yuting Wang and Yu Wang and Yuxuan Zhang and Zhao Xue and Zhenyu Hou and Zhengxiao Du and Zihan Wang and Peng Zhang and Debing Liu and Bin Xu and Juanzi Li and Minlie Huang and Yuxiao Dong and Jie Tang},
4 year={2025},
5 eprint={2507.01006},
6 archivePrefix={arXiv},
7 primaryClass={cs.CV},
8 url={https://arxiv.org/abs/2507.01006},
9}