[Bugfix][MoE] Filter packed expert weights during EP loading - #49558
Merged
esmeetu merged 4 commits intoAug 4, 2026
Merged
Conversation
Port the focused fix from Inferact/mke#91. Co-authored-by: OpenAI Codex <noreply@openai.com> Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
aoshen02
force-pushed
the
agent/ep-filter-packed-weights
branch
from
August 4, 2026 07:32
76f3ae6 to
85c6035
Compare
esmeetu
approved these changes
Aug 4, 2026
esmeetu
enabled auto-merge (squash)
August 4, 2026 07:38
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.weight_packedtensors as heavy weights eligible for EP-local filtering.Root cause
The EP filter previously recognized only names ending in
.weight. Quantized expert checkpoints can store the primary expert payload in a packed representation whose serialized key ends in.weight_packed. These keys are produced when quantized expert weights are packed for storage or loading; the suffix describes the payload layout, not a different ownership rule.The filter runs on checkpoint tensor names before the loader materializes or unpacks the tensor. If
.weight_packedis not recognized as a heavy expert weight, non-local expert payloads bypass EP filtering and are redundantly read on every EP rank. Scale and metadata tensors intentionally remain unfiltered because they are small and may be required for quantized-kernel setup across experts.Changes
.weightand.weight_packedas filterable heavy expert payloads.local_expert_ids.Scope and compatibility
This change applies only to per-expert tensor names with a numeric expert ID. Fused expert layouts and tensors without an explicit numeric expert ID remain unchanged and continue through their existing loader paths.
Related upstream work
vLLM #48891 fixes a separate multithreaded safetensors path that previously did not receive
local_expert_idsat all. This PR is complementary: it fixes recognition of.weight_packedpayloads once EP filtering is enabled.Validation
uvx ruff check vllm/model_executor/model_loader/ep_weight_filter.py tests/model_executor/model_loader/test_ep_weight_filter.py: passed.uvx ruff format --check vllm/model_executor/model_loader/ep_weight_filter.py tests/model_executor/model_loader/test_ep_weight_filter.py: passed.git diff --check: passed.The available loading experiments measured the filtering path only; later post-load failures were unrelated to this change. No end-to-end accuracy claim is made.
AI assistance
AI assistance was used to investigate the root cause, prepare this minimal patch, and run the checks above. The human submitter will review every changed line and validate the runtime behavior before merge.