vllm-ascend/recipes
~/browse/THUDM

GLM-4.5/4.6/4.7

GLM-4.x series are Mixture-of-Experts (MoE) foundational models from Zhipu AI, specifically designed for agent applications. GLM-4.7 features the latest improvements with support for MTP speculative decoding, expert parallelism, and PD disaggregation on Ascend NPUs.

MoE31B133K ctxtextvLLM 0.10.0rc1

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

Added: 2026-07-13·[ edit ]

Preparation

GLM-4.x (GLM-4.5/4.6/4.7) are Mixture-of-Experts (MoE) foundational models from Zhipu AI (THUDM), specifically designed for agent applications.

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",
        "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).

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. The following is the result of GLM-4.7 on vllm-ascend:main (after vllm-ascend:0.14.0rc1) for reference only:

datasetversionmetricmodevllm-api-general-chatnote
GPQA-accuracygen84.851 Atlas 800 A3 (64G × 16)
MATH500-accuracygen98.81 Atlas 800 A3 (64G × 16)

Using Language Model Evaluation Harness

Not tested yet.

Benchmark

Recommended Configurations

Note: The following configurations are validated in specific test environments and are for reference only.

Best Practices

ScenarioRecommended ConfigNotes
Long-context, low concurrency (<=4)dp1 tp16Maximizes context capacity
Long-context, high concurrency (>4)dp2 tp8Balances throughput and context
Low-latency, short sequencesdp2 tp8Reduces per-token latency
High-throughput, short sequencesdp2 tp8Maximizes concurrent request processing
max-model-len and max-num-seqs should be tuned per scenario.