Skip to content
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

Allow Shortcutting Min-max Observer #887

Merged
merged 15 commits into from
Feb 6, 2025
Merged

Conversation

kylesayrs
Copy link
Collaborator

@kylesayrs kylesayrs commented Nov 1, 2024

Purpose

Changes

  • Renamed MovingAverageMinMaxObserver -> MinMaxObserver since moving average is not required to use it
    • Left a deprecated MovingAverageMinMaxObserver in its place
  • Shortcut averaging logic by checking self.averaging_constant == 1.0
  • Update docstrings, ect.

Testing

  • Ran examples/quantization_w4a16/llama3_example.py to completion
from llmcompressor.observers.min_max import MovingAverageMinMaxObserver, MinMaxObserver
observer = MovingAverageMinMaxObserver()
# <stdin>:1: DeprecationWarning: The class name `MovingAverageMinMaxObserver` has been deprecated, please initialize with `MinMaxObserver` in the future
assert isinstance(observer, MinMaxObserver)

Copy link

github-actions bot commented Nov 1, 2024

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

@kylesayrs kylesayrs marked this pull request as ready for review November 4, 2024 21:46
@kylesayrs kylesayrs self-assigned this Nov 4, 2024
@kylesayrs kylesayrs added the ready When a PR is ready for review label Jan 23, 2025
dsikka
dsikka previously approved these changes Jan 23, 2025
Copy link
Collaborator

@brian-dellabetta brian-dellabetta left a comment

Choose a reason for hiding this comment

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

🚀

@dsikka dsikka enabled auto-merge (squash) February 6, 2025 00:00
@dsikka dsikka merged commit 5c1d6bd into main Feb 6, 2025
7 checks passed
@dsikka dsikka deleted the kylesayrs/min-max-defaults branch February 6, 2025 01:11
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.

3 participants