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

Multi-head attention and grouped convolutions #6

Open
PythonNut opened this issue Nov 17, 2022 · 0 comments
Open

Multi-head attention and grouped convolutions #6

PythonNut opened this issue Nov 17, 2022 · 0 comments

Comments

@PythonNut
Copy link
Collaborator

PythonNut commented Nov 17, 2022

As we discussed previously, the abstractions of our current weight matching algorithm do not generalize to networks with the following structure:

  1. There are n separate things which can be permuted with each other.
  2. Each of those n things contains k units which can be permuted.

Probably the most pressing example of this is multi-head attention (where the heads can be permuted and also each head has its own latent permutation). Grouped convolutions are another example.

If our cost is linear, we can apply a hierarchical matching algorithm which can match these local structures exactly, however it's expensive (runs in O(n²k³ + n³) time).

For applications like fine-tuning where the weights are already quite similar, it may be possible to ignore the outermost permutation and still achieve good results.

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

1 participant