Ascend NPU Accuracy Evaluation
This document describes how to perform accuracy evaluation for SGLang models running on Ascend NPU using a tool: EvalScope. The following scenarios are covered:- Online Testing: Evaluate via API interface after starting SGLang server
- Text Models: Using Qwen2.5-7B-Instruct as example
- Multimodal Models: Using Qwen2.5-VL-7B-Instruct as example
Environment Setup
First, launch the SGLang environment using the provided container image:- Ascend A3 Series
- Ascend A2 Series
Command
Using EvalScope
EvalScope is a comprehensive model evaluation framework from ModelScope, supporting both accuracy evaluation and performance stress testing.Install EvalScope
Command
Online Text Model Testing
This section covers online evaluation scenarios where the SGLang server is already running.Start SGLang Server
Command
Execute Accuracy Evaluation
Use sgl-eval for GSM8K and MMLU. It owns the datasets, chat prompts and graders. EvalScope remains available for the other benchmarks below:Command
metrics.json and per-example predictions. Use the model name reported by /v1/models.
Common Datasets for Online Evaluation
Command
Online Multimodal Model Testing
Start Multimodal Model Server
Command
Execute Multimodal Accuracy Evaluation
Command
Troubleshooting
SGLang Server Startup Failure
- Verify device mapping: A2 Series uses
davinci[0-7], A3 Series usesdavinci[0-15] - Confirm image tag matches device type: A2 Series uses
...-910b, A3 Series uses...-a3 - Check NPU status with
npu-smi info - First run requires model download; set
HF_ENDPOINT=https://hf-mirror.comif network access is restricted
EvalScope Connection Failure to Server
- Confirm SGLang server started successfully (look for
Application startup completein logs) - Verify
--api-urlpoints to the correct port (SGLang defaults to30000) - Ensure URL ends with
/v1, e.g.,http://localhost:30000/v1
EvalScope SSL certificate verification failed
When using EvalScope commands without specifying a dataset or model path, it will attempt to download automatically, which may encounter an SSL certificate verification error:/usr/local/python3.11.14/lib/python3.11/site-packages/requests/sessions.py, find the class Session definition, and set self.verify = False.
Stable solution:
The error is caused by a corporate TLS proxy injecting a self-signed certificate. Point requests to the proxy’s CA bundle:
This is a common workaround for corporate proxy environments. If it does not resolve your issue, consult your IT department — proxy configurations vary across organizations.
EvalScope Request Retry Timeout
If EvalScope keeps retrying requests with errors like:Command
Download Dataset Error
For this error--no-check-certificate
