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

Grouped Linear layers #857

Open
opfromthestart opened this issue Aug 25, 2023 · 1 comment
Open

Grouped Linear layers #857

opfromthestart opened this issue Aug 25, 2023 · 1 comment

Comments

@opfromthestart
Copy link
Contributor

I have a model that needs to be able to run in real time, and one of the layers has a width of 6000, which makes it take about 0.3 seconds to run (I need 30-60fps). One solution I can think of is a grouped linear layer, where GroupLinear<I, O, C> takes an input of (B, C*I) and returns an output of (B, C*O) where the C blocks of I inputs are all processed independently of each other. I don't think new kernels would need to be written as it just does C smaller linear layers.

@opfromthestart
Copy link
Contributor Author

The storage of the weights should probably be approximately a Tensor<Rank3<C, I, O>,...>.

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