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:- Atlas 800I A3
- Atlas 800I A2
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
EvalScope connects to the SGLang server via OpenAI-compatible API. The following example uses the GSM8K dataset:Command
Note: Output format may vary slightly across different EvalScope versions. The above example is from EvalScope 1.6.x. Ensure the--modelparameter matches the model name returned by the SGLang server’s/v1/modelsendpoint. When starting the server with an HF path (e.g.,Qwen/Qwen2.5-7B-Instruct), use that path directly. For local paths, pass the full path or the model name returned 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 uses
davinci[0-7], A3 usesdavinci[0-15] - Confirm image tag matches device type: A2 uses
...-910b, A3 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
