Skip to content

Conversation

@DarkLight1337
Copy link
Member

@DarkLight1337 DarkLight1337 commented Sep 25, 2025

Purpose

FIX (partial) #25671

Test Plan

Test Result


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.
  • (Optional) Release notes update. If your change is user facing, please update the release notes draft in the Google Doc.

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a caching mechanism for the model configuration hash to optimize performance. While the caching logic itself is sound, the implementation for cache invalidation via __setattr__ introduces a critical flaw by allowing mutations on the ModelConfig object that can lead to an inconsistent state. This can cause silent misconfigurations and hard-to-debug issues. I've provided detailed comments on this and other potential improvements.

@DarkLight1337 DarkLight1337 enabled auto-merge (squash) September 25, 2025 16:49
Copy link
Collaborator

@ProExpertProg ProExpertProg left a comment

Choose a reason for hiding this comment

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

This introduces complexity, it would be better if we can just not recompute model arch or class.

@DarkLight1337 DarkLight1337 changed the title [Optimization] Cache the hash of the model config [Optimization] Use a cheaper cache key in get_model_architecture Sep 25, 2025
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
@DarkLight1337
Copy link
Member Author

Updated according to #25671 (comment), see if it looks good to you now

@DarkLight1337
Copy link
Member Author

We need both this PR and #25702 to solve #25671

@DarkLight1337 DarkLight1337 added this to the v0.11.0 milestone Sep 25, 2025
Copy link
Collaborator

@ProExpertProg ProExpertProg left a comment

Choose a reason for hiding this comment

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

Thanks for addressing!

@ProExpertProg ProExpertProg merged commit 89fa54e into vllm-project:main Sep 25, 2025
43 checks passed
@DarkLight1337 DarkLight1337 deleted the cache-hash branch September 26, 2025 03:41
yewentao256 pushed a commit that referenced this pull request Oct 3, 2025
…25682)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: yewentao256 <zhyanwentao@126.com>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 10, 2025
…llm-project#25682)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
choprahetarth pushed a commit to Tandemn-Labs/vllm that referenced this pull request Oct 11, 2025
…llm-project#25682)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
lywa1998 pushed a commit to lywa1998/vllm that referenced this pull request Oct 20, 2025
…llm-project#25682)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
xuebwang-amd pushed a commit to xuebwang-amd/vllm that referenced this pull request Oct 24, 2025
…llm-project#25682)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
Signed-off-by: xuebwang-amd <xuebwang@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants