使用Qwen3.5-4B作为基座训练决策模型报错: AttributeError: 'Qwen3VLProcessor' object has no attribute 'model_info'

Open
#10,563 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python

Research direction

Start with swift/template/register.py at the get_template call shown in the traceback, then trace how Qwen3VLProcessor is created and how model_info is supplied for other processors. Reproduce with ms-swift 4.6.0, Qwen3.5-4B, and the reported decision SFT command; done means template setup no longer raises this AttributeError for that configuration.

Written by the indexing model from the issue text.

Description

bug
Checklist / 检查清单
  • 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

Dominant language
Python
Stars
16.2k
Forks
1.8k
Avg merge
1d 14h
Merged PRs (30d)
68

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from modelscope/ms-swift

All issues in modelscope/ms-swift

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.