qq_34566203/distil-large-v3-ascend
模型介绍文件和版本Pull Requests讨论分析
下载使用量0

distil-large-v3 在昇腾 NPU 上的部署

1. 简介

distil-large-v3 是 Whisper 大型模型的蒸馏版本(32 层编码器 / 2 层解码器),适用于自动语音识别(ASR)任务。

2. 环境

组件版本
Python3.11
PyTorch2.10.0
torch_npu2.10.0
transformers5.8.1

3. 使用

pip install torch==2.10.0 torchvision==0.25.0 torchaudio==2.10.0 --index-url https://repo.huaweicloud.com/repository/pypi/simple/
pip install torch_npu==2.10.0 --index-url https://repo.huaweicloud.com/repository/pypi/simple/
pip install transformers soundfile
python3 inference.py --model_path /path/to/distil-large-v3 --audio /path/to/audio.wav
python3 benchmark.py --model_path /path/to/distil-large-v3

4. 精度

指标值
Encoder 隐藏层误差2.36%
余弦相似度0.9997
状态接近 < 1%(NPU 数值差异)

5. 性能

CPUNPU加速比
3.85s0.05s74.62x