xujiashuai/whisper-tiny
模型介绍文件和版本Pull Requests讨论分析

whisper-tiny 在昇腾 NPU 上的部署

1. 简介

  • 模型来源: openai/whisper-tiny
  • 参数量: 37,760,640
  • 适配状态: 成功
  • 适配时间: 2026-05-14 21:37:44

2. 验证环境

组件版本
torch2.9.0
torch-npu2.9.0.post1
transformers4.57.6
CANN8.5.1
NPUAscend 910B4
操作系统Ubuntu 22.04.5 LTS (aarch64)
Python3.11.14

3. 精度评测

✅ NPU 与 CPU 精度对比

指标数值
余弦相似度1.000010
精度误差-0.0010%
是否满足要求是(< 1%)✅

精度截图

4. 性能

指标数值
平均延迟72.35 毫秒
峰值显存0.16 GB
测试轮数10

5. 推理验证

python3 inference.py --model-id openai/whisper-tiny --device npu:0

终端输出:

2026-05-16 16:04:31,895 - modelscope - INFO - Download model 'openai-mirror/whisper-tiny' successfully.
Using custom `forced_decoder_ids` from the (generation) config.
Transcription using a multilingual Whisper will default to language detection followed by transcription instead of translation to English.
/usr/local/python3.11.14/lib/python3.11/site-packages/transformers/models/whisper/generation_whisper.py:1678: UserWarning: Cannot create tensor with interal format while allow_internel_format=False, tensor will be created with base format.
  non_lang_mask = torch.ones_like(logits[0], dtype=torch.bool)
The attention mask is not set and cannot be inferred from input because pad token is same as eos token. As a consequence, you may observe unexpected behavior. Please pass your input's `attention_mask` to obtain reliable results.
Output shape: [1, 5]
SUCCESS

6. 复现步骤

# 环境检查
python3 env_check.py

# 精度验证
python3 evaluate.py --model-id openai/whisper-tiny --device npu:0 --output report.json

# 推理
python3 inference.py --model-id openai/whisper-tiny --device npu:0

7. 评测材料

材料文件
推理脚本inference.py
精度评测evaluate.py
环境检查env_check.py
运行日志logs/run.log
截图screenshots/
报告report.json
部署文档DEPLOY.md
依赖requirements.txt

贡献者: xujiashuai | 赛道: 模型适配赛道 | 时间: 2026-05-15 01:43:16

下载使用量0