ayousanz commited on
Commit
a335d13
·
verified ·
1 Parent(s): 0521db7

Add train.yaml

Browse files
Files changed (1) hide show
  1. train.yaml +131 -0
train.yaml ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ model: llmasr
2
+
3
+ # tokenizer
4
+ tokenizer: huggingface
5
+ tokenizer_conf:
6
+ llm_path: ./Qwen2.5-0.5B-Instruct #请从huggingface下载,然后设置为自己的本地路径
7
+ use_lora: false #设置为true,对LLM进行lora微调
8
+ lora_alpha: 32
9
+ lora_rank: 8
10
+ lora_dropout: 0.1
11
+ speech_token_num: 4097
12
+
13
+ fire_module: encoder_and_link_and_llm # 解冻参数 encoder_and_link_and_llm, encoder, llm, link_and_encoder。 llm需要配合use_lora为true
14
+ downsample_rate: 4 # 1 2 4 8
15
+ adapter_type: gxl
16
+ llm_path: ./Qwen2.5-0.5B-Instruct #与上同
17
+
18
+ optim: adamw
19
+ optim_conf:
20
+ betas:
21
+ - 0.9
22
+ - 0.99
23
+ eps: 1.0e-06
24
+ lr: 5.0e-05
25
+ weight_decay: 0.01
26
+ scheduler: warmuplr
27
+ scheduler_conf:
28
+ warmup_steps: 8000
29
+
30
+ cmvn: null
31
+ cmvn_conf:
32
+ cmvn_file: null
33
+ is_json_cmvn: null
34
+ ctc_conf:
35
+ ctc_blank_id: 50362
36
+
37
+ dataset: asr
38
+ dataset_conf:
39
+ emotion_en2zh_dict: conf/en2zh4emotion.json
40
+ batch_conf:
41
+ batch_size: 26
42
+ batch_type: dynamic
43
+ max_frames_in_batch: 3900
44
+ max_seq_in_batch: 1900 #2000
45
+ feats_type: log_mel_spectrogram
46
+ filter_conf:
47
+ max_length: 2900 #2000
48
+ min_length: 0
49
+ token_max_length: 360
50
+ token_min_length: 1
51
+ filter_no_extra_info: false # 如果没有task lang 等信息,直接过滤掉, 适用于通用多任务训练, 推理时应该关掉
52
+ max_seq_len: 1000 #1700
53
+ language_conf:
54
+ limited_langs:
55
+ - zh
56
+ log_mel_spectrogram_conf:
57
+ hop_length: 160
58
+ n_fft: 400
59
+ num_mel_bins: 80
60
+ padding: 0
61
+ resample_conf:
62
+ resample_rate: 16000
63
+ shuffle: true
64
+ shuffle_conf:
65
+ shuffle_size: 1500
66
+ sort: true
67
+ sort_conf:
68
+ sort_size: 500
69
+ spec_aug: true
70
+ spec_aug_conf:
71
+ max_f: 10
72
+ max_t: 50
73
+ num_f_mask: 2
74
+ num_t_mask: 2
75
+ spec_sub: true
76
+ spec_sub_conf:
77
+ max_t: 30
78
+ num_t_sub: 3
79
+ spec_trim: false
80
+ speed_perturb: false
81
+ eod_id: 151643 # for whisper
82
+ split_num: 1 #10
83
+
84
+ decoder: transformer
85
+ decoder_conf:
86
+ activation_type: gelu
87
+ attention_heads: 16
88
+ dropout_rate: 0.1
89
+ gradient_checkpointing: true
90
+ input_layer: embed_learnable_pe
91
+ key_bias: false
92
+ linear_units: 4096
93
+ normalize_before: true
94
+ num_blocks: 24
95
+ positional_dropout_rate: 0.1
96
+ self_attention_dropout_rate: 0.0
97
+ src_attention: true
98
+ src_attention_dropout_rate: 0.0
99
+ tie_word_embedding: true
100
+ use_output_layer: true
101
+ encoder: transformer
102
+ encoder_conf:
103
+ activation_type: gelu
104
+ attention_dropout_rate: 0.0
105
+ attention_heads: 16
106
+ dropout_rate: 0.1
107
+ gradient_checkpointing: true
108
+ input_layer: conv1d2
109
+ key_bias: false
110
+ linear_units: 4096
111
+ normalize_before: true
112
+ num_blocks: 24
113
+ output_size: 1024
114
+ pos_enc_layer_type: abs_pos_whisper
115
+ positional_dropout_rate: 0.1
116
+ static_chunk_size: -1
117
+ use_dynamic_chunk: false
118
+ use_dynamic_left_chunk: false
119
+ grad_clip: 5
120
+ accum_grad: 4
121
+ input_dim: 80
122
+ log_interval: 10
123
+ save_interval: 5000
124
+ max_epoch: 100
125
+ #model: whisper
126
+ model_conf:
127
+ ctc_weight: 0
128
+ length_normalized_loss: false
129
+ lsm_weight: 0.1
130
+
131
+ init_step: true #false