From 1fd7785b29669043d3f2d5f5d8f8607b70d28655 Mon Sep 17 00:00:00 2001 From: pengzhendong <275331498@qq.com> Date: Mon, 29 Dec 2025 17:19:24 +0800 Subject: [PATCH] add more training details --- docs/finetune.md | 2 ++ docs/fintune_zh.md | 2 ++ finetune.sh | 14 +------------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/docs/finetune.md b/docs/finetune.md index 2639d15..dc99459 100644 --- a/docs/finetune.md +++ b/docs/finetune.md @@ -53,6 +53,8 @@ Modify the `audio_encoder_conf.freeze`, `audio_adaptor_conf.freeze`, and `llm_co Set the `freeze` parameter of the modules to be fine-tuned to false(by default, only the LLM is fine-tuned). +For more detailed parameters, refer to: [SenseVoice Model Training and Testing](https://github.com/modelscope/FunASR/blob/main/docs/tutorial/README.md#Model%20Training%20and%20Testing) + ``` bash finetune.sh ``` diff --git a/docs/fintune_zh.md b/docs/fintune_zh.md index 8721a31..e55edc5 100644 --- a/docs/fintune_zh.md +++ b/docs/fintune_zh.md @@ -57,6 +57,8 @@ python tools/scp2jsonl.py \ 将需要微调的模块 `freeze` 设置成 `false`(默认只微调 llm)。 +更多参数细节参考:[SenseVoice 模型训练与测试](https://github.com/modelscope/FunASR/blob/main/docs/tutorial/README_zh.md#%E6%A8%A1%E5%9E%8B%E8%AE%AD%E7%BB%83%E4%B8%8E%E6%B5%8B%E8%AF%95) + ``` bash finetune.sh ``` diff --git a/finetune.sh b/finetune.sh index 01f5919..4897a9b 100644 --- a/finetune.sh +++ b/finetune.sh @@ -8,17 +8,8 @@ export CUDA_VISIBLE_DEVICES="0" gpu_num=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}') # model_name from model_hub, or model_dir in local path - -## option 1, download model automatically model_name_or_model_dir="FunAudioLLM/Fun-ASR-Nano-2512" -## option 2, download model by git -#local_path_root=${workspace}/modelscope_models -#mkdir -p ${local_path_root}/${model_name_or_model_dir} -#git clone https://www.modelscope.cn/${model_name_or_model_dir}.git ${local_path_root}/${model_name_or_model_dir} -#model_name_or_model_dir=${local_path_root}/${model_name_or_model_dir} - - # data dir, which contains: train.json, val.json train_data=${workspace}/data/train_example.jsonl val_data=${workspace}/data/val_example.jsonl @@ -39,7 +30,6 @@ DISTRIBUTED_ARGS=" --master_addr ${MASTER_ADDR:-127.0.0.1} \ --master_port ${MASTER_PORT:-26669} " - echo $DISTRIBUTED_ARGS # funasr trainer path @@ -70,7 +60,5 @@ ${train_tool} \ ++optim_conf.lr=0.0002 \ ++audio_encoder_conf.freeze=true \ ++audio_adaptor_conf.freeze=true \ -++llm_conf.freeze=true \ -++llm_conf.use_lora=true \ -++llm_conf.lora_conf.freeze_lora=false \ +++llm_conf.freeze=false \ ++output_dir="${output_dir}" &> ${log_file}