Skip to content

[Bugfix]Fix transformer backend failed: AttributeError: 'Parameter' object has no attribute 'weight_loader'#48699

Open
Yejing-Lai wants to merge 1 commit into
vllm-project:mainfrom
Yejing-Lai:lyj/fix_param
Open

[Bugfix]Fix transformer backend failed: AttributeError: 'Parameter' object has no attribute 'weight_loader'#48699
Yejing-Lai wants to merge 1 commit into
vllm-project:mainfrom
Yejing-Lai:lyj/fix_param

Conversation

@Yejing-Lai

Copy link
Copy Markdown
Contributor

Reproduce:
python3 -m vllm.entrypoints.openai.api_server --model deepseek-ai/DeepSeek-R1-Distill-Llama-8B --enforce-eager --port 8000 --host 0.0.0.0 --model_impl transformers --trust-remote-code --gpu-memory-util=0.9 --no-enable-prefix-caching --max-num-batched-tokens=8192 --max-model-len=8192 --quantization fp8
will meet transformer backend failed: AttributeError: 'Parameter' object has no attribute 'weight_loader'

Root cause:
init_parameters() replace every meta parameter with the nn nn.Parameter and discarding the original parameter object along with its weight_loader.

Fix:
skips re-materializing any meta parameter that already carries a weight_loader, since that indicates it's owned by a quant method that will lazily fill it during weight loading.

Signed-off-by: Lai, Yejing <yejing.lai@intel.com>
@Yejing-Lai Yejing-Lai requested a review from hmellor as a code owner July 15, 2026 06:23

@claude claude 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.

Claude Code Review

This pull request is from a fork — automated review is disabled. A repository maintainer can comment @claude review to run a one-time review.

@mergify mergify Bot added the bug Something isn't working label Jul 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant