-
Notifications
You must be signed in to change notification settings - Fork 199
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 po2 for float quant #1033
Fix po2 for float quant #1033
Conversation
ca7691c
to
90d4e31
Compare
@nickfraser
|
0eb2ec2
to
8fa0025
Compare
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.
Let's chat about some bits. Otherwise, looks good.
I'll confirm this on my end too. The perplexity measurement is a loose guard to force us to do a sanity check like this - assuming I see the same behaviour as you, I'm happy for you to update the scores to make the test pass. |
tests/brevitas_finn/brevitas_examples/test_quartznet_finn_export.py
Outdated
Show resolved
Hide resolved
Local tests pass. Happy for you to merge when the minor fixes above are corrected. |
Breaking change. Loading old quantized model requires setting a flag for numerical compatibility.
Depends on #1039
The new flow assume that restrict_init_impl (e.g., log2) is done before converting to parameters. After this PR, the op is done after.
This means that loading the model from an old checkpoint would cause log2 to be applied twice.
To avoid this, the a new config flag is created (maybe to extend to a ENV variable as well).
When the flag is set, the reverse op to restrict_init is used (e.g., po2) during checkpoint loading time