使用Qwen3.5-4B作为基座训练决策模型报错: AttributeError: 'Qwen3VLProcessor' object has no attribute 'model_info'
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
- Domain
- machine-learning
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
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
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelscope/ms-swift
-
get_multimodal_target_regex(..., exclude_router=True) does not exclude shared_expert_gatePossibly taken @KonnyakuMatcha claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
modelscope/ms-swift#10696 ·
Maintainers usually reply within 1 day
-
[BUG] GRPO REAL loss crashes with beta>0 and kl_in_reward=True (NoneType * Tensor)Possibly taken @newcloud123 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
modelscope/ms-swift#10690 ·
Maintainers usually reply within 1 day
-
[BUG] GRPO REAL loss divides by all groups instead of valid groups, silently scaling gradientsPossibly taken @newcloud123 claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
modelscope/ms-swift#10688 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 Half a day Newbie friendliness 62/100
modelscope/ms-swift#10621 ·
Maintainers usually reply within 1 day
-
[Bug] `get_seed` consumes a draw from the shared RandomState even when decision augmentation is disabled, changing the train/val split and dataset shufflePossibly taken @ryznren claimed this 38 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
modelscope/ms-swift#10466 · 1 comment ·
Maintainers usually reply within 1 day
All issues in modelscope/ms-swift
Similar issues
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPossibly taken A pull request linked to this issue is open or already merged. Opengood first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
omarelshamy25x/shamy-hijri#63 · 3 comments ·
Maintainers usually reply within 1 day
-
polish
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresPossibly taken @AshutoshSingh840 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
UKGovernmentBEIS/control-arena#992 ·
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
mvalentsev/awesome-free-ai-coding#70 ·
Maintainers usually reply within 1 day