-
Notifications
You must be signed in to change notification settings - Fork 131
Add warning for non-divisible group quantization #1401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Kyle Sayers <[email protected]>
👋 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: Kyle Sayers <[email protected]>
Signed-off-by: Kyle Sayers <[email protected]>
Signed-off-by: Kyle Sayers <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should simplify this using the built-in filter pathways for the logger.add function from Loguru. This way, all log levels and standard functions are supported, and the root logger import will work without other special/additional imports.
Something along the lines of the following:
_logged_once = set()
def deduplicate_filter(record):
message = record["message"]
log_once = record["extra"].get("log_once", False)
if log_once and message in _logged_once:
return True
if log_once:
_logged_once.add(message)
return False
logger.add(..., filter=deduplicate_filter)
logger.bind(log_once=True).info("This will only log once")
logger.bind(log_once=True).info("This will only log once")
Signed-off-by: Kyle Sayers <[email protected]>
Signed-off-by: Kyle Sayers <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome!
Purpose
Prerequisites
Changes
test_observers_update
intests/llmcompressor/modifiers/calibration/test_observers.py
Testing