Skip to content

fix(qwen3.5): read layer types from model config - #612

Merged
pan-x-c merged 1 commit into
agentscope-ai:mainfrom
shiweijiezero:fix/qwen35-layer-type-metadata
Jul 31, 2026
Merged

fix(qwen3.5): read layer types from model config#612
pan-x-c merged 1 commit into
agentscope-ai:mainfrom
shiweijiezero:fix/qwen35-layer-type-metadata

Conversation

@shiweijiezero

Copy link
Copy Markdown
Contributor

Problem

With Ulysses sequence parallelism enabled, newer Qwen3.5 model implementations may not expose layer_type on each decoder layer. The monkey patch then fails before patching linear-attention layers with:

AttributeError: 'Qwen3_5DecoderLayer' object has no attribute 'layer_type'

Fix

Read each layer type from the model configuration's layer_types list instead of relying on a per-layer attribute. This keeps linear-attention layer detection aligned with the model config.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@pan-x-c

pan-x-c commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

/unittest-module-trainer

@github-actions

Copy link
Copy Markdown

unittest: Run #1847

Tests 📝 Passed ✅ Failed ❌ Skipped ⏭️ Pending ⏳ Other ❓ Flaky 🍂 Duration ⏱️
29 26 0 3 0 0 0 1h 16m

🎉 All tests passed!

Github Test Reporter by CTRF 💚

@pan-x-c
pan-x-c merged commit 009850b into agentscope-ai:main Jul 31, 2026
1 check 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.

2 participants