fix: runtime bugs in recipe validation, autoround, and awq - #2973
fix: runtime bugs in recipe validation, autoround, and awq#2973soyr-redhat wants to merge 5 commits into
Conversation
|
👋 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. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Merge Protections🔴 1 of 2 protections blocking · waiting on 👀 reviews
🔴 Require two reviewsWaiting for
This rule is failing.PRs labelled "two-reviews" must have at least two approving reviews before merging.
Show 1 satisfied protection🟢 Require one maintainer reviewAll PRs must have at least one approving review from a maintainer before merging.
|
There was a problem hiding this comment.
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.
a8bd685 to
71a8c77
Compare
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>
71a8c77 to
229ebb7
Compare
|
The quality checks have failed. Please run |
Resolves the quality-check lint failure (W291) blocking the merge. Signed-off-by: soyr-redhat <sbowerma@redhat.com>
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:225ends mid-sentence with "AWQ must be run with " and never finishes. THere's also a typo, "modifer" -> "modifier"2. duplicate
_unwrapper_quantized_layerin AutoRoundModifieridentical 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_metricsif
_error_metricsis empty (e.g. all mappings skipped),sum(reductions) / len(reductions)raisesZeroDivisionErrorandmin()/max()raiseValueErroron 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.