CohereLabs/cohere-transcribe-03-2026(原始权重地址,HuggingFace;本仓因 HF gated 同步自 ModelScope 镜像 CohereLabs/cohere-transcribe-03-2026)是 Cohere 开源的 14 语种通用语音转写(ASR)模型,约 2.06B 参数:NeMo 风格 Conformer 编码器(d_model=1280,48 层,rel-pos 注意力)+ Transformer 解码器(hidden 1024,8 层),词表 16384,16 kHz 输入,支持 en/fr/de/es/it/pt/nl/pl/el/ar/ja/zh/vi/ko。架构为自定义代码 cohere_asr(CohereAsrForConditionalGeneration),加载需 trust_remote_code=True。
npu:0)见 requirements.txt:torch / torch_npu / transformers>=4.53 / soundfile / numpy / librosa / modelscope / safetensors / sentencepiece
# 1. 准备权重:HF gated(auto),优先 ModelScope 镜像
python -c "from modelscope import snapshot_download; snapshot_download('CohereLabs/cohere-transcribe-03-2026', cache_dir='/tmp/bigw/cohere_transcribe')"
# 2. 在昇腾 NPU 上推理(脚本内部自动解析权重,亦可用 COHERE_TRANSCRIBE_MODEL_DIR 指定本地目录)
python inference.py --device npuinference.py 使用 AutoModelForSpeechSeq2Seq.from_pretrained(..., trust_remote_code=True, output_loading_info=True) 加载(门禁 1:missing/unexpected/mismatched = 0/0/0),model.to("npu:0").eval() 后调用模型自带高层 model.transcribe(processor, language=..., audio_arrays=[...]) API 完成转写。
加载正确性三道门禁(全过):
output_loading_info 0 missing / 0 unexpected / 0 mismatched;config.json 全部键与 model.config.to_dict() 实际生效值逐一比对,0 个键未落地(sample_rate=16000 / max_audio_clip_s=35 / vocab_size=16384 / batch_size=128 均正确生效);'',正确加载模型输出完整语义正确转写(决定性胜出)。| 用例 | 输入 | 昇腾 NPU 真实输出 | 时延 |
|---|---|---|---|
| 1 | 仓库自带真实英文语音 demo/voxpopuli_test_en_demo.wav(VoxPopuli EN) | If not, there will be a big crisis between you and the European Parliament. | 0.86 s |
| 2 | 合成多频正弦音频(440/1320/60 Hz,3 s,非语音) | Thank you.(对非语音输入的模型固有幻觉输出,如实记录) | 0.13 s |
5 s 音频、max_new_tokens=256、batch=1,预热 5 次 + 正式 20 次(flock 独占 NPU 卡):
| 指标 | 数值 |
|---|---|
| p50 | 86.1 ms |
| p90 | 93.9 ms |
| p95 | 95.2 ms |
| avg | 89.0 ms |
| min / max | 85.1 / 100.1 ms |
| 峰值 HBM 占用 | 8.57 GB(Ascend 910 64GB) |
p95/p50 = 1.10,测量无并发污染,稳态口径取 p50/p90。

#NPU