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

QuantLinear cannot compute F.Linear beacuse it is flattening the input #1066

Closed
2 tasks
balditommaso opened this issue Oct 22, 2024 · 2 comments
Closed
2 tasks
Labels
bug Something isn't working

Comments

@balditommaso
Copy link

Describe the bug

The new version of Brevitas may have a bug when you apply intger quantization to a dense layer, I have tryed to quantise different models from torchvision and when you reach the last linear layer the multiplication fail.

Reproducibility

  • Can be reproduced consistently.
  • [ x] Difficult to reproduce.
  • Unable to reproduce.

Screenshots/Code Example/Log Output
RuntimeError: mat1 and mat2 shapes cannot be multiplied (131072x1 and 512x1000)

please complete the following information:

  • Brevitas version: last
  • PyTorch version: 2.5
  • Operating System / platform: Linux
@balditommaso balditommaso added the bug Something isn't working label Oct 22, 2024
@Giuseppe5
Copy link
Collaborator

Thanks for sharing.
Without a script it is difficult for us to reproduce. Does the problem disappear with the previous release of Brevitas?

@balditommaso
Copy link
Author

Solved, it was my issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants