Fun-ASR-MLT-Nano-2512

Fun-ASR-MLT-Nano-2512 的 昇腾 Ascend NPU 适配版本,支持在华为昇腾硬件上进行高性能多语言语音识别推理。
| Field | Value |
|---|
| Model Name | Fun-ASR-MLT-Nano-2512 |
| Original Source | ModelScope / HuggingFace |
| Developer | Tongyi Lab (Alibaba) |
| Architecture | FunASRNano (SenseVoiceEncoderSmall + Qwen3-0.6B LLM + CTC Decoder) |
| Parameters | 800M |
| Supported Languages | 31 languages (Chinese, English, Japanese, Korean, Cantonese, Vietnamese, etc.) |
| Supported Hardware | Ascend 910B NPU / NVIDIA GPU / CPU |
| Framework | PyTorch + torch_npu + FunASR |
Ascend NPU Adaptation
Environment Requirements
| Component | Version |
|---|
| CANN | 8.5.1 |
| torch | 2.x |
| torch_npu | 2.x |
| funasr | >= 1.3.1 |
| soundfile | >= 0.13 |
| librosa | >= 0.11 |
Quick Start
# Install dependencies
pip install funasr soundfile librosa
# Download model from ModelScope
pip install modelscope
modelscope download --model FunAudioLLM/Fun-ASR-MLT-Nano-2512 --local_dir ./Fun-ASR-MLT-Nano-2512
NPU Inference
import torch
import torch_npu
# Ensure NPU is available
assert torch.npu.is_available(), "NPU not available"
device = torch.device("npu:0")
# Load and run
from inference import load_model_cpu, move_model_to_npu, run_inference_npu
model, kwargs = load_model_cpu("./Fun-ASR-MLT-Nano-2512")
model_npu = move_model_to_npu(model, device)
result = run_inference_npu(
model_npu, kwargs,
wav_path="./example/zh.mp3",
language="中文",
itn=True,
)
print(result["text"])
Or run directly:
python inference.py --wav example/zh.mp3 --language "中文"
python inference.py --all_examples # run all examples
Evaluation Results on Ascend 910B NPU
Accuracy Verification (NPU vs CPU)
| Test File | Language | NPU Result | CPU Result | Char Diff | Status |
|---|
| zh.mp3 | 中文 | 開放時間早上九點至下午五點。 | 開放時間早上九點至下午五點。 | 0.0000% | PASS |
| en.mp3 | English | The tribal chieftain called for the boy... | The tribal chieftain called for the boy... | 0.0000% | PASS |
| ja.mp3 | 日本語 | うちの中学は弁当制で... | うちの中学は弁当制で... | 0.0000% | PASS |
| ko.mp3 | 한국어 | 조금만 생각을 하면서 살면 훨씬 편할 거야. | 조금만 생각을 하면서 살면 훨씬 편할 거야. | 0.0000% | PASS |
| yue.mp3 | 粵語 | 呢幾個字都表逹唔到我想講嘅意思 | 呢幾個字都表逹唔到我想講嘅意思 | 0.0000% | PASS |
Accuracy: 100.00% exact match across all test cases. Character-level difference: 0.0000% (< 1% threshold).
| Test File | NPU Time (avg) | CPU Time | Speedup |
|---|
| zh.mp3 | 0.503s | 7.169s | 14.24x |
| en.mp3 | 2.180s | 10.689s | 4.90x |
| ja.mp3 | 1.053s | 12.739s | 12.10x |
| ko.mp3 | 0.820s | 9.502s | 11.59x |
| yue.mp3 | 0.584s | 7.680s | 13.14x |
| Average | 1.028s | 9.556s | 11.20x |
Environment Details
| Item | Detail |
|---|
| NPU Model | Ascend 910B (Ascend910_9362) |
| NPU Count | 2 |
| CANN Version | 8.5.1 |
| Python | 3.11 |
| torch_npu | 2.x (CANN 8.5.1 compatible) |
| Test Date | 2026-05-16 |
File Structure
Fun-ASR-MLT-Nano-2512/
├── inference.py # NPU-adapted inference script
├── evaluate.py # Accuracy & performance benchmark script
├── README.md # This file
├── model.py # Model architecture definition
├── model.pt # Model checkpoint (1.97GB)
├── config.yaml # Model configuration
├── configuration.json # Pipeline configuration
├── ctc.py # CTC decoder module
├── multilingual.tiktoken # CTC tokenizer vocabulary
├── tools/
│ └── utils.py # Forced alignment utilities
├── Qwen3-0.6B/ # Qwen LLM tokenizer files
│ └── tokenizer.json, vocab.json, merges.txt, config.json
└── example/ # Test audio files (5 languages)
├── zh.mp3
├── en.mp3
├── ja.mp3
├── ko.mp3
└── yue.mp3
Model Architecture
Audio Input (16kHz)
│
▼
WavFrontend (80-dim mel fbank, lfr_m=7, lfr_n=6)
│
▼
SenseVoiceEncoderSmall (512-dim, 50 SANM blocks, 4 heads)
│
├──► CTC Decoder (5-layer Transformer) ──► CTC Alignments
│
▼
Audio Adaptor (2-layer Transformer, 512→1024)
│
▼
Qwen3-0.6B LLM (frozen, bfloat16)
│
▼
Text Output (31 languages)
#NPU #Hardware-NPU #Ascend #Ascend910B #SpeechRecognition #ASR #FunASR #MultiLanguage #PyTorch #torch_npu #ModelAdaptation