文件最后提交记录最后更新时间
[Docs] Correct the description in the document Co-authored-by: LKONE<wanglikai4@huawei.com> # message auto-generated for no-merge-commit merge: !2363 merge 26.0.0 into 26.0.0 [Docs] Correct the description in the document Created-by: wanglikai1019 Commit-by: wanglikai1019;LKONE Merged-by: ascend-robot Description: ## What this PR does / why we need it? 修改部分readme文档中的错误描述。 ## Does this PR introduce any user-facing change? 无 ## How was this patch tested? 无 See merge request: Ascend/MindSpeed-MM!23631 个月前
[Modify] move files from examples/fsdp2/ to examples/ Co-authored-by: pangwendong<pangwendong@huawei.com> # message auto-generated for no-merge-commit merge: !2320 merge cherry-pick-mr-2317-1774579670830-auto into 26.0.0 [Modify] move files from examples/fsdp2/ to examples/ Created-by: WendongPang Commit-by: pangwendong Merged-by: ascend-robot Description: ## What this PR does / why we need it? [Modify] move files from examples/fsdp2/ to examples/ ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!23202 个月前
[Modify] move files from examples/fsdp2/ to examples/ Co-authored-by: pangwendong<pangwendong@huawei.com> # message auto-generated for no-merge-commit merge: !2320 merge cherry-pick-mr-2317-1774579670830-auto into 26.0.0 [Modify] move files from examples/fsdp2/ to examples/ Created-by: WendongPang Commit-by: pangwendong Merged-by: ascend-robot Description: ## What this PR does / why we need it? [Modify] move files from examples/fsdp2/ to examples/ ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!23202 个月前
[Modify] move files from examples/fsdp2/ to examples/ Co-authored-by: pangwendong<pangwendong@huawei.com> # message auto-generated for no-merge-commit merge: !2320 merge cherry-pick-mr-2317-1774579670830-auto into 26.0.0 [Modify] move files from examples/fsdp2/ to examples/ Created-by: WendongPang Commit-by: pangwendong Merged-by: ascend-robot Description: ## What this PR does / why we need it? [Modify] move files from examples/fsdp2/ to examples/ ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!23202 个月前
[Modify] move files from examples/fsdp2/ to examples/ Co-authored-by: pangwendong<pangwendong@huawei.com> # message auto-generated for no-merge-commit merge: !2320 merge cherry-pick-mr-2317-1774579670830-auto into 26.0.0 [Modify] move files from examples/fsdp2/ to examples/ Created-by: WendongPang Commit-by: pangwendong Merged-by: ascend-robot Description: ## What this PR does / why we need it? [Modify] move files from examples/fsdp2/ to examples/ ## Does this PR introduce any user-facing change? Please describe whether the PR will result in any user-facing usage changes. If there is related documentation, please specify its path. ## How was this patch tested? Please explain how to verify the correctness and effectiveness of this feature, as well as its usage constraints and limitations. See merge request: Ascend/MindSpeed-MM!23202 个月前
README.md

FunASR 使用指南

目录

版本说明

参考实现

url=https://github.com/FunAudioLLM/Fun-ASR
commit_id=d9ba359
url=https://github.com/modelscope/FunASR
commit_id=42b6d3b

变更记录

2026.03.09: 首次支持FunASR模型训练


环境安装

1. 环境准备

【模型开发时推荐使用配套的环境版本】

请参考安装指南,完成昇腾软件安装。

2. 环境搭建

git clone --branch 26.0.0 https://gitcode.com/Ascend/MindSpeed-MM.git

# 安装mindspeed及依赖
git clone --branch 26.0.0_core_r0.12.1 https://gitcode.com/Ascend/MindSpeed.git
cd MindSpeed
cp -r mindspeed ../MindSpeed-MM/

# 安装mindspeed mm及依赖
cd ../MindSpeed-MM
pip install -e .

:sudachipy环境在安装前需要安装rust,如遇到问题,请在安装其它依赖前根据您的环境类型进行如下操作:

conda环境

conda install -c conda-forge rust
conda install -c conda-forge sudachipy sudachidict-core

其他环境

# Ubuntu安装命令:sudo apt-get install rustc cargo

# CentOs安装命令:sudo yum install rust cargo

# 安装sudachipy及字典
pip install sudachipy sudachidict-core --only-binary :all: --no-cache-dir
# 安装其它依赖
git clone https://github.com/modelscope/FunASR.git
cd FunASR
git checkout 42b6d3b
pip install -e .
cd ..
pip install -r examples/funasr/requirements.txt

权重下载及转换

1. 权重下载

从Huggingface库下载对应的模型权重:

将下载的模型权重保存到本地目录下.


数据集准备及处理

1. 数据集下载

(以funasr-demo数据集为例)

git clone https://github.com/FunAudioLLM/Fun-ASR.git

离线下载数据集:

git clone https://www.modelscope.cn/datasets/FunAudioLLM/funasr-demo.git

运行数据集路径转换:

# 修改路径,执行数据路径转换脚本
# input_dir # Fun-ASR的data路径
# output_file  # 保存路径
# local_prefix # funasr-demo路径
python examples/funasr/data_conversion.py \
    --input_dir "./Fun-ASR/data" \
    --output_dir "./examples/funasr" \
    --remote_prefix '!https://modelscope.cn/datasets/FunAudioLLM/funasr-demo/resolve/master' \
    --local_prefix "./funasr-demo"

微调

1. 准备工作

配置脚本前需要完成前置准备工作,包括:环境安装权重下载数据集准备及处理,详情可查看对应章节。

2. 启动微调

examples/funasr/funasr_config.yaml 文件中配置好数据集和权重路径:

  1. model_name_or_path修改为本地权重所在目录
  2. train_data_set_listval_data_set_list修改为数据转换后保存的jsonl路径

使用如下命令,启动FunASR的微调任务:

bash examples/funasr/finetune_funasr.sh

环境变量声明

环境变量 描述 取值说明
ASCEND_SLOG_PRINT_TO_STDOUT 是否开启日志打印 0: 关闭日志打屏
1: 开启日志打屏
ASCEND_GLOBAL_LOG_LEVEL 设置应用类日志的日志级别及各模块日志级别,仅支持调试日志 0: 对应DEBUG级别
1: 对应INFO级别
2: 对应WARNING级别
3: 对应ERROR级别
4: 对应NULL级别,不输出日志
TASK_QUEUE_ENABLE 用于控制开启task_queue算子下发队列优化的等级 0: 关闭
1: 开启Level 1优化
2: 开启Level 2优化
COMBINED_ENABLE 设置combined标志。设置为0表示关闭此功能;设置为1表示开启,用于优化非连续两个算子组合类场景 0: 关闭
1: 开启
CPU_AFFINITY_CONF 控制CPU端算子任务的处理器亲和性,即设定任务绑核 设置0或未设置: 表示不启用绑核功能
1: 表示开启粗粒度绑核
2: 表示开启细粒度绑核
HCCL_CONNECT_TIMEOUT 用于限制不同设备之间socket建链过程的超时等待时间 需要配置为整数,取值范围[120,7200],默认值为120,单位s
PYTORCH_NPU_ALLOC_CONF 控制缓存分配器行为 expandable_segments:<value>: 使能内存池扩展段功能,即虚拟内存特征
HCCL_EXEC_TIMEOUT 控制设备间执行时同步等待的时间,在该配置时间内各设备进程等待其他执行通信同步 需要配置为整数,取值范围[68,17340],默认值为1800,单位s
ACLNN_CACHE_LIMIT 配置单算子执行API在Host侧缓存的算子信息条目个数 需要配置为整数,取值范围[1, 10,000,000],默认值为10000
TOKENIZERS_PARALLELISM 用于控制Hugging Face的transformers库中的分词器(tokenizer)在多线程环境下的行为 False: 禁用并行分词
True: 开启并行分词
MULTI_STREAM_MEMORY_REUSE 配置多流内存复用是否开启 0: 关闭多流内存复用
1: 开启多流内存复用
NPU_ASD_ENABLE 控制是否开启Ascend Extension for PyTorch的特征值检测功能 设置0或未设置: 关闭特征值检测
1: 表示开启特征值检测,只打印异常日志,不告警
2:开启特征值检测,并告警
3:开启特征值检测,并告警,同时会在device侧info级别日志中记录过程数据
ASCEND_LAUNCH_BLOCKING 控制算子执行时是否启动同步模式 0: 采用异步方式执行
1: 强制算子采用同步模式运行
NPUS_PER_NODE 配置一个计算节点上使用的NPU数量 整数值(如 1, 8 等)

注意事项

  1. 若安装funasr包时构建失败,可能为创建的临时构建环境下载了最新版本的setuptools包,导致构建失败,建议使用--no-build-isolation参数进行pip install命令。