Skip to content

refactor: split native Qwen2 and Qwen3 attention and decoder layers. - #2807

Merged
liutongxuan merged 1 commit into
xLLM-AI:mainfrom
wai-bao:refactor/qwen-native-attention
Nov 22, 2026
Merged

liutongxuan merged 1 commit into
xLLM-AI:mainfrom
wai-bao:refactor/qwen-native-attention

Conversation

@wai-bao

@wai-bao wai-bao commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Give Qwen2 and Qwen3 separate native attention implementations and select the attention module through the decoder layer type.
  • Keep Qwen3 Q/K normalization and fused QK norm/RoPE dispatch in Qwen3 attention. Both implementations share the projection and attention execution path.
  • Read Qwen2 attention bias from model configuration and preserve the DFlash2 checkpoint loading path.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-21T18:45:03.556658Z 985fe08 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1b8d6877ef

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@wai-bao
wai-bao force-pushed the refactor/qwen-native-attention branch 8 times, most recently from a5eaa9a to db93748 Compare November 21, 2026 05:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: db9374892d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread xllm/core/layers/qwen3_decoder_layer.h Resolved
@wai-bao
wai-bao force-pushed the refactor/qwen-native-attention branch 4 times, most recently from 5abbc6e to 6c58940 Compare November 21, 2026 09:02
@wai-bao
wai-bao marked this pull request as draft November 21, 2026 09:09
@wai-bao
wai-bao force-pushed the refactor/qwen-native-attention branch 5 times, most recently from 6c0ea3c to 74b0bdc Compare November 21, 2026 14:50
@wai-bao
wai-bao force-pushed the refactor/qwen-native-attention branch 6 times, most recently from 5c5424e to 64259c0 Compare November 21, 2026 18:21
@wai-bao wai-bao changed the title refactor: separate Qwen2 and Qwen3 native attention. refactor: split native Qwen2 and Qwen3 attention and decoder layers. Nov 21, 2026
@wai-bao
wai-bao force-pushed the refactor/qwen-native-attention branch from 64259c0 to 985fe08 Compare November 21, 2026 18:24
@wai-bao
wai-bao marked this pull request as ready for review November 21, 2026 18:38
@liutongxuan
liutongxuan merged commit fc78028 into xLLM-AI:main Nov 22, 2026
2 checks passed
@wai-bao
wai-bao deleted the refactor/qwen-native-attention branch November 22, 2026 00:59
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