Skip to content

fix: runtime bugs in recipe validation, autoround, and awq - #2973

Open
soyr-redhat wants to merge 5 commits into
vllm-project:mainfrom
soyr-redhat:fix/runtime-bugs
Open

fix: runtime bugs in recipe validation, autoround, and awq#2973
soyr-redhat wants to merge 5 commits into
vllm-project:mainfrom
soyr-redhat:fix/runtime-bugs

Conversation

@soyr-redhat

@soyr-redhat soyr-redhat commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

The goal of this pr is to just fix a couple of bugs that arise at runtime

1. truncated error message in AWQ recipe validation
the error message at recipe/recipe.py:225 ends mid-sentence with "AWQ must be run with " and never finishes. THere's also a typo, "modifer" -> "modifier"

2. duplicate _unwrapper_quantized_layer in AutoRoundModifier
identical method defined at lines 394 and 435 of autoround/base.py. the second silently overwrites the first. I just simply removed the duplicate.

3. division by zero in AWQ _log_error_metrics
if _error_metrics is empty (e.g. all mappings skipped), sum(reductions) / len(reductions) raises ZeroDivisionError and min()/max() raise ValueError on empty sequence. added early return guard. This was mitigated by doing an early check for if not _error_metrics ahead of time.

no new tests should be required...these are fixes to existing error paths and dead code removal.

@github-actions

Copy link
Copy Markdown

👋 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.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 75bf6c33-543e-4188-b3ec-6cd2bb01d571

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@soyr-redhat
soyr-redhat marked this pull request as ready for review July 25, 2026 01:50
@mergify mergify Bot added the two-reviews When a PR requires two reviews label Jul 25, 2026
@mergify

mergify Bot commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 1 of 2 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 Require two reviews 👀 reviews
🟢 Require one maintainer review

🔴 Require two reviews

Waiting for

  • #approved-reviews-by >= 2
This rule is failing.

PRs labelled "two-reviews" must have at least two approving reviews before merging.

  • #approved-reviews-by >= 2
  • #changes-requested-reviews-by = 0

Show 1 satisfied protection

🟢 Require one maintainer review

All PRs must have at least one approving review from a maintainer before merging.

  • #changes-requested-reviews-by = 0
  • any of:
    • approved-reviews-by=brian-dellabetta
    • approved-reviews-by=HDCharles
    • approved-reviews-by=dsikka
    • approved-reviews-by=kylesayrs
    • approved-reviews-by=yiliu30

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

Copy link
Copy Markdown
Contributor

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 removes the unused _unwrapper_quantized_layer method from the AutoRound modifier, adds a guard clause in the AWQ modifier to safely handle empty error metrics, and fixes a typo while completing an error message in the recipe validation logic. The reviewer suggested improving the error message in recipe.py by printing only the class names of the modifiers instead of dumping their full Pydantic string representations, which can be overly verbose.

Comment thread src/llmcompressor/recipe/recipe.py Outdated
Comment thread src/llmcompressor/modifiers/transform/awq/base.py
Comment thread src/llmcompressor/modifiers/autoround/base.py
Comment thread src/llmcompressor/modifiers/transform/awq/base.py
Signed-off-by: Sawyer Bowerman <sbowerma@redhat.com>
Signed-off-by: Sawyer Bowerman <sbowerma@redhat.com>
…ntly

Signed-off-by: soyr-redhat <sbowerma@redhat.com>
@soyr-redhat
soyr-redhat requested a review from yiliu30 as a code owner August 15, 2026 21:58
@mergify

mergify Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

The quality checks have failed. Please run make style and make quality under
the root directory to adddress the lint failures. You will need to install the
dev optional install to get the required linting packages:
https://github.com/vllm-project/llm-compressor/blob/main/CONTRIBUTING.md

Resolves the quality-check lint failure (W291) blocking the merge.

Signed-off-by: soyr-redhat <sbowerma@redhat.com>
@mergify mergify Bot removed the quality-failed label Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

two-reviews When a PR requires two reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants