vllm-ascend/recipes
~/browse/THUDM

GLM-5

GLM-5 and GLM-5.1 are Mixture-of-Experts (MoE) models from Zhipu AI, targeting complex systems engineering and long-horizon agentic tasks. GLM-5 features 744B total parameters, with support for MTP speculative decoding, expert parallelism, and PD disaggregation on Ascend NPUs.

MoE744B131K ctxtextvLLM 0.17.0rc1Difficulty: advanced

Multi-node deployment on Atlas 800 A3 (128G × 8) with W4A8/W8A8 precision

Added: 2026-07-13·Updated: 2026-07-13·[ edit ]

Preparation

GLM-5 and GLM-5.1 are Mixture-of-Experts (MoE) models from Zhipu AI (THUDM), targeting complex systems engineering and long-horizon agentic tasks. With 744B total parameters.

Deployment Guide

Select NPU type and deployment options to view the corresponding deployment instructions.

Verification

After the service is started, the model can be invoked by sending a prompt.

Chat Completions API:

curl http://localhost:<port>/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{
        "model": "glm-5",
        "messages": [
            {"role": "user", "content": "Give me a short introduction to large language models."}
        ],
        "max_tokens": 256,
        "temperature": 0
    }'
- URL: Replace localhost with your server IP and use the port from the vllm serve command.
- model: Must match the --served-model-name value from the vllm serve command (e.g., glm-5).

Function Calling:

To enable function calling, add the following flags to the vllm serve command:

--tool-call-parser glm47 --reasoning-parser glm45 --enable-auto-tool-choice

Expected result: HTTP 200 with a JSON response containing the choices field with generated text.

More Info

Accuracy

Using AISBench

1. Refer to Using AISBench for details.

2. After execution, you can get the result.

Benchmark

Recommended Configurations

Note: The following configurations are validated in specific test environments and are for reference only. The optimal configuration depends on factors such as maximum input/output length, prefix cache hit rate, precision requirements, and deployment machine ratios.

Table 1: Scenario Overview

ScenarioDeployment Mode*Total NPUsWeight VersionKey Considerations
High ThroughputSingle-Node (A3)16 (A3)W4A8dp1 tp16 with expert parallel for maximum throughput
Low LatencySingle-Node (A3)16 (A3)W4A8dp1 tp16 with expert parallel disabled for lower latency
Long ContextMulti-Node (A3)32 (A3)W4A82 nodes, dp2 tp16 for extended context
PD SeparationMulti-Node (A3)32 (A3)W4A81P1D deployment for production workloads
*Total NPUs indicates the total number of NPU chips used across all nodes.

Table 2: PD Separation Configuration

ScenarioP-node ConfigD-node ConfigMax Model LenMTP Tokens
High Throughputdp=4, tp=8dp=8, tp=4P:133120, D:1500003
Low Latencydp=4, tp=8dp=4, tp=8P:133120, D:1500003

Table 3: GLM-5.1 Feature Matrix (A3, 32-card PD Disaggregation)

ScenarioTopology / ConfigCardsP CardsD CardsSequence LengthPrefix CacheCard TPOTAvg InputAvg Output
High ThroughputPD disaggregation 1P1D3216163.5k/1.5k05035001500
High ThroughputPD disaggregation 1P1D32161616k/1k050163841024
High ThroughputPD disaggregation 1P1D32161664k/1k050655361024
High ThroughputPD disaggregation 1P1D32161664k/1k5050655361024
High ThroughputPD disaggregation 1P1D32161664k/1k9050655361024
High ThroughputPD disaggregation 1P1D321616128k/1k50501310721024
High ThroughputPD disaggregation 1P1D321616128k/1k90501310721024
High ThroughputPD disaggregation 1P1D321616190k/1k50501945601024
High ThroughputPD disaggregation 1P1D321616190k/1k90501945601024
Low LatencyPD disaggregation 1P1D3216163.5k/1.5k02035001500
Low LatencyC8 operator disabled32--3.5k/1.5k020--
Low LatencyNew config32--3.5k/1.5k020--
Low LatencyPD disaggregation 1P1D32161616k/1k020163841024
Low LatencyC8 operator disabled32--16k/1k020--
Low LatencyNew config32--16k/1k020--
Low LatencyPD disaggregation 1P1D32161664k/1k020655361024
Low LatencyPD disaggregation 1P1D32161664k/1k5020655361024
Low LatencyPD disaggregation 1P1D32161664k/1k9020655361024
Low LatencyPD disaggregation 1P1D321616128k/1k50201310721024
Low LatencyPD disaggregation 1P1D321616128k/1k90201310721024
Low LatencyPD disaggregation 1P1D321616190k/1k50201945601024
Low LatencyPD disaggregation 1P1D321616190k/1k90201945601024
Longest SequencePD disaggregation 1P1D321616Longest sequence9920--

Table 4: GLM-5.1 Feature Matrix (A3, 16-card Two-machine Co-location)

ScenarioTopology / ConfigCardsP CardsD CardsSequence LengthPrefix CacheCard TPOTAvg InputAvg Output
High ThroughputTwo-machine co-location, 16 cards16--3.5k/1.5k05035001500
High ThroughputTwo-machine co-location, 16 cards16--16k/1k050163841024
High ThroughputTwo-machine co-location, 16 cards16--64k/1k050655361024
High ThroughputTwo-machine co-location, 16 cards16--64k/1k5050655361024
High ThroughputTwo-machine co-location, 16 cards16--64k/1k9050655361024
High ThroughputTwo-machine co-location, 16 cards16--128k/1k50501310721024
High ThroughputTwo-machine co-location, 16 cards16--128k/1k90501310721024
High ThroughputTwo-machine co-location, 16 cards16--190k/1k5050--
High ThroughputTwo-machine co-location, 16 cards16--190k/1k9050--
Low LatencyTwo-machine co-location, 16 cards16--3.5k/1.5k02035001500
Low LatencyTwo-machine co-location, 16 cards16--16k/1k020--
Low LatencyTwo-machine co-location, 16 cards16--64k/1k020--
Low LatencyTwo-machine co-location, 16 cards16--64k/1k5020655361024
Low LatencyTwo-machine co-location, 16 cards16--64k/1k9020655361024
Low LatencyTwo-machine co-location, 16 cards16--128k/1k50201310721024
Low LatencyTwo-machine co-location, 16 cards16--128k/1k90201310721024
Low LatencyTwo-machine co-location, 16 cards16--190k/1k5020--
Low LatencyTwo-machine co-location, 16 cards16--190k/1k9020--
Longest SequenceTwo-machine co-location, 16 cards16--198k/19920--
Prefix Cache indicates the prefix cache hit rate. Card TPOT is the per-card TPOT target. - means the original feature table did not provide that field.