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

fix ignored hmse after resource utilization computation #1253

Merged
merged 4 commits into from
Oct 30, 2024
Merged

Conversation

irenaby
Copy link
Collaborator

@irenaby irenaby commented Oct 27, 2024

Pull Request Description:

When GPTQ with HMSE follows resource utilization computation, it runs with MSE instead of HMSE.
Resource utilization computation runs graph_preparation_runner with default gptq flag which is false. In set_quantization_configuration_to_graph when weights_error_method is HMSE and gptq is false, weights_error_method is set to MSE in the original core_config. So when gptq is run afterwards, its config contains MSE instead of HMSE.

The fix includes:

  • raise an error if HMSE is run without GPTQ (instead of overriding it)
  • generate a copy of the core config and explicitly replace HMSE with MSE in resource utilization computation.

Checklist before requesting a review:

  • I set the appropriate labels on the pull request.
  • I have added/updated the release note draft (if necessary).
  • I have updated the documentation to reflect my changes (if necessary).
  • All function and files are well documented.
  • All function and classes have type hints.
  • There is a licenses in all file.
  • The function and variable names are informative.
  • I have checked for code duplications.
  • I have added new unittest (if necessary).

@irenaby irenaby changed the title fix hmse overridden by mse after resource utilization computation fix ignored hmse after resource utilization computation Oct 27, 2024
@irenaby irenaby requested a review from ofirgo October 27, 2024 19:20
@irenaby
Copy link
Collaborator Author

irenaby commented Oct 27, 2024

@ofirgo I'm not sure this is the best fix, opening PR so I don't forget, let's talk on Tue

@ofirgo ofirgo requested review from lior-dikstein and removed request for ofirgo October 28, 2024 07:18
Core config for resource utilization.
"""
core_config = copy.deepcopy(core_config)
# HMSE is not supported without GPTQ, and resource utilization doesn't care about it, so we replace it with MSE.
Copy link
Collaborator

Choose a reason for hiding this comment

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

For resource utilization, we use GPTQ disabled, and since HMSE is not supported without GPTQ we replace it with MSE.

@irenaby irenaby marked this pull request as ready for review October 30, 2024 13:05
@irenaby irenaby merged commit e5d4977 into main Oct 30, 2024
34 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants