From 6aba0e3b5689b5b24ba9c56d9947ce1a859b2ad9 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期四, 22 二月 2024 12:06:40 +0800
Subject: [PATCH] train finetune demo

---
 examples/industrial_data_pretraining/paraformer/finetune_from_local.sh |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/examples/industrial_data_pretraining/paraformer/finetune_from_local_model.sh b/examples/industrial_data_pretraining/paraformer/finetune_from_local.sh
similarity index 90%
rename from examples/industrial_data_pretraining/paraformer/finetune_from_local_model.sh
rename to examples/industrial_data_pretraining/paraformer/finetune_from_local.sh
index 2e0b8ee..5b4d991 100644
--- a/examples/industrial_data_pretraining/paraformer/finetune_from_local_model.sh
+++ b/examples/industrial_data_pretraining/paraformer/finetune_from_local.sh
@@ -1,8 +1,12 @@
 # Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved.
 #  MIT License  (https://opensource.org/licenses/MIT)
 
+# method2, finetune from local model
+
+workspace=`pwd`
+
 # download model
-local_path_root=../modelscope_models
+local_path_root=${workspace}/modelscope_models
 mkdir -p ${local_path_root}
 local_path=${local_path_root}/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch
 git clone https://www.modelscope.cn/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch.git ${local_path}
@@ -24,15 +28,14 @@
 train_data="${data_dir}/train.jsonl"
 val_data="${data_dir}/val.jsonl"
 
-tokens="${local_path}/tokens.jsonl"
+tokens="${local_path}/tokens.json"
 cmvn_file="${local_path}/am.mvn"
 
 # exp output dir
 output_dir="/Users/zhifu/exp"
 log_file="${output_dir}/log.txt"
 
-workspace=`pwd`
-config="${local_path}/config.yaml"
+config="config.yaml"
 
 init_param="${local_path}/model.pt"
 
@@ -43,7 +46,7 @@
 --nnodes 1 \
 --nproc_per_node ${gpu_num} \
 ../../../funasr/bin/train.py \
---config-path "${workspace}/conf" \
+--config-path "${local_path}" \
 --config-name "${config}" \
 ++train_data_set_list="${train_data}" \
 ++valid_data_set_list="${val_data}" \

--
Gitblit v1.9.1