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

Add rotation matrix to equalized layers #1086

Closed
wants to merge 1 commit into from

Conversation

vishwamartur
Copy link

Related to #1073

Add RotationEqualizedLayer class to equalized_layer.py to hold two learnable matrices for rotation.

  • Implement forward method in RotationEqualizedLayer to apply rotation and call the wrapped layer.
  • Add method to fuse rotation matrices into the wrapped layer.
  • Add unit tests for RotationEqualizedLayer class in test_equalized_layer.py.
  • Test forward pass with rotation matrices.
  • Test fusing rotation matrices into the wrapped layer.

Related to Xilinx#1073

Add `RotationEqualizedLayer` class to `equalized_layer.py` to hold two learnable matrices for rotation.

* Implement `forward` method in `RotationEqualizedLayer` to apply rotation and call the wrapped layer.
* Add method to fuse rotation matrices into the wrapped layer.
* Add unit tests for `RotationEqualizedLayer` class in `test_equalized_layer.py`.
* Test forward pass with rotation matrices.
* Test fusing rotation matrices into the wrapped layer.
@Giuseppe5
Copy link
Collaborator

Hi @vishwamartur,

I took a look at this PR and unfortunately I might have to close it, since it is very far away from the solution I had envisioned for this problem, and I am not even sure this solution would allow us to reach our goal, which is to replicate the setup used in some recent works like SpinQuant.

As mentioned in the other PR, it is always recommended to use the issues to discuss what solution you would like to propose.

In the next days I will update the relevant issue with a broad description of the solution I had planned for this problem.

Apologies for the miss-understanding and if you're still willing to work on this, stay tuned for the updates on the issue!

@Giuseppe5 Giuseppe5 closed this Nov 4, 2024
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.

2 participants