Skip to main content

Introduction

GLM-5.2 is a large language model in the GLM (General Language Model) series, jointly developed by the KEG Laboratory of Tsinghua University and Zhipu AI. GLM-5.2 adopts the DeepSeek-V3/V3.2 architecture, including DeepSeek Sparse Attention (DSA) and multi-token prediction (MTP), and supports high-throughput inference with SGLang on Ascend NPUs. This document demonstrates the deployment of GLM-5.2 on Ascend NPUs using SGLang, including single-node deployment, multi-node deployment, prefill-decode disaggregation, feature configuration, and performance optimization.
GLM-5.2 currently uses a daily build image because 0Day support was released before the related code was merged into the SGLang main branch. The deployment commands and image tags in this document will be updated to a stable release once the support lands in a stable SGLang release.

Supported features

The values in the Example usage column are for illustration only. Adjust them according to your hardware, deployment mode, and workload. For parameter details, see Feature descriptions; for recommended configurations for each deployment scenario, see Best practices.
For feature compatibility and conflict information between features, see Feature Compatibility.

Prerequisites

Environment

Before following this tutorial, complete the environment setup in the documents below:
  • Ascend NPU Quickstart — the fastest way to get started. It walks you through launching the official container image, starting the SGLang server, and sending a test request. Recommended if you are new to SGLang on Ascend.
  • SGLang Installation with NPU Support — the full installation guide. It covers the component version mapping (CANN, TorchNPU, Triton, kernels, etc.), building from source or from a Dockerfile, and recommended system settings (CPU power scheme, NUMA, swap). Use it when you need to install or customize the environment instead of using the official image.

Model weights

Before downloading model weights, check the model size to reserve enough disk space. For multi-node deployment, download the weights to a shared directory accessible to all nodes.
We recommend deploying the W8A8 variant for reduced resource usage and higher throughput. It (774.08GB) can be deployed on 16 × 64GB of device memory (--tp-size 16), which corresponds to one full A3 node (8 cards, 16 dies) or two A2 nodes.
This is the minimum recommended configuration. For optimized configurations, see Best practices, which may require additional cards or nodes. For the hardware specifications (memory per die, dies per card, and the difference between A2 and A3), see Ascend NPU Reference — Hardware.

Installation

Ensure sufficient disk space before pulling images. The Docker image requires at least 30GB of free space.
The dependencies required for the NPU runtime environment have been integrated into a Docker image and uploaded to the online platform. You can directly pull it.
The GLM-5.2 images below use daily build tags because 0Day support was released before the related code was merged into the main branch. These tags will be switched to stable release images after the support lands in a stable release.
Command
  • If the model weights have already been downloaded to a shared directory, use -v to mount the model path into the container, for example: -v /path/to/models:/models.
  • Replace ${NAME} with your own container name or remove --name to use default name.

Online service deployment

Single-node deployment

Quantized model GLM-5.2-w8a8 can be deployed on one Atlas 800I A3 node. Run the following script to execute online inference.

Multi-node deployment

Quantized model GLM-5.2-w8a8 can be deployed on two Atlas 800I A3 nodes. Modify the IP addresses of the two nodes, then run the same script on both nodes.

Prefill-decode disaggregation deployment

PD disaggregation splits the prefill and decode stages onto separate nodes, reducing interference and improving throughput for high-concurrency scenarios.
Launch the router after the prefill and decode services are ready.

Functional verification

After the service is started, you can invoke the model by sending a prompt:
Expected result: an HTTP 200 response with the generated text containing “Paris”. Once the server prints The server is fired up and ready to roll! in the logs, it is ready to accept requests. For more testing examples (Health Check, Generate, Chat Completions, and port usage guidance), see Testing the Service.

Accuracy evaluation

For accuracy evaluation methods and datasets, see Accuracy Evaluation on Ascend NPU.

Performance

For performance data and benchmark commands, see Performance Testing on Ascend NPU.

Best practices

Best practice configuration reference

GLM-5.2 has no standalone best practice page yet, as 0Day support is still on daily build images and tuning parameters are not finalized. Instead, the Online service deployment section above provides ready-to-use scripts for single-node, multi-node, and PD disaggregation, each embedding the recommended feature combinations and tuning parameters (e.g., DeepEP mode, speculative decoding, overlap schedule). For the full catalog of optimization features and their parameter and compatibility details, see Optimization on Ascend NPU.

Performance tuning

For the full list of supported features, see Supported features. For detailed optimization guidance, see Optimization on Ascend NPU.

FAQ

For common environment, installation, and general parameter issues, please refer to the Ascend NPU FAQ.