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

Enhance: Importing quantized models after bias correction #868

Merged
merged 7 commits into from
Feb 21, 2024

Conversation

costigt-dev
Copy link
Collaborator

@costigt-dev costigt-dev commented Feb 20, 2024

Issue

Implements #827

Details

  • Adds new context manager load_quant_model that silently adds (and removes if unused) biases to help load any state dictionary that may have had biases unexpectedly added via use of the bias_correction_mode context manager prior to saving
  • Adds flag to bias_correction_mode and _BiasCorrection to disable the adding of corrections to layers that don't have a bias, default behaviour is the same as before so without modifying the flag, correction will still be applied
  • Adds two tests for the above changes

@capnramses capnramses linked an issue Feb 21, 2024 that may be closed by this pull request
@Giuseppe5 Giuseppe5 self-requested a review February 21, 2024 11:04
@Giuseppe5 Giuseppe5 merged commit 6251f9e into Xilinx:dev Feb 21, 2024
340 of 347 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Importing quantized models after bias correction
2 participants