Skip to content

refactor: hoist lm head hosting and draft weight sharing into the causal-lm framework. - #2768

Merged
liutongxuan merged 1 commit into
xLLM-AI:mainfrom
wai-bao:refactor/hoist-draft-weight-sharing-pr1
Nov 18, 2026
Merged

liutongxuan merged 1 commit into
xLLM-AI:mainfrom
wai-bao:refactor/hoist-draft-weight-sharing-pr1

Conversation

@wai-bao

@wai-bao wai-bao commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

Move LM-head loading and sharing into LlmForCausalLMImplBase and reuse that base for Qwen3 hybrid models. Draft workers delegate target-head and embedding sharing through CausalLM, while checkpoint-owned draft weights retain their own values.

  • Keep checkpoint loading (load_*) separate from module and weight sharing (share_*).
  • Preserve model-specific checkpoint prefixes, tied-weight compatibility, and deferred head allocation.
  • Remove redundant forwarding, dead and test-only interfaces, and vacuous tests.
  • Reuse the common Qwen3 VLM implementation and eliminate redundant allocation, copies, and synchronization in the affected inference paths.

@netlify

netlify Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

✅ Netlify Deploy Preview ready

Built without sensitive environment variables

Name Link
🔨 Latest commit ebe71af7f76f4d0fb3d37637da07cb9289f709a1
🔍 Latest deploy log https://app.netlify.com/projects/xllm-docs-preview/deploys/6afc63309df8372b85b62f2c
😎 Deploy Preview https://deploy-preview-2768--xllm-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@wai-bao
wai-bao force-pushed the refactor/hoist-draft-weight-sharing-pr1 branch 8 times, most recently from 701bb64 to b0c10be Compare November 18, 2026 06:00
@wai-bao
wai-bao marked this pull request as ready for review November 18, 2026 06:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 18, 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-18T07:47:29.781830Z 16322a7 New commits
ℹ️ 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: b0c10beac7

ℹ️ 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/models/llm/llm_model_base.h Resolved
Comment thread xllm/models/vlm/qwen3_vl_moe.h Resolved
@wai-bao
wai-bao force-pushed the refactor/hoist-draft-weight-sharing-pr1 branch from b0c10be to db0c8ec Compare November 18, 2026 06:42

@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: db0c8ecee2

ℹ️ 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/models/llm/llm_model_base.h Resolved
Comment thread xllm/models/llm/llm_model_base.h Resolved
@wai-bao
wai-bao force-pushed the refactor/hoist-draft-weight-sharing-pr1 branch from db0c8ec to 07ccf03 Compare November 18, 2026 07:08

@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: 07ccf03a1a

ℹ️ 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/models/llm/deepseek_v4_mtp.h Resolved
@wai-bao
wai-bao force-pushed the refactor/hoist-draft-weight-sharing-pr1 branch from 07ccf03 to df13ce6 Compare November 18, 2026 07:21

@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: df13ce6f54

ℹ️ 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/runtime/worker_impl.cpp Resolved
liutongxuan
liutongxuan previously approved these changes Nov 18, 2026
@wai-bao
wai-bao force-pushed the refactor/hoist-draft-weight-sharing-pr1 branch from df13ce6 to 16322a7 Compare November 18, 2026 07:34
@liutongxuan
liutongxuan merged commit befba53 into xLLM-AI:main Nov 18, 2026
2 checks passed
@wai-bao
wai-bao deleted the refactor/hoist-draft-weight-sharing-pr1 branch November 18, 2026 07:44

@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: 16322a7ed6

ℹ️ 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/models/llm/mlu/deepseek_v4.h Resolved
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