Fun-ASR-Nano Hugging Face checkpoint is missing 86 CTC tensors required for timestamps and diarization

未关闭
#3,496 9 条评论 0 个 reaction 已指派 2 人 在 GitHub 查看

@pengzhendong 已经在做这个了。

开始于 2026年8月16日。

评估

这个 Issue 还没有评估数据。

描述

bug needs maintainer decision

Summary

The current Hugging Face and ModelScope copies of FunAudioLLM/Fun-ASR-Nano-2512 do not contain the same model.pt.

The Hugging Face file is smaller and lacks every ctc_decoder.* and ctc.* tensor. ASR text still works, but the CTC timestamps required by FunASR's native speaker diarization path are unavailable.

Verified on 2026-08-14 with FunASR 1.4.2.

Artefact comparison

source model.pt size state-dict tensors CTC tensors
Hugging Face, commit 272c57b82523ada6fd87095e955f8e29100979ab 1,971,149,431 bytes 1,261 0
ModelScope 2,127,426,538 bytes 1,347 84 ctc_decoder.* + 2 ctc.*

Complete ModelScope checkpoint SHA-256:

81fec8616083c69377f3ceef36aba3655660ee0ca69a5d4a1e9810cd340ca499

Complete namespace counts:

audio_encoder  914
audio_adaptor   36
llm            311
ctc_decoder     84
ctc              2

Minimal inspection

from collections import Counter
from huggingface_hub import hf_hub_download
import os
import torch

path = hf_hub_download("FunAudioLLM/Fun-ASR-Nano-2512", "model.pt")
state = torch.load(path, map_location="cpu", mmap=True, weights_only=False)

print(os.path.getsize(path))
print(len(state))
print(Counter(key.split(".", 1)[0] for key in state))

Effect

Using the Hugging Face checkpoint through AutoModel produces text, but no Nano CTC timestamps. That in turn prevents the native spk_model="cam++" diarization path from producing valid speaker-attributed segments.

Replacing only model.pt with the complete ModelScope checkpoint restores character timestamps and native diarization. With the complete checkpoint, AutoModel works on both CPU and Apple MPS.

Expected result

Please synchronise the complete ModelScope model.pt to the Hugging Face repository, or otherwise document why the published artefacts intentionally differ.

It may also be useful for the loader to fail closed when a Nano checkpoint has no CTC tensors, rather than allowing text-only inference to make the checkpoint appear complete.

Related: #3208 and #3211.

主要语言
Python
星标
20.4k
派生
2k
平均合并
4 小时 55 分钟
30 天内合并 PR
169

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

modelscope/FunASR 的其他 Issue

查看 modelscope/FunASR 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。