Upload folder using huggingface_hub
Browse files
checkpoints/taste/checkpoint_best.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7242f482a4460e55ebc896cb6dba86f72f3331ace510bf09caa6bf3662bff401
|
3 |
+
size 2141617224
|
checkpoints/taste/checkpoint_best.yaml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
accum_grad: 2
|
2 |
+
batch_idx: 4315
|
3 |
+
checkpoint: /proj/mtklmadm/dev/mtk53678/rtslm_storage/code/rtslm/CosyVoice/examples/emilia/taste/exp/llm/torch_ddp/stage2/0127_stg2_eos-drop_rvq-d256-l4-k512_sum/checkpoint_best.pt
|
4 |
+
config: /proj/mtklmadm/dev/mtk53678/rtslm_storage/code/rtslm/CosyVoice/examples/emilia/taste/conf/stage2/0207_stg2_eos_rvq-d256-l4-k512_sum_smaller-lr.yaml
|
5 |
+
cv_data: /proj/mtklmadm/dev/mtk53678/rtslm_storage/code/rtslm/CosyVoice/examples/emilia/taste/data/dev.data.list
|
6 |
+
deepscale: false
|
7 |
+
deepscale_config: null
|
8 |
+
deepspeed: false
|
9 |
+
deepspeed_config: ./conf/customized_ds.json
|
10 |
+
dist_backend: nccl
|
11 |
+
dtype: fp32
|
12 |
+
epoch: 0
|
13 |
+
grad_clip: 5
|
14 |
+
grad_norm: !!python/object/apply:torch._utils._rebuild_tensor_v2
|
15 |
+
- !!python/object/apply:torch.storage._load_from_bytes
|
16 |
+
- !!binary |
|
17 |
+
gAKKCmz8nEb5IGqoUBkugAJN6QMugAJ9cQAoWBAAAABwcm90b2NvbF92ZXJzaW9ucQFN6QNYDQAA
|
18 |
+
AGxpdHRsZV9lbmRpYW5xAohYCgAAAHR5cGVfc2l6ZXNxA31xBChYBQAAAHNob3J0cQVLAlgDAAAA
|
19 |
+
aW50cQZLBFgEAAAAbG9uZ3EHSwR1dS6AAihYBwAAAHN0b3JhZ2VxAGN0b3JjaApGbG9hdFN0b3Jh
|
20 |
+
Z2UKcQFYCgAAADQ5MjUwMTE1ODRxAlgGAAAAY3VkYTowcQNLAU50cQRRLoACXXEAWAoAAAA0OTI1
|
21 |
+
MDExNTg0cQFhLgEAAAAAAAAAG8EsPw==
|
22 |
+
- 0
|
23 |
+
- !!python/tuple []
|
24 |
+
- !!python/tuple []
|
25 |
+
- false
|
26 |
+
- !!python/object/apply:collections.OrderedDict
|
27 |
+
- []
|
28 |
+
log_interval: 100
|
29 |
+
loss_dict:
|
30 |
+
acc: 0.3778303575254848
|
31 |
+
len: 0.0
|
32 |
+
loss: 2.296471059830398
|
33 |
+
lr: 0.00014604717857689557
|
34 |
+
max_epoch: 3
|
35 |
+
model: llm
|
36 |
+
model_dir: /proj/mtklmadm/dev/mtk53678/rtslm/CosyVoice/examples/emilia/taste/exp/llm/torch_ddp/stage2/0207_stg2_eos_rvq-d256-l4-k512_sum_smaller-lr
|
37 |
+
num_workers: 6
|
38 |
+
optim: adam
|
39 |
+
optim_conf:
|
40 |
+
lr: 0.00016
|
41 |
+
pin_memory: true
|
42 |
+
prefetch: 64
|
43 |
+
save_per_step: 2000
|
44 |
+
save_states: model+optimizer
|
45 |
+
save_time: 08/02/2025 20:41:10
|
46 |
+
scheduler: warmuplr
|
47 |
+
scheduler_conf:
|
48 |
+
warmup_steps: 5000
|
49 |
+
step: 5999
|
50 |
+
tag: CV
|
51 |
+
tensorboard_dir: /proj/mtklmadm/dev/mtk53678/rtslm/CosyVoice/examples/emilia/taste/tensorboard/llm/torch_ddp/stage2/0207_stg2_eos_rvq-d256-l4-k512_sum_smaller-lr
|
52 |
+
timeout: 30
|
53 |
+
train_data: /proj/mtklmadm/dev/mtk53678/rtslm_storage/code/rtslm/CosyVoice/examples/emilia/taste/data/train_with_libritts.data.list
|
54 |
+
train_engine: torch_ddp
|
checkpoints/taste/config.yaml
ADDED
@@ -0,0 +1,312 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# set random seed, so that you may reproduce your result.
|
2 |
+
__set_seed1: !apply:random.seed [1986]
|
3 |
+
__set_seed2: !apply:numpy.random.seed [1986]
|
4 |
+
__set_seed3: !apply:torch.manual_seed [1986]
|
5 |
+
__set_seed4: !apply:torch.cuda.manual_seed_all [1986]
|
6 |
+
|
7 |
+
# fixed params
|
8 |
+
sample_rate: 22050
|
9 |
+
text_encoder_input_size: 512
|
10 |
+
llm_input_size: 1024
|
11 |
+
llm_output_size: 1024
|
12 |
+
spk_embed_dim: 192
|
13 |
+
## for audio branch
|
14 |
+
is_word_level: True
|
15 |
+
add_eos: True
|
16 |
+
## add drop eos before llm functionality
|
17 |
+
drop_eos_before_llm: False
|
18 |
+
audio_embed_dim: 1280
|
19 |
+
audio_token_encoder_input_size: 512
|
20 |
+
whisper_tokenizer_fpath: /path/to/your/RTSLM_STORAGE_DIR/pretrained_models/distil-whisper-large-v3 # requires modification
|
21 |
+
# training & dataloading commonly used params
|
22 |
+
max_frames_in_batch: 16000 # original: 16000 (bsz~48)
|
23 |
+
accum_grad: 2
|
24 |
+
|
25 |
+
# model params
|
26 |
+
# for all class/function included in this repo, we use !<name> or !<new> for intialization, so that user may find all corresponding class/function according to one single yaml.
|
27 |
+
# for system/third_party class/function, we do not require this.
|
28 |
+
llm: !new:cosyvoice.llm.audio_llm.TransformerJointLM
|
29 |
+
load_partial_list: [] # fully loaded
|
30 |
+
# 'text_encoder',
|
31 |
+
# 'llm',
|
32 |
+
# 'llm_decoder',
|
33 |
+
# 'audio_tokenizer', # add this would probably simulate fully loaded
|
34 |
+
# 'audio_token_encoder',
|
35 |
+
# 'audio_embed_affine_layer',
|
36 |
+
|
37 |
+
freeze_partial_list: [
|
38 |
+
'audio_tokenizer.audio_joint_encoder_segmenter.audio_encoder',
|
39 |
+
'audio_tokenizer.audio_joint_encoder_segmenter.audio_segmenter.decoder.embed',
|
40 |
+
'audio_tokenizer.audio_joint_encoder_segmenter.audio_segmenter.decoder.layers.0',
|
41 |
+
]
|
42 |
+
freeze_partial_during_init: True
|
43 |
+
text_encoder_input_size: !ref <text_encoder_input_size>
|
44 |
+
llm_input_size: !ref <llm_input_size>
|
45 |
+
llm_output_size: !ref <llm_output_size>
|
46 |
+
text_token_size: 51866
|
47 |
+
speech_token_size: 4096
|
48 |
+
length_normalized_loss: True
|
49 |
+
lsm_weight: 0
|
50 |
+
spk_embed_dim: !ref <spk_embed_dim>
|
51 |
+
# for audio branch
|
52 |
+
audio_embed_dim: !ref <audio_embed_dim>
|
53 |
+
audio_token_encoder_input_size: !ref <audio_token_encoder_input_size>
|
54 |
+
is_word_level: !ref <is_word_level>
|
55 |
+
drop_eos_before_llm: !ref <drop_eos_before_llm>
|
56 |
+
fuse_encoded_audio_text_type: 'weighted_sum'
|
57 |
+
fuse_encoded_audio_text_kwargs:
|
58 |
+
normalize: False
|
59 |
+
use_trainable_weight: True
|
60 |
+
use_layer_norm: False
|
61 |
+
weight_init_type: 'balance'
|
62 |
+
audio_tokenizer: !new:cosyvoice.audio.audio_tokenizer.JointEncoderSegmenterAudioTokenizer
|
63 |
+
audio_joint_encoder_segmenter: !new:cosyvoice.audio.audio_joint_encoder_segmenter.WhisperAudioJointEncoderSegmenter
|
64 |
+
model_name_or_path: !ref <whisper_tokenizer_fpath>
|
65 |
+
attn_implementation: eager
|
66 |
+
# attn_implementation: flash_attention_2
|
67 |
+
# dtype: bfloat16
|
68 |
+
dtype: float32
|
69 |
+
use_custom: True
|
70 |
+
forward_type: asr_attn_pooling
|
71 |
+
make_v_proj_identity: True
|
72 |
+
is_word_level: !ref <is_word_level>
|
73 |
+
skip_prefix_idx: 4 # skip bos (0), task_id (1), lang_id (2), no-timestamp (3), start from idx=4
|
74 |
+
# skip_postfix_idx: -1 # skip eos (-1), currently unsupported
|
75 |
+
audio_quantizer: !new:cosyvoice.audio.audio_quantizer.RVQAudioQuantizer
|
76 |
+
dim: !ref <audio_embed_dim>
|
77 |
+
num_quantizers: 4
|
78 |
+
codebook_dim: 256
|
79 |
+
codebook_size: 512
|
80 |
+
decay: 0.99
|
81 |
+
quantize_dropout: True
|
82 |
+
kmeans_init: True
|
83 |
+
# audio token encoder is parallel with the text_encoder below
|
84 |
+
audio_token_encoder: !new:cosyvoice.transformer.encoder.ConformerEncoder
|
85 |
+
input_size: !ref <audio_token_encoder_input_size>
|
86 |
+
output_size: 1024
|
87 |
+
attention_heads: 8
|
88 |
+
linear_units: 2048
|
89 |
+
num_blocks: 2
|
90 |
+
dropout_rate: 0.1
|
91 |
+
positional_dropout_rate: 0.1
|
92 |
+
attention_dropout_rate: 0
|
93 |
+
normalize_before: True
|
94 |
+
input_layer: 'linear'
|
95 |
+
pos_enc_layer_type: 'rel_pos_espnet'
|
96 |
+
selfattention_layer_type: 'rel_selfattn'
|
97 |
+
use_cnn_module: False
|
98 |
+
macaron_style: False
|
99 |
+
use_dynamic_chunk: False
|
100 |
+
use_dynamic_left_chunk: False
|
101 |
+
static_chunk_size: 1
|
102 |
+
# end of audio branch
|
103 |
+
text_encoder: !new:cosyvoice.transformer.encoder.ConformerEncoder
|
104 |
+
input_size: !ref <text_encoder_input_size>
|
105 |
+
output_size: 1024
|
106 |
+
attention_heads: 8
|
107 |
+
linear_units: 2048
|
108 |
+
num_blocks: 3
|
109 |
+
dropout_rate: 0.1
|
110 |
+
positional_dropout_rate: 0.1
|
111 |
+
attention_dropout_rate: 0
|
112 |
+
normalize_before: True
|
113 |
+
input_layer: 'linear'
|
114 |
+
pos_enc_layer_type: 'rel_pos_espnet'
|
115 |
+
selfattention_layer_type: 'rel_selfattn'
|
116 |
+
use_cnn_module: False
|
117 |
+
macaron_style: False
|
118 |
+
use_dynamic_chunk: False
|
119 |
+
use_dynamic_left_chunk: False
|
120 |
+
static_chunk_size: 1
|
121 |
+
llm: !new:cosyvoice.transformer.encoder.TransformerEncoder
|
122 |
+
input_size: !ref <llm_input_size>
|
123 |
+
output_size: !ref <llm_output_size>
|
124 |
+
attention_heads: 8
|
125 |
+
linear_units: 2048
|
126 |
+
num_blocks: 7
|
127 |
+
dropout_rate: 0.1
|
128 |
+
positional_dropout_rate: 0.1
|
129 |
+
attention_dropout_rate: 0
|
130 |
+
input_layer: 'linear_legacy'
|
131 |
+
pos_enc_layer_type: 'rel_pos_espnet'
|
132 |
+
selfattention_layer_type: 'rel_selfattn'
|
133 |
+
static_chunk_size: 1
|
134 |
+
|
135 |
+
flow: !new:cosyvoice.flow.flow.MaskedDiffWithXvec
|
136 |
+
input_size: 512
|
137 |
+
output_size: 80
|
138 |
+
spk_embed_dim: !ref <spk_embed_dim>
|
139 |
+
output_type: 'mel'
|
140 |
+
vocab_size: 4096
|
141 |
+
input_frame_rate: 50
|
142 |
+
only_mask_loss: True
|
143 |
+
encoder: !new:cosyvoice.transformer.encoder.ConformerEncoder
|
144 |
+
output_size: 512
|
145 |
+
attention_heads: 8
|
146 |
+
linear_units: 2048
|
147 |
+
num_blocks: 6
|
148 |
+
dropout_rate: 0.1
|
149 |
+
positional_dropout_rate: 0.1
|
150 |
+
attention_dropout_rate: 0.1
|
151 |
+
normalize_before: True
|
152 |
+
input_layer: 'linear'
|
153 |
+
pos_enc_layer_type: 'rel_pos_espnet'
|
154 |
+
selfattention_layer_type: 'rel_selfattn'
|
155 |
+
input_size: 512
|
156 |
+
use_cnn_module: False
|
157 |
+
macaron_style: False
|
158 |
+
length_regulator: !new:cosyvoice.flow.length_regulator.InterpolateRegulator
|
159 |
+
channels: 80
|
160 |
+
sampling_ratios: [1, 1, 1, 1]
|
161 |
+
decoder: !new:cosyvoice.flow.flow_matching.ConditionalCFM
|
162 |
+
in_channels: 240
|
163 |
+
n_spks: 1
|
164 |
+
spk_emb_dim: 80
|
165 |
+
cfm_params: !new:omegaconf.DictConfig
|
166 |
+
content:
|
167 |
+
sigma_min: 1e-06
|
168 |
+
solver: 'euler'
|
169 |
+
t_scheduler: 'cosine'
|
170 |
+
training_cfg_rate: 0.2
|
171 |
+
inference_cfg_rate: 0.7
|
172 |
+
reg_loss_type: 'l1'
|
173 |
+
estimator: !new:cosyvoice.flow.decoder.ConditionalDecoder
|
174 |
+
in_channels: 320
|
175 |
+
out_channels: 80
|
176 |
+
channels: [256, 256]
|
177 |
+
dropout: 0
|
178 |
+
attention_head_dim: 64
|
179 |
+
n_blocks: 4
|
180 |
+
num_mid_blocks: 12
|
181 |
+
num_heads: 8
|
182 |
+
act_fn: 'gelu'
|
183 |
+
|
184 |
+
hift: !new:cosyvoice.hifigan.generator.HiFTGenerator
|
185 |
+
in_channels: 80
|
186 |
+
base_channels: 512
|
187 |
+
nb_harmonics: 8
|
188 |
+
sampling_rate: !ref <sample_rate>
|
189 |
+
nsf_alpha: 0.1
|
190 |
+
nsf_sigma: 0.003
|
191 |
+
nsf_voiced_threshold: 10
|
192 |
+
upsample_rates: [8, 8]
|
193 |
+
upsample_kernel_sizes: [16, 16]
|
194 |
+
istft_params:
|
195 |
+
n_fft: 16
|
196 |
+
hop_len: 4
|
197 |
+
resblock_kernel_sizes: [3, 7, 11]
|
198 |
+
resblock_dilation_sizes: [[1, 3, 5], [1, 3, 5], [1, 3, 5]]
|
199 |
+
source_resblock_kernel_sizes: [7, 11]
|
200 |
+
source_resblock_dilation_sizes: [[1, 3, 5], [1, 3, 5]]
|
201 |
+
lrelu_slope: 0.1
|
202 |
+
audio_limit: 0.99
|
203 |
+
f0_predictor: !new:cosyvoice.hifigan.f0_predictor.ConvRNNF0Predictor
|
204 |
+
num_class: 1
|
205 |
+
in_channels: 80
|
206 |
+
cond_channels: 512
|
207 |
+
|
208 |
+
# processor functions
|
209 |
+
parquet_opener: !name:cosyvoice.dataset.processor.parquet_opener
|
210 |
+
get_tokenizer: !name:whisper.tokenizer.get_tokenizer
|
211 |
+
multilingual: True
|
212 |
+
num_languages: 100
|
213 |
+
language: 'en'
|
214 |
+
task: 'transcribe'
|
215 |
+
allowed_special: 'all'
|
216 |
+
tokenize: !name:cosyvoice.dataset.processor.tokenize_by_words
|
217 |
+
get_tokenizer: !ref <get_tokenizer>
|
218 |
+
allowed_special: !ref <allowed_special>
|
219 |
+
use_asr_text: True
|
220 |
+
tokenize_whisper: !name:cosyvoice.dataset.processor.tokenize_whisper
|
221 |
+
whisper_tokenizer_name_or_fpath: !ref <whisper_tokenizer_fpath>
|
222 |
+
task: 'transcribe'
|
223 |
+
language: 'en'
|
224 |
+
no_timestamps: True
|
225 |
+
add_bos: True
|
226 |
+
add_eos: !ref <add_eos>
|
227 |
+
use_asr_text: True
|
228 |
+
overwrite_text_token: True
|
229 |
+
use_wrapped: True
|
230 |
+
filter: !name:cosyvoice.dataset.processor.filter
|
231 |
+
max_length: 40960
|
232 |
+
min_length: 0
|
233 |
+
token_max_length: 200
|
234 |
+
token_min_length: 1
|
235 |
+
resample: !name:cosyvoice.dataset.processor.resample
|
236 |
+
resample_rate: !ref <sample_rate>
|
237 |
+
feat_extractor: !name:matcha.utils.audio.mel_spectrogram
|
238 |
+
n_fft: 1024
|
239 |
+
num_mels: 80
|
240 |
+
sampling_rate: !ref <sample_rate>
|
241 |
+
hop_size: 256
|
242 |
+
win_size: 1024
|
243 |
+
fmin: 0
|
244 |
+
fmax: 8000
|
245 |
+
center: False
|
246 |
+
# audio_extractor: !new:cosyvoice.audio.audio_extractor.WhisperAudioExtractor
|
247 |
+
# model_name_or_path: "/proj/mtklmadm/dev/mtk53678/rtslm_storage/pretrained_models/whisper-large-v3"
|
248 |
+
# pad_to_whisper_input_size: False
|
249 |
+
# use_orig_length: True
|
250 |
+
audio_extractor: !new:funasr.frontends.whisper_frontend.WhisperFrontend
|
251 |
+
whisper_model: large-v3
|
252 |
+
do_pad_trim: True
|
253 |
+
permute: True
|
254 |
+
# audio_encoder: !new:cosyvoice.audio.audio_encoder.SenseVoiceAudioEncoder
|
255 |
+
# model_card: "/proj/mtklmadm/dev/mtk53678/rtslm_storage/pretrained_models/SenseVoiceSmall"
|
256 |
+
# model_code_dir: "/proj/mtklmadm/dev/mtk53678/rtslm/CosyVoice/cosyvoice/audio/customized_sensevoice/model.py"
|
257 |
+
# hub: "ms"
|
258 |
+
# audio_extractor: !ref <audio_encoder.frontend>
|
259 |
+
extract_audio: !name:cosyvoice.dataset.processor.extract_audio
|
260 |
+
# get_audio_extractor: !ref <get_audio_extractor>
|
261 |
+
audio_extractor: !ref <audio_extractor>
|
262 |
+
target_sample_rate: 16_000
|
263 |
+
# Maybe we should add prepending sensevoice tokens here.
|
264 |
+
compute_fbank: !name:cosyvoice.dataset.processor.compute_fbank
|
265 |
+
feat_extractor: !ref <feat_extractor>
|
266 |
+
parse_embedding: !name:cosyvoice.dataset.processor.parse_embedding
|
267 |
+
normalize: True
|
268 |
+
shuffle: !name:cosyvoice.dataset.processor.shuffle
|
269 |
+
shuffle_size: 1000
|
270 |
+
sort: !name:cosyvoice.dataset.processor.sort
|
271 |
+
sort_size: 500 # sort_size should be less than shuffle_size
|
272 |
+
batch: !name:cosyvoice.dataset.processor.batch
|
273 |
+
batch_type: 'dynamic'
|
274 |
+
max_frames_in_batch: !ref <max_frames_in_batch> # 4800
|
275 |
+
padding: !name:cosyvoice.dataset.processor.padding
|
276 |
+
use_spk_embedding: False # change to True during sft
|
277 |
+
has_audio_branch: True # add audio branch related padding
|
278 |
+
use_asr_text: False # avoid directly using asr text and alignments for compatibility
|
279 |
+
use_auto_audio_len: False
|
280 |
+
requires_words_index: !ref <is_word_level> # for word-level audio token
|
281 |
+
|
282 |
+
# dataset processor pipeline
|
283 |
+
data_pipeline: [
|
284 |
+
!ref <parquet_opener>,
|
285 |
+
!ref <tokenize>, # using tokenize_whisper can skip this
|
286 |
+
!ref <tokenize_whisper>,
|
287 |
+
!ref <filter>,
|
288 |
+
!ref <extract_audio>, # added for audio branch, NOTE: should be in front of resample and compute fbank!!
|
289 |
+
!ref <resample>,
|
290 |
+
!ref <compute_fbank>,
|
291 |
+
!ref <parse_embedding>,
|
292 |
+
!ref <shuffle>,
|
293 |
+
!ref <sort>,
|
294 |
+
!ref <batch>,
|
295 |
+
!ref <padding>,
|
296 |
+
]
|
297 |
+
|
298 |
+
# train conf
|
299 |
+
train_conf:
|
300 |
+
optim: adam
|
301 |
+
optim_conf:
|
302 |
+
lr: 0.00016 # change to 0.001 if you want to train flow from scratch
|
303 |
+
scheduler: warmuplr
|
304 |
+
scheduler_conf:
|
305 |
+
# warmup_steps: 25000
|
306 |
+
warmup_steps: 5000
|
307 |
+
# max_epoch: 200
|
308 |
+
max_epoch: 3
|
309 |
+
grad_clip: 5
|
310 |
+
accum_grad: !ref <accum_grad> # 2
|
311 |
+
log_interval: 100
|
312 |
+
save_per_step: 2000
|
checkpoints/text-only_baseline/checkpoint_best.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e75ab1a4d8c6592de30b4ee9add5225056faeff2ab78f03c9a19d3d57b38ae23
|
3 |
+
size 529227076
|
checkpoints/text-only_baseline/checkpoint_best.yaml
ADDED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
accum_grad: 2
|
2 |
+
batch_idx: 2322
|
3 |
+
checkpoint: /proj/mtklmadm/dev/mtk53678/rtslm_storage/code/rtslm/CosyVoice/examples/emilia/taste/exp/llm/torch_ddp/text-only_baseline/checkpoint_best.pt
|
4 |
+
config: /proj/mtklmadm/dev/mtk53678/rtslm_storage/code/rtslm/CosyVoice/examples/emilia/taste/conf/text-only_baseline_contd.yaml
|
5 |
+
cv_data: /proj/mtklmadm/dev/mtk53678/rtslm_storage/code/rtslm/CosyVoice/examples/emilia/taste/data/dev.data.list
|
6 |
+
deepscale: false
|
7 |
+
deepscale_config: null
|
8 |
+
deepspeed: false
|
9 |
+
deepspeed_config: ./conf/customized_ds.json
|
10 |
+
dist_backend: nccl
|
11 |
+
dtype: fp32
|
12 |
+
epoch: 1
|
13 |
+
grad_clip: 5
|
14 |
+
grad_norm: !!python/object/apply:torch._utils._rebuild_tensor_v2
|
15 |
+
- !!python/object/apply:torch.storage._load_from_bytes
|
16 |
+
- !!binary |
|
17 |
+
gAKKCmz8nEb5IGqoUBkugAJN6QMugAJ9cQAoWBAAAABwcm90b2NvbF92ZXJzaW9ucQFN6QNYDQAA
|
18 |
+
AGxpdHRsZV9lbmRpYW5xAohYCgAAAHR5cGVfc2l6ZXNxA31xBChYBQAAAHNob3J0cQVLAlgDAAAA
|
19 |
+
aW50cQZLBFgEAAAAbG9uZ3EHSwR1dS6AAihYBwAAAHN0b3JhZ2VxAGN0b3JjaApGbG9hdFN0b3Jh
|
20 |
+
Z2UKcQFYCQAAADQ5NjU1NzI4MHECWAYAAABjdWRhOjBxA0sBTnRxBFEugAJdcQBYCQAAADQ5NjU1
|
21 |
+
NzI4MHEBYS4BAAAAAAAAACAE0T0=
|
22 |
+
- 0
|
23 |
+
- !!python/tuple []
|
24 |
+
- !!python/tuple []
|
25 |
+
- false
|
26 |
+
- !!python/object/apply:collections.OrderedDict
|
27 |
+
- []
|
28 |
+
log_interval: 100
|
29 |
+
loss_dict:
|
30 |
+
acc: 0.3084577530809149
|
31 |
+
len: 0.0
|
32 |
+
loss: 2.7354950856894007
|
33 |
+
lr: 5.929224290931882e-05
|
34 |
+
max_epoch: 2
|
35 |
+
model: llm
|
36 |
+
model_dir: /proj/mtklmadm/dev/mtk53678/rtslm/CosyVoice/examples/emilia/taste/exp/llm/torch_ddp/text-only_baseline_contd
|
37 |
+
num_workers: 4
|
38 |
+
optim: adam
|
39 |
+
optim_conf:
|
40 |
+
lr: 0.00015
|
41 |
+
pin_memory: true
|
42 |
+
prefetch: 128
|
43 |
+
save_per_step: 4000
|
44 |
+
save_states: model+optimizer
|
45 |
+
save_time: 10/02/2025 09:14:22
|
46 |
+
scheduler: warmuplr
|
47 |
+
scheduler_conf:
|
48 |
+
warmup_steps: 10000
|
49 |
+
step: 63999
|
50 |
+
tag: CV
|
51 |
+
tensorboard_dir: /proj/mtklmadm/dev/mtk53678/rtslm/CosyVoice/examples/emilia/taste/tensorboard/llm/torch_ddp/text-only_baseline_contd
|
52 |
+
timeout: 30
|
53 |
+
train_data: /proj/mtklmadm/dev/mtk53678/rtslm_storage/code/rtslm/CosyVoice/examples/emilia/taste/data/train_with_libritts.data.list
|
54 |
+
train_engine: torch_ddp
|
checkpoints/text-only_baseline/config.yaml
ADDED
@@ -0,0 +1,214 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# set random seed, so that you may reproduce your result.
|
2 |
+
__set_seed1: !apply:random.seed [1986]
|
3 |
+
__set_seed2: !apply:numpy.random.seed [1986]
|
4 |
+
__set_seed3: !apply:torch.manual_seed [1986]
|
5 |
+
__set_seed4: !apply:torch.cuda.manual_seed_all [1986]
|
6 |
+
|
7 |
+
# fixed params
|
8 |
+
sample_rate: 22050
|
9 |
+
text_encoder_input_size: 512
|
10 |
+
llm_input_size: 1024
|
11 |
+
llm_output_size: 1024
|
12 |
+
spk_embed_dim: 192
|
13 |
+
# others
|
14 |
+
# add_eos: True
|
15 |
+
whisper_tokenizer_fpath: /path/to/your/RTSLM_STORAGE_DIR/pretrained_models/distil-whisper-large-v3 # requires modification
|
16 |
+
|
17 |
+
|
18 |
+
# model params
|
19 |
+
# for all class/function included in this repo, we use !<name> or !<new> for intialization, so that user may find all corresponding class/function according to one single yaml.
|
20 |
+
# for system/third_party class/function, we do not require this.
|
21 |
+
llm: !new:cosyvoice.llm.llm.TransformerLM
|
22 |
+
text_encoder_input_size: !ref <text_encoder_input_size>
|
23 |
+
llm_input_size: !ref <llm_input_size>
|
24 |
+
llm_output_size: !ref <llm_output_size>
|
25 |
+
text_token_size: 51866
|
26 |
+
speech_token_size: 4096
|
27 |
+
length_normalized_loss: True
|
28 |
+
lsm_weight: 0
|
29 |
+
spk_embed_dim: !ref <spk_embed_dim>
|
30 |
+
text_encoder: !new:cosyvoice.transformer.encoder.ConformerEncoder
|
31 |
+
input_size: !ref <text_encoder_input_size>
|
32 |
+
output_size: 1024
|
33 |
+
attention_heads: 8
|
34 |
+
linear_units: 2048
|
35 |
+
num_blocks: 3
|
36 |
+
dropout_rate: 0.1
|
37 |
+
positional_dropout_rate: 0.1
|
38 |
+
attention_dropout_rate: 0
|
39 |
+
normalize_before: True
|
40 |
+
input_layer: 'linear'
|
41 |
+
pos_enc_layer_type: 'rel_pos_espnet'
|
42 |
+
selfattention_layer_type: 'rel_selfattn'
|
43 |
+
use_cnn_module: False
|
44 |
+
macaron_style: False
|
45 |
+
use_dynamic_chunk: False
|
46 |
+
use_dynamic_left_chunk: False
|
47 |
+
static_chunk_size: 1
|
48 |
+
llm: !new:cosyvoice.transformer.encoder.TransformerEncoder
|
49 |
+
input_size: !ref <llm_input_size>
|
50 |
+
output_size: !ref <llm_output_size>
|
51 |
+
attention_heads: 8
|
52 |
+
linear_units: 2048
|
53 |
+
num_blocks: 7
|
54 |
+
dropout_rate: 0.1
|
55 |
+
positional_dropout_rate: 0.1
|
56 |
+
attention_dropout_rate: 0
|
57 |
+
input_layer: 'linear_legacy'
|
58 |
+
pos_enc_layer_type: 'rel_pos_espnet'
|
59 |
+
selfattention_layer_type: 'rel_selfattn'
|
60 |
+
static_chunk_size: 1
|
61 |
+
|
62 |
+
flow: !new:cosyvoice.flow.flow.MaskedDiffWithXvec
|
63 |
+
input_size: 512
|
64 |
+
output_size: 80
|
65 |
+
spk_embed_dim: !ref <spk_embed_dim>
|
66 |
+
output_type: 'mel'
|
67 |
+
vocab_size: 4096
|
68 |
+
input_frame_rate: 50
|
69 |
+
only_mask_loss: True
|
70 |
+
encoder: !new:cosyvoice.transformer.encoder.ConformerEncoder
|
71 |
+
output_size: 512
|
72 |
+
attention_heads: 8
|
73 |
+
linear_units: 2048
|
74 |
+
num_blocks: 6
|
75 |
+
dropout_rate: 0.1
|
76 |
+
positional_dropout_rate: 0.1
|
77 |
+
attention_dropout_rate: 0.1
|
78 |
+
normalize_before: True
|
79 |
+
input_layer: 'linear'
|
80 |
+
pos_enc_layer_type: 'rel_pos_espnet'
|
81 |
+
selfattention_layer_type: 'rel_selfattn'
|
82 |
+
input_size: 512
|
83 |
+
use_cnn_module: False
|
84 |
+
macaron_style: False
|
85 |
+
length_regulator: !new:cosyvoice.flow.length_regulator.InterpolateRegulator
|
86 |
+
channels: 80
|
87 |
+
sampling_ratios: [1, 1, 1, 1]
|
88 |
+
decoder: !new:cosyvoice.flow.flow_matching.ConditionalCFM
|
89 |
+
in_channels: 240
|
90 |
+
n_spks: 1
|
91 |
+
spk_emb_dim: 80
|
92 |
+
cfm_params: !new:omegaconf.DictConfig
|
93 |
+
content:
|
94 |
+
sigma_min: 1e-06
|
95 |
+
solver: 'euler'
|
96 |
+
t_scheduler: 'cosine'
|
97 |
+
training_cfg_rate: 0.2
|
98 |
+
inference_cfg_rate: 0.7
|
99 |
+
reg_loss_type: 'l1'
|
100 |
+
estimator: !new:cosyvoice.flow.decoder.ConditionalDecoder
|
101 |
+
in_channels: 320
|
102 |
+
out_channels: 80
|
103 |
+
channels: [256, 256]
|
104 |
+
dropout: 0
|
105 |
+
attention_head_dim: 64
|
106 |
+
n_blocks: 4
|
107 |
+
num_mid_blocks: 12
|
108 |
+
num_heads: 8
|
109 |
+
act_fn: 'gelu'
|
110 |
+
|
111 |
+
hift: !new:cosyvoice.hifigan.generator.HiFTGenerator
|
112 |
+
in_channels: 80
|
113 |
+
base_channels: 512
|
114 |
+
nb_harmonics: 8
|
115 |
+
sampling_rate: !ref <sample_rate>
|
116 |
+
nsf_alpha: 0.1
|
117 |
+
nsf_sigma: 0.003
|
118 |
+
nsf_voiced_threshold: 10
|
119 |
+
upsample_rates: [8, 8]
|
120 |
+
upsample_kernel_sizes: [16, 16]
|
121 |
+
istft_params:
|
122 |
+
n_fft: 16
|
123 |
+
hop_len: 4
|
124 |
+
resblock_kernel_sizes: [3, 7, 11]
|
125 |
+
resblock_dilation_sizes: [[1, 3, 5], [1, 3, 5], [1, 3, 5]]
|
126 |
+
source_resblock_kernel_sizes: [7, 11]
|
127 |
+
source_resblock_dilation_sizes: [[1, 3, 5], [1, 3, 5]]
|
128 |
+
lrelu_slope: 0.1
|
129 |
+
audio_limit: 0.99
|
130 |
+
f0_predictor: !new:cosyvoice.hifigan.f0_predictor.ConvRNNF0Predictor
|
131 |
+
num_class: 1
|
132 |
+
in_channels: 80
|
133 |
+
cond_channels: 512
|
134 |
+
|
135 |
+
# processor functions
|
136 |
+
parquet_opener: !name:cosyvoice.dataset.processor.parquet_opener
|
137 |
+
get_tokenizer: !name:whisper.tokenizer.get_tokenizer
|
138 |
+
multilingual: True
|
139 |
+
num_languages: 100
|
140 |
+
language: 'en'
|
141 |
+
task: 'transcribe'
|
142 |
+
allowed_special: 'all'
|
143 |
+
tokenize: !name:cosyvoice.dataset.processor.tokenize_by_words
|
144 |
+
get_tokenizer: !ref <get_tokenizer>
|
145 |
+
allowed_special: !ref <allowed_special>
|
146 |
+
use_asr_text: True
|
147 |
+
# tokenize_whisper: !name:cosyvoice.dataset.processor.tokenize_whisper
|
148 |
+
# whisper_tokenizer_name_or_fpath: !ref <whisper_tokenizer_fpath>
|
149 |
+
# task: 'transcribe'
|
150 |
+
# language: 'en'
|
151 |
+
# no_timestamps: True
|
152 |
+
# add_bos: True
|
153 |
+
# add_eos: !ref <add_eos>
|
154 |
+
# use_asr_text: True
|
155 |
+
# overwrite_text_token: True
|
156 |
+
# use_wrapped: True
|
157 |
+
filter: !name:cosyvoice.dataset.processor.filter
|
158 |
+
max_length: 40960
|
159 |
+
min_length: 0
|
160 |
+
token_max_length: 200
|
161 |
+
token_min_length: 1
|
162 |
+
resample: !name:cosyvoice.dataset.processor.resample
|
163 |
+
resample_rate: !ref <sample_rate>
|
164 |
+
feat_extractor: !name:matcha.utils.audio.mel_spectrogram
|
165 |
+
n_fft: 1024
|
166 |
+
num_mels: 80
|
167 |
+
sampling_rate: !ref <sample_rate>
|
168 |
+
hop_size: 256
|
169 |
+
win_size: 1024
|
170 |
+
fmin: 0
|
171 |
+
fmax: 8000
|
172 |
+
center: False
|
173 |
+
compute_fbank: !name:cosyvoice.dataset.processor.compute_fbank
|
174 |
+
feat_extractor: !ref <feat_extractor>
|
175 |
+
parse_embedding: !name:cosyvoice.dataset.processor.parse_embedding
|
176 |
+
normalize: True
|
177 |
+
shuffle: !name:cosyvoice.dataset.processor.shuffle
|
178 |
+
shuffle_size: 1000
|
179 |
+
sort: !name:cosyvoice.dataset.processor.sort
|
180 |
+
sort_size: 500 # sort_size should be less than shuffle_size
|
181 |
+
batch: !name:cosyvoice.dataset.processor.batch
|
182 |
+
batch_type: 'dynamic'
|
183 |
+
max_frames_in_batch: 20000
|
184 |
+
padding: !name:cosyvoice.dataset.processor.padding
|
185 |
+
use_spk_embedding: False # change to True during sft
|
186 |
+
|
187 |
+
# dataset processor pipeline
|
188 |
+
data_pipeline: [
|
189 |
+
!ref <parquet_opener>,
|
190 |
+
!ref <tokenize>,
|
191 |
+
# !ref <tokenize_whisper>,
|
192 |
+
!ref <filter>,
|
193 |
+
!ref <resample>,
|
194 |
+
!ref <compute_fbank>,
|
195 |
+
!ref <parse_embedding>,
|
196 |
+
!ref <shuffle>,
|
197 |
+
!ref <sort>,
|
198 |
+
!ref <batch>,
|
199 |
+
!ref <padding>,
|
200 |
+
]
|
201 |
+
|
202 |
+
# train conf
|
203 |
+
train_conf:
|
204 |
+
optim: adam
|
205 |
+
optim_conf:
|
206 |
+
lr: 0.00015 # change to 0.001 if you want to train flow from scratch
|
207 |
+
scheduler: warmuplr
|
208 |
+
scheduler_conf:
|
209 |
+
warmup_steps: 10000
|
210 |
+
max_epoch: 2
|
211 |
+
grad_clip: 5
|
212 |
+
accum_grad: 2
|
213 |
+
log_interval: 100
|
214 |
+
save_per_step: 4000
|