Skip to content

Conversation

brian-dellabetta
Copy link
Collaborator

@brian-dellabetta brian-dellabetta commented Oct 9, 2025

SUMMARY:
Fixes #1906

This refactors QuantizationMixin to not update any pydantic fields during validation. Rather than modifying them in order to make them the source of truth, this adds properties resolved_config & resolved_targets that all modifiers should instead use as source of truth. These are resolved once, when needed, and not serialized, which should fix the bug in #1906

TEST PLAN:
Added a test_resolved_targets unit test

Signed-off-by: Brian Dellabetta <[email protected]>
Copy link

github-actions bot commented Oct 9, 2025

👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.

Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed.

Signed-off-by: Brian Dellabetta <[email protected]>
Signed-off-by: Brian Dellabetta <[email protected]>
Signed-off-by: Brian Dellabetta <[email protected]>
Signed-off-by: Brian Dellabetta <[email protected]>
Signed-off-by: Brian Dellabetta <[email protected]>
@brian-dellabetta brian-dellabetta marked this pull request as ready for review October 13, 2025 19:03
@brian-dellabetta brian-dellabetta added the ready When a PR is ready for review label Oct 13, 2025
Copy link
Collaborator

@kylesayrs kylesayrs left a comment

Choose a reason for hiding this comment

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

Nice job

Copy link
Collaborator

@HDCharles HDCharles left a comment

Choose a reason for hiding this comment

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

Looks good

@brian-dellabetta brian-dellabetta enabled auto-merge (squash) October 15, 2025 22:04
@brian-dellabetta brian-dellabetta merged commit 7194d4b into main Oct 16, 2025
9 checks passed
@brian-dellabetta brian-dellabetta deleted the bdellabe/1906-fix-recipe-serde branch October 16, 2025 18:58
zhanglei1172 pushed a commit to zhanglei1172/llm-compressor that referenced this pull request Oct 17, 2025
…ect#1912)

SUMMARY:
Fixes vllm-project#1906

This refactors QuantizationMixin to not update any pydantic fields
during validation. Rather than modifying them in order to make them the
source of truth, this adds properties `resolved_config` &
`resolved_targets` that all modifiers should instead use as source of
truth. These are resolved once, when needed, and not serialized, which
should fix the bug in vllm-project#1906

TEST PLAN:
Added a `test_resolved_targets` unit test

---------

Signed-off-by: Brian Dellabetta <[email protected]>
Signed-off-by: LeiZhang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready When a PR is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Serialized QuantizationMixin subclasses fail to load

3 participants