尊敬的项目组:
你们好,今天在用贵项目组的MOSS-TTS Local Transformer v1.5 在win下进行微调,运行完数据预处理,进行最终微调训练时,出现如下错误:
D:\ai\MOSS-TTS\moss_tts_local_v1.5\finetuning>"D:\ai\MOSS-TTS\py312\Scripts\accelerate.exe" launch --mixed_precision bf16 sft.py --model-path "D:\ai\MOSS-TTS\autodl-tmp\models\MOSS-TTS-Local-Transformer-v1.5" --codec-path "D:\ai\MOSS-TTS\autodl-tmp\models\MOSS-Audio-Tokenizer-v2" --codec-weight-dtype fp32 --codec-compute-dtype bf16 --train-jsonl "D:\ai\MOSS-TTS\autodl-tmp\data1.5\train_with_codes.jsonl" --output-dir "D:\ai\MOSS-TTS\autodl-tmp\output\moss_tts_local_v1_5_sft" --per-device-batch-size 1 --gradient-accumulation-steps 8 --learning-rate 1.0e-5 --warmup-ratio 0.03 --lr-scheduler-type constant --num-epochs 3 --mixed-precision bf16 --channelwise-loss-weight 1,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665 --gradient-checkpointing --attn-implementation flash_attention_2 --skip-nonfinite-batches
The following values were not passed to accelerate launch and had defaults used instead:
--num_processes was set to a value of 1
--num_machines was set to a value of 1
--dynamo_backend was set to a value of 'no'
To avoid this warning pass in values for each of the problematic parameters or run accelerate config.
[2026-06-27 23:22:05] [sft] global_batch_size=1 x 1 x 8 = 8
[2026-06-27 23:22:05] [sft] distributed_type=DistributedType.NO num_processes=1 using_pre_sharded_files=False train_files=1 local_train_files=1 local_train_records=71
The tokenizer you are loading from 'D:\ai\MOSS-TTS\autodl-tmp\models\MOSS-TTS-Local-Transformer-v1.5' with an incorrect regex pattern: https://huggingface.co/mistralai/Mistral-Small-3.1-24B-Instruct-2503/discussions/84#69121093e8b480e709447d5e. This will lead to incorrect tokenization. You should set the fix_mistral_regex=True flag when loading this tokenizer to fix this issue.
Loading weights: 100%|████████████████| 438/438 [00:00<00:00, 4335.92it/s, Materializing param=transformer.norm.weight]
[2026-06-27 23:22:06] [sft] attn=flash_attention_2 model_dtype=torch.bfloat16 n_vq=12 channelwise_loss_weight=[1.0, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665] gradient_checkpointing=True gradient_checkpointing_impl=module_wrapper gradient_checkpointing_scope=global gradient_checkpointing_use_reentrant=False
[2026-06-27 23:22:09] [sft] scheduler=constant warmup_steps=1 local_micro_batches_per_epoch=71 micro_batches_per_epoch=71 dropped_local_micro_batches_per_epoch=0 optimizer_steps_per_epoch=9 max_train_steps=27
[2026-06-27 23:23:14] [sft] warning: Non-finite gradient norm at epoch=0 global_step=0: nan. first_nonfinite_grad=transformer.embed_tokens.weight bad=388956160/388956160 dtype=torch.bfloat16 shape=(151936, 2560); record_ids=['29', '40', '65', '70', '1', '33', '18', '56']; skipped
[2026-06-27 23:24:20] [sft] warning: Non-finite gradient norm at epoch=0 global_step=0: nan. first_nonfinite_grad=transformer.embed_tokens.weight bad=388956160/388956160 dtype=torch.bfloat16 shape=(151936, 2560); record_ids=['67', '28', '25', '3', '23', '6', '34', '14']; skipped
[2026-06-27 23:25:27] [sft] warning: Non-finite gradient norm at epoch=0 global_step=0: nan. first_nonfinite_grad=transformer.embed_tokens.weight bad=388956160/388956160 dtype=torch.bfloat16 shape=(151936, 2560); record_ids=['32', '66', '31', '41', '8', '51', '13', '22']; skipped
[2026-06-27 23:26:24] [sft] warning: Non-finite gradient norm at epoch=0 global_step=0: nan. first_nonfinite_grad=transformer.embed_tokens.weight bad=388956160/388956160 dtype=torch.bfloat16 shape=(151936, 2560); record_ids=['44', '45', '61', '68', '4', '20', '64', '50']; skipped
[2026-06-27 23:27:22] [sft] warning: Non-finite gradient norm at epoch=0 global_step=0: nan. first_nonfinite_grad=transformer.embed_tokens.weight bad=388956160/388956160 dtype=torch.bfloat16 shape=(151936, 2560); record_ids=['57', '2', '0', '11', '15', '19', '36', '38']; skipped
ient_checkpointing=True gradient_checkpointing_impl=module_wrapper gradient_checkpointing_scope=global gradient_checkpointing_use_reentrant=False
[2026-06-27 23:32:45] [sft] scheduler=constant warmup_steps=0 local_micro_batches_per_epoch=71 micro_batches_per_epoch=71 dropped_local_micro_batches_per_epoch=0 optimizer_steps_per_epoch=9 max_train_steps=27
Traceback (most recent call last):
File "D:\ai\MOSS-TTS\moss_tts_local_v1.5\finetuning\sft.py", line 1173, in
main()
File "D:\ai\MOSS-TTS\moss_tts_local_v1.5\finetuning\sft.py", line 1107, in main
raise FloatingPointError(message)
FloatingPointError: Non-finite gradient norm at epoch=0 global_step=0: nan. first_nonfinite_grad=transformer.embed_tokens.weight bad=388956160/388956160 dtype=torch.bfloat16 shape=(151936, 2560); record_ids=['29', '40', '65', '70', '1', '33', '18', '56']
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "D:\ai\MOSS-TTS\py312\Scripts\accelerate.exe_main.py", line 5, in
File "D:\ai\MOSS-TTS\py312\Lib\site-packages\accelerate\commands\accelerate_cli.py", line 50, in main
args.func(args)
File "D:\ai\MOSS-TTS\py312\Lib\site-packages\accelerate\commands\launch.py", line 1407, in launch_command
simple_launcher(args)
File "D:\ai\MOSS-TTS\py312\Lib\site-packages\accelerate\commands\launch.py", line 993, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['D:\ai\MOSS-TTS\py312\python.exe', 'sft.py', '--model-path', 'D:\ai\MOSS-TTS\autodl-tmp\models\MOSS-TTS-Local-Transformer-v1.5', '--codec-path', 'D:\ai\MOSS-TTS\autodl-tmp\models\MOSS-Audio-Tokenizer-v2', '--codec-weight-dtype', 'fp32', '--codec-compute-dtype', 'bf16', '--train-jsonl', 'D:\ai\MOSS-TTS\autodl-tmp\data1.5\train_with_codes.jsonl', '--output-dir', 'D:\ai\MOSS-TTS\autodl-tmp\output\moss_tts_local_v1_5_sft', '--per-device-batch-size', '1', '--gradient-accumulation-steps', '8', '--learning-rate', '2.0e-5', '--warmup-ratio', '0', '--lr-scheduler-type', 'constant', '--num-epochs', '3', '--mixed-precision', 'bf16', '--channelwise-loss-weight', '1,32', '--gradient-checkpointing', '--attn-implementation', 'flash_attention_2']' returned non-zero exit status 1.
这是在AI的帮助下,进行的微调参数训练的,训练音频数据(AU转为标准的48KHZ 2声道,16bit,1536kbps)从中文改为纯数字,文本内容也把阿拉伯数字都改为一、二、三之类的,包括特殊符号都去除,只留下,。?、等常用标点符号,但都是出现上面的错误,请问是1.5不支持在win下微调吗?还是代码刚发布,还有bug需要调整呢,望回复为盼!感激🙏
尊敬的项目组:
你们好,今天在用贵项目组的MOSS-TTS Local Transformer v1.5 在win下进行微调,运行完数据预处理,进行最终微调训练时,出现如下错误:
D:\ai\MOSS-TTS\moss_tts_local_v1.5\finetuning>"D:\ai\MOSS-TTS\py312\Scripts\accelerate.exe" launch --mixed_precision bf16 sft.py --model-path "D:\ai\MOSS-TTS\autodl-tmp\models\MOSS-TTS-Local-Transformer-v1.5" --codec-path "D:\ai\MOSS-TTS\autodl-tmp\models\MOSS-Audio-Tokenizer-v2" --codec-weight-dtype fp32 --codec-compute-dtype bf16 --train-jsonl "D:\ai\MOSS-TTS\autodl-tmp\data1.5\train_with_codes.jsonl" --output-dir "D:\ai\MOSS-TTS\autodl-tmp\output\moss_tts_local_v1_5_sft" --per-device-batch-size 1 --gradient-accumulation-steps 8 --learning-rate 1.0e-5 --warmup-ratio 0.03 --lr-scheduler-type constant --num-epochs 3 --mixed-precision bf16 --channelwise-loss-weight 1,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665,2.6666666666666665 --gradient-checkpointing --attn-implementation flash_attention_2 --skip-nonfinite-batches
The following values were not passed to
accelerate launchand had defaults used instead:--num_processeswas set to a value of1--num_machineswas set to a value of1--dynamo_backendwas set to a value of'no'To avoid this warning pass in values for each of the problematic parameters or run
accelerate config.[2026-06-27 23:22:05] [sft] global_batch_size=1 x 1 x 8 = 8
[2026-06-27 23:22:05] [sft] distributed_type=DistributedType.NO num_processes=1 using_pre_sharded_files=False train_files=1 local_train_files=1 local_train_records=71
The tokenizer you are loading from 'D:\ai\MOSS-TTS\autodl-tmp\models\MOSS-TTS-Local-Transformer-v1.5' with an incorrect regex pattern: https://huggingface.co/mistralai/Mistral-Small-3.1-24B-Instruct-2503/discussions/84#69121093e8b480e709447d5e. This will lead to incorrect tokenization. You should set the
fix_mistral_regex=Trueflag when loading this tokenizer to fix this issue.Loading weights: 100%|████████████████| 438/438 [00:00<00:00, 4335.92it/s, Materializing param=transformer.norm.weight]
[2026-06-27 23:22:06] [sft] attn=flash_attention_2 model_dtype=torch.bfloat16 n_vq=12 channelwise_loss_weight=[1.0, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665, 2.6666666666666665] gradient_checkpointing=True gradient_checkpointing_impl=module_wrapper gradient_checkpointing_scope=global gradient_checkpointing_use_reentrant=False
[2026-06-27 23:22:09] [sft] scheduler=constant warmup_steps=1 local_micro_batches_per_epoch=71 micro_batches_per_epoch=71 dropped_local_micro_batches_per_epoch=0 optimizer_steps_per_epoch=9 max_train_steps=27
[2026-06-27 23:23:14] [sft] warning: Non-finite gradient norm at epoch=0 global_step=0: nan. first_nonfinite_grad=transformer.embed_tokens.weight bad=388956160/388956160 dtype=torch.bfloat16 shape=(151936, 2560); record_ids=['29', '40', '65', '70', '1', '33', '18', '56']; skipped
[2026-06-27 23:24:20] [sft] warning: Non-finite gradient norm at epoch=0 global_step=0: nan. first_nonfinite_grad=transformer.embed_tokens.weight bad=388956160/388956160 dtype=torch.bfloat16 shape=(151936, 2560); record_ids=['67', '28', '25', '3', '23', '6', '34', '14']; skipped
[2026-06-27 23:25:27] [sft] warning: Non-finite gradient norm at epoch=0 global_step=0: nan. first_nonfinite_grad=transformer.embed_tokens.weight bad=388956160/388956160 dtype=torch.bfloat16 shape=(151936, 2560); record_ids=['32', '66', '31', '41', '8', '51', '13', '22']; skipped
[2026-06-27 23:26:24] [sft] warning: Non-finite gradient norm at epoch=0 global_step=0: nan. first_nonfinite_grad=transformer.embed_tokens.weight bad=388956160/388956160 dtype=torch.bfloat16 shape=(151936, 2560); record_ids=['44', '45', '61', '68', '4', '20', '64', '50']; skipped
[2026-06-27 23:27:22] [sft] warning: Non-finite gradient norm at epoch=0 global_step=0: nan. first_nonfinite_grad=transformer.embed_tokens.weight bad=388956160/388956160 dtype=torch.bfloat16 shape=(151936, 2560); record_ids=['57', '2', '0', '11', '15', '19', '36', '38']; skipped
ient_checkpointing=True gradient_checkpointing_impl=module_wrapper gradient_checkpointing_scope=global gradient_checkpointing_use_reentrant=False
[2026-06-27 23:32:45] [sft] scheduler=constant warmup_steps=0 local_micro_batches_per_epoch=71 micro_batches_per_epoch=71 dropped_local_micro_batches_per_epoch=0 optimizer_steps_per_epoch=9 max_train_steps=27
Traceback (most recent call last):
File "D:\ai\MOSS-TTS\moss_tts_local_v1.5\finetuning\sft.py", line 1173, in
main()
File "D:\ai\MOSS-TTS\moss_tts_local_v1.5\finetuning\sft.py", line 1107, in main
raise FloatingPointError(message)
FloatingPointError: Non-finite gradient norm at epoch=0 global_step=0: nan. first_nonfinite_grad=transformer.embed_tokens.weight bad=388956160/388956160 dtype=torch.bfloat16 shape=(151936, 2560); record_ids=['29', '40', '65', '70', '1', '33', '18', '56']
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "D:\ai\MOSS-TTS\py312\Scripts\accelerate.exe_main.py", line 5, in
File "D:\ai\MOSS-TTS\py312\Lib\site-packages\accelerate\commands\accelerate_cli.py", line 50, in main
args.func(args)
File "D:\ai\MOSS-TTS\py312\Lib\site-packages\accelerate\commands\launch.py", line 1407, in launch_command
simple_launcher(args)
File "D:\ai\MOSS-TTS\py312\Lib\site-packages\accelerate\commands\launch.py", line 993, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['D:\ai\MOSS-TTS\py312\python.exe', 'sft.py', '--model-path', 'D:\ai\MOSS-TTS\autodl-tmp\models\MOSS-TTS-Local-Transformer-v1.5', '--codec-path', 'D:\ai\MOSS-TTS\autodl-tmp\models\MOSS-Audio-Tokenizer-v2', '--codec-weight-dtype', 'fp32', '--codec-compute-dtype', 'bf16', '--train-jsonl', 'D:\ai\MOSS-TTS\autodl-tmp\data1.5\train_with_codes.jsonl', '--output-dir', 'D:\ai\MOSS-TTS\autodl-tmp\output\moss_tts_local_v1_5_sft', '--per-device-batch-size', '1', '--gradient-accumulation-steps', '8', '--learning-rate', '2.0e-5', '--warmup-ratio', '0', '--lr-scheduler-type', 'constant', '--num-epochs', '3', '--mixed-precision', 'bf16', '--channelwise-loss-weight', '1,32', '--gradient-checkpointing', '--attn-implementation', 'flash_attention_2']' returned non-zero exit status 1.
这是在AI的帮助下,进行的微调参数训练的,训练音频数据(AU转为标准的48KHZ 2声道,16bit,1536kbps)从中文改为纯数字,文本内容也把阿拉伯数字都改为一、二、三之类的,包括特殊符号都去除,只留下,。?、等常用标点符号,但都是出现上面的错误,请问是1.5不支持在win下微调吗?还是代码刚发布,还有bug需要调整呢,望回复为盼!感激🙏