add more training details
This commit is contained in:
@ -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).
|
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
|
bash finetune.sh
|
||||||
```
|
```
|
||||||
|
|||||||
@ -57,6 +57,8 @@ python tools/scp2jsonl.py \
|
|||||||
|
|
||||||
将需要微调的模块 `freeze` 设置成 `false`(默认只微调 llm)。
|
将需要微调的模块 `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
|
bash finetune.sh
|
||||||
```
|
```
|
||||||
|
|||||||
14
finetune.sh
14
finetune.sh
@ -8,17 +8,8 @@ export CUDA_VISIBLE_DEVICES="0"
|
|||||||
gpu_num=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')
|
gpu_num=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')
|
||||||
|
|
||||||
# model_name from model_hub, or model_dir in local path
|
# 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"
|
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
|
# data dir, which contains: train.json, val.json
|
||||||
train_data=${workspace}/data/train_example.jsonl
|
train_data=${workspace}/data/train_example.jsonl
|
||||||
val_data=${workspace}/data/val_example.jsonl
|
val_data=${workspace}/data/val_example.jsonl
|
||||||
@ -39,7 +30,6 @@ DISTRIBUTED_ARGS="
|
|||||||
--master_addr ${MASTER_ADDR:-127.0.0.1} \
|
--master_addr ${MASTER_ADDR:-127.0.0.1} \
|
||||||
--master_port ${MASTER_PORT:-26669}
|
--master_port ${MASTER_PORT:-26669}
|
||||||
"
|
"
|
||||||
|
|
||||||
echo $DISTRIBUTED_ARGS
|
echo $DISTRIBUTED_ARGS
|
||||||
|
|
||||||
# funasr trainer path
|
# funasr trainer path
|
||||||
@ -70,7 +60,5 @@ ${train_tool} \
|
|||||||
++optim_conf.lr=0.0002 \
|
++optim_conf.lr=0.0002 \
|
||||||
++audio_encoder_conf.freeze=true \
|
++audio_encoder_conf.freeze=true \
|
||||||
++audio_adaptor_conf.freeze=true \
|
++audio_adaptor_conf.freeze=true \
|
||||||
++llm_conf.freeze=true \
|
++llm_conf.freeze=false \
|
||||||
++llm_conf.use_lora=true \
|
|
||||||
++llm_conf.lora_conf.freeze_lora=false \
|
|
||||||
++output_dir="${output_dir}" &> ${log_file}
|
++output_dir="${output_dir}" &> ${log_file}
|
||||||
|
|||||||
Reference in New Issue
Block a user