Skip to content

[bugfix] fix qwen3_5 sp compat transformers 5.5.4#9165

Merged
Jintao-Huang merged 2 commits into
modelscope:mainfrom
Jintao-Huang:fix_qwen3_5_sp_compat_transformers_554
Apr 21, 2026
Merged

[bugfix] fix qwen3_5 sp compat transformers 5.5.4#9165
Jintao-Huang merged 2 commits into
modelscope:mainfrom
Jintao-Huang:fix_qwen3_5_sp_compat_transformers_554

Conversation

@Jintao-Huang
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces dynamic signature inspection for Qwen model patching to conditionally pass the cache_position argument. The review feedback suggests restoring the try-except block for sequence_parallel_context imports to maintain environment compatibility and recommends extending the signature check to other parameters like cache_params and attention_mask for better robustness across different versions of the transformers library.

Comment thread swift/model/models/qwen.py
Comment thread swift/model/models/qwen.py Outdated
@Jintao-Huang Jintao-Huang merged commit 436b56b into modelscope:main Apr 21, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant