weixin_62994174/Fun-ASR-MLT-Nano-2512
Model Introduction
Files & versions
Pull Requests
Discussion
Analysis

Fun-ASR-MLT-Nano-2512

NPU Ascend PyTorch FunASR ModelScope

Fun-ASR-MLT-Nano-2512 的 昇腾 Ascend NPU 适配版本,支持在华为昇腾硬件上进行高性能多语言语音识别推理。

Model Information

FieldValue
Model NameFun-ASR-MLT-Nano-2512
Original SourceModelScope / HuggingFace
DeveloperTongyi Lab (Alibaba)
ArchitectureFunASRNano (SenseVoiceEncoderSmall + Qwen3-0.6B LLM + CTC Decoder)
Parameters800M
Supported Languages31 languages (Chinese, English, Japanese, Korean, Cantonese, Vietnamese, etc.)
Supported HardwareAscend 910B NPU / NVIDIA GPU / CPU
FrameworkPyTorch + torch_npu + FunASR

Ascend NPU Adaptation

Environment Requirements

ComponentVersion
CANN8.5.1
torch2.x
torch_npu2.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 FileLanguageNPU ResultCPU ResultChar DiffStatus
zh.mp3中文開放時間早上九點至下午五點。開放時間早上九點至下午五點。0.0000%PASS
en.mp3EnglishThe 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).

Performance Benchmark (NPU vs CPU)

Test FileNPU Time (avg)CPU TimeSpeedup
zh.mp30.503s7.169s14.24x
en.mp32.180s10.689s4.90x
ja.mp31.053s12.739s12.10x
ko.mp30.820s9.502s11.59x
yue.mp30.584s7.680s13.14x
Average1.028s9.556s11.20x

Environment Details

ItemDetail
NPU ModelAscend 910B (Ascend910_9362)
NPU Count2
CANN Version8.5.1
Python3.11
torch_npu2.x (CANN 8.5.1 compatible)
Test Date2026-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)

Tags

#NPU #Hardware-NPU #Ascend #Ascend910B #SpeechRecognition #ASR #FunASR #MultiLanguage #PyTorch #torch_npu #ModelAdaptation