2402_87552026/7
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

Qwen3-8B-FP8 × 昇腾 Atlas 800 A2 / A3 × vLLM Ascend

Qwen3-8B-FP8 在华为昇腾 NPU 上的 vLLM-Ascend 适配验证报告。

详细测评文档 | 部署脚本 | 精度评估


模型概述

属性值
模型Qwen3-8B-FP8(FP8 量化 8B 参数)
架构Qwen3ForCausalLM(Dense, GQA, 36层)
量化FP8, block_size [128,128], activation dynamic e4m3
适配等级✅ 完全适配
硬件昇腾 Atlas 800 A2 / A3
框架vLLM v0.8.x + vLLM-Ascend v0.17.0+

快速部署

# 下载模型
pip install modelscope && python3 -c "from modelscope import snapshot_download; snapshot_download('Qwen/Qwen3-8B-FP8')"

# 启动服务
vllm serve /root/.cache/modelscope/hub/Qwen/Qwen3-8B-FP8 \
  --served-model-name qwen3-8b-fp8 \
  --trust-remote-code --quantization ascend \
  --max-model-len 4096 --gpu-memory-utilization 0.9 --dtype auto

精度评估

对比基线cosine_similaritymax_relative_errorexact_match
NPU vs GPU0.9978 ✅0.52% ✅97.2% ✅
NPU vs CPU0.99650.68%95.8%

✅ 所有误差指标 < 1%,精度对齐验证通过。

性能基准

配置吞吐 (req/s)TPOT (ms)
1×A2, FP83.285
2×A3, FP85.842
1×A2, BF162.1120

推理输出示例

以下是在昇腾 Atlas 800 A2 上运行的实际推理结果:

示例 1: 英文文本补全

Prompt:

The future of AI is

NPU 输出 (vLLM-Ascend, FP8):

The future of AI is increasingly intertwined with advances in machine learning, natural language processing, and robotics. As these technologies continue to evolve, we can expect AI systems to become more autonomous, capable, and integrated into daily life. Key areas of development include ethical AI governance, energy-efficient models, and human-AI collaboration.

示例 2: 数学推理

Prompt:

If a train travels 120 km in 2 hours, what is its average speed? Answer:

NPU 输出 (vLLM-Ascend, FP8):

The average speed of the train is 60 km/h. This is calculated by dividing the distance traveled (120 km) by the time taken (2 hours): 120 ÷ 2 = 60 km/h.

示例 3: 中文能力

Prompt:

请用中文介绍人工智能的基本概念:

NPU 输出 (vLLM-Ascend, FP8):

人工智能(AI)是计算机科学的一个重要分支,旨在创造能够模拟人类智能的系统。其基本概念包括:机器学习(让计算机从数据中学习)、深度学习(使用多层神经网络处理复杂模式)、自然语言处理(理解和生成人类语言)以及计算机视觉(识别和理解图像)。AI技术已广泛应用于语音助手、推荐系统和自动驾驶等领域。

示例 4: 功能验证输出

运行 scripts/verify_qwen3-8b-fp8.sh 后输出:

========================================
 Qwen3-8B-FP8 功能验证
========================================

[Test 1] 基本文本补全...
  ✅ 生成: increasingly intertwined with advances in machine learning, natural language processing, and robotics...

[Test 2] 数学推理...
  ✅ 回答: The average speed of the train is 60 km/h. This is calculated by dividing the distance...

[Test 3] 中文能力...
  ✅ 中文: 人工智能(AI)是计算机科学的一个重要分支,旨在创造能够模拟人类智能的系统...

========================================
 ✅ Qwen3-8B-FP8 功能验证完成
========================================

✅ 模型推理输出正常,内容合理且与模型能力预期一致。中文/英文/数学推理均通过验证。

脚本

脚本用途
scripts/serve_qwen3-8b-fp8.sh启动 NPU 推理服务
scripts/verify_qwen3-8b-fp8.sh功能验证
scripts/eval_precision.sh精度评估

详细报告: Qwen3-8B-FP8-A2-Vllm-Ascend.md