ms-swift
ms-swift copied to clipboard
使用Qwen3.5-4B作为基座训练决策模型报错: AttributeError: 'Qwen3VLProcessor' object has no attribute 'model_info'
Checklist / 检查清单
- [x] I have searched existing issues, and this is a new bug report. / 我已经搜索过现有的 issues,确认这是一个新的 bug report。
Bug Description / Bug 描述
原始命令:
swift sft
--task_type decision
--model_type generic_decision
--loss_type distill_rps
--tuner_type lora
--lora_rank 16
--lora_alpha 32
--lora_dropout 0.05
--target_modules all-linear
--model /home/admin/modelhub-41700011-112600047
--torch_dtype bfloat16
--deepspeed zero2
--decision_drop_instructions 0.0
--decision_subsample_options 0
--decision_state_as_text 0.0
--decision_shuffle_fields false
--max_length 4096
--truncation_strategy right
--per_device_train_batch_size 1
--gradient_accumulation_steps 2
--learning_rate 0.0001
--gradient_checkpointing true
--warmup_ratio 0.05
--weight_decay 0.01
--eval_steps 5
--save_steps 1
--save_total_limit 2
--logging_steps 1
--seed 42
--data_seed 42
--dataloader_num_workers 4
--save_only_model true
--report_to tensorboard
--output_dir /pcache-mnt/rw/54124/checkpoint/410658/358302414/1/lend_intent_decision_2ppu_20261112
--num_train_epochs 3
--external_plugins /tmp/xhai_decision_plugin.py
--dataset xhai_decision_train_0
--val_dataset xhai_decision_eval_0
--logging_dir /home/admin/logs/tfevent/lend_intent_decision_2ppu_20261112
Traceback:
[rank0]: Traceback (most recent call last):
--
[rank0]: File "/usr/local/lib/python3.12/dist-packages/swift/cli/sft.py", line 20, in <module>
[rank0]: sft_main()
[rank0]: File "/usr/local/lib/python3.12/dist-packages/swift/pipelines/train/sft.py", line 345, in sft_main
[rank0]: return SwiftSft(args).main()
[rank0]: ^^^^^^^^^^^^^^
[rank0]: File "/usr/local/lib/python3.12/dist-packages/swift/pipelines/train/sft.py", line 31, in __init__
[rank0]: self._prepare_template()
[rank0]: File "/usr/local/lib/python3.12/dist-packages/swift/ray_utils/base.py", line 168, in wrapper
[rank0]: return func(self, *args, **kwargs)
[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: File "/usr/local/lib/python3.12/dist-packages/swift/pipelines/train/sft.py", line 70, in _prepare_template
[rank0]: template = args.get_template(self.processor)
[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: File "/usr/local/lib/python3.12/dist-packages/swift/arguments/base_args/base_args.py", line 367, in get_template
[rank0]: template = get_template(processor, **template_kwargs)
[rank0]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank0]: File "/usr/local/lib/python3.12/dist-packages/swift/template/register.py", line 187, in get_template
--
[rank0]: model_info = processor.model_info
[rank0]: ^^^^^^^^^^^^^^^^^^^^
[rank0]: AttributeError: 'Qwen3VLProcessor' object has no attribute 'model_info'
[rank1]: Traceback (most recent call last):
[rank1]: File "/usr/local/lib/python3.12/dist-packages/swift/cli/sft.py", line 20, in <module>
[rank1]: sft_main()
[rank1]: File "/usr/local/lib/python3.12/dist-packages/swift/pipelines/train/sft.py", line 345, in sft_main
[rank1]: return SwiftSft(args).main()
[rank1]: ^^^^^^^^^^^^^^
[rank1]: File "/usr/local/lib/python3.12/dist-packages/swift/pipelines/train/sft.py", line 31, in __init__
[rank1]: self._prepare_template()
[rank1]: File "/usr/local/lib/python3.12/dist-packages/swift/ray_utils/base.py", line 168, in wrapper
[rank1]: return func(self, *args, **kwargs)
[rank1]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank1]: File "/usr/local/lib/python3.12/dist-packages/swift/pipelines/train/sft.py", line 70, in _prepare_template
[rank1]: template = args.get_template(self.processor)
[rank1]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank1]: File "/usr/local/lib/python3.12/dist-packages/swift/arguments/base_args/base_args.py", line 367, in get_template
[rank1]: template = get_template(processor, **template_kwargs)
[rank1]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank1]: File "/usr/local/lib/python3.12/dist-packages/swift/template/register.py", line 187, in get_template
[rank1]: model_info = processor.model_info
[rank1]: ^^^^^^^^^^^^^^^^^^^^
[rank1]: AttributeError: 'Qwen3VLProcessor' object has no attribute 'model_info'
How to Reproduce / 如何复现
ms-swift版本: 4.6.0 使用Qwen3.5-4B模型进行决策模型微调
Additional Information / 补充信息
No response
transformers 版本是多少?我没复现出来这个问题
transformers 版本是多少?我没复现出来这个问题
transformers版本 5.12.1