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

error computing is not correct of covariant of pre and post process #5

Open
ozzzp opened this issue Aug 28, 2023 · 1 comment
Open

Comments

@ozzzp
Copy link

ozzzp commented Aug 28, 2023

If I understand correctly, The pre and post process should be covariant, ie, the norm $tr(W H W^\top)$ should be invariance if we ignore the quantization error. but it seens that the error_compute method is not corrent to match this property:

https://github.com/jerry-chee/QuIP/blob/361ff4941d508d34b7631b88161315a51e9b5091/bal.py#L44-L48

Here, w is pre-processed but not post-processed, but quant_w and $H$ in the norm $tr(W H W^\top)$ seens that it is both pre-processed and post-processed therefore breaks the covariant.

@jerry-chee
Copy link
Collaborator

Yes thanks for pointing that out. We'll post a correction in the next update, but one fix could be to save w before any processing, and then compute (w - quant_w) H (w - quant_w).

Please let me know if that answers your question.

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

No branches or pull requests

2 participants