Skip to main content

1. Model Introduction

GLM-4.5V is a state-of-the-art multimodal vision-language model from ZhipuAI, built on the next-generation flagship text foundation model GLM-4.5-Air (106B parameters, 12B active). It achieves SOTA performance among models of the same scale across 42 public vision-language benchmarks. Through efficient hybrid training, GLM-4.5V focuses on real-world usability and enables full-spectrum vision reasoning across diverse visual content types. Hardware Support: NVIDIA B200/H100/H200, AMD MI300X/MI325X/MI355X GLM-4.5V introduces several key features:
  • Image Reasoning & Grounding Scene understanding, complex multi-image analysis, and spatial recognition with precise visual element localization. Supports bounding box predictions with normalized coordinates (0-1000) for accurate object detection.
  • Video Understanding Long video segmentation and event recognition, supporting comprehensive temporal analysis across extended video sequences.
  • GUI Agent Tasks Screen reading, icon recognition, and desktop operation assistance for agent-based applications. Enables natural interaction with graphical user interfaces.
  • Complex Chart & Long Document Parsing Research report analysis and information extraction from documents with text, charts, tables, and figures. Processes up to 64K tokens of multimodal context.
  • Thinking Mode Switch Allows users to balance between quick responses and deep reasoning. Users can enable/disable Chain-of-Thought reasoning based on task requirements for improved accuracy and interpretability.

2. SGLang Installation

SGLang offers multiple installation methods. You can choose the most suitable installation method based on your hardware platform and requirements. Please refer to the official SGLang installation guide for installation instructions.

3. Model Deployment

This section provides deployment configurations optimized for different hardware platforms and use cases.

3.1 Basic Configuration

The GLM-4.5V offers models in various sizes and architectures, optimized for different hardware platforms. The recommended launch configurations vary by hardware and model size. Interactive Command Generator: Use the interactive configuration generator below to customize your deployment settings. Select your hardware platform, model size, quantization method, and other options to generate the appropriate launch command.

3.2 Configuration Tips

  • TTFT Optimization : Set SGLANG_USE_CUDA_IPC_TRANSPORT=1 to use CUDA IPC for transferring multimodal features, which significantly improves TTFT. This consumes additional memory and may require adjusting --mem-fraction-static and/or --max-running-requests. (additional memory is proportional to image size * number of images in current running requests.)
  • TP=8 Configuration: When using Tensor Parallelism (TP) of 8, the vision attention’s 12 heads cannot be evenly divided. You can resolve this by adding --mm-enable-dp-encoder.
  • Fast Model Loading: For large models (like the 106B version), you can speed up model loading by using --model-loader-extra-config='{"enable_multithread_load": "true","num_threads": 64}'.
  • Hardware Notes:
    • H100 (FP8): Use the FP8 checkpoint for best memory efficiency.
    • A100 / H100 (BF16): Use standard multimodal parameters to manage throughput and GPU memory usage.
    • H200 / B200: Runs out of the box, supporting full context length plus concurrent image + video processing.
  • Additional Multimodal Parameters:
    • --mm-attention-backend fa3: Specify multimodal attention backend (Flash Attention 3).
    • --keep-mm-feature-on-device: Retain multimodal feature tensors on GPU after processing to avoid D2H memory copies.
    • SGLANG_USE_CUDA_IPC_TRANSPORT=1: Use CUDA IPC shared memory for multimodal data transport to significantly improve E2E latency.
Example with full multimodal optimizations:
Command

4. Model Invocation

4.1 Basic Usage

For basic API usage and request examples, please refer to:

4.2 Advanced Usage

4.2.1 Multi-Modal Inputs

GLM-4.5V supports both image and video inputs. Here’s a basic example with image input:
Example
Example Output:
Output
Multi-Image Input Example: GLM-4.5V can process multiple images in a single request for comparison or analysis:
Example
Example Output:
Output
Video Input Example: GLM-4.5V supports video understanding by processing video URLs:
Example
Note:
  • For video processing, ensure you have sufficient context length configured (up to 64K tokens)
  • Video processing may require more memory; adjust --mem-fraction-static accordingly
  • You can also provide local file paths using file:// protocol
Example Output:
Output

4.2.2 Thinking Mode

GLM-4.5V supports thinking mode for enhanced reasoning. Enable thinking mode during deployment:
Command
Streaming with Thinking Process:
Example
Note: The reasoning parser captures the model’s step-by-step thinking process, allowing you to see how the model arrives at its conclusions. Disable Thinking Mode: To disable thinking mode for a specific request:
Example

4.2.3 Tool Calling

GLM-4.5V supports tool calling capabilities. Enable the tool call parser:
Command
Python Example (with Thinking Process):
Example
Output Example:
Output
Note:
  • The reasoning parser shows how the model decides to use a tool
  • Tool calls are clearly marked with the function name and arguments
  • You can then execute the function and send the result back to continue the conversation
Handling Tool Call Results:
Example

4.2.4 Thinking Budget

Beyond enabling/disabling the full reasoning mode (section 4.2.2), you can cap the number of thinking tokens using CustomLogitProcessor. Launch with --enable-custom-logit-processor and pass Glm4MoeThinkingBudgetLogitProcessor in the request:
Example

5. Benchmark

5.1 Accuracy Benchmark

Document model accuracy on standard benchmarks:

5.1.1 MMMU Benchmark

  • Benchmark Command
Command
  • Test Result
Output