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

[sparse] add sparsity, add wanda sparsifier to ao #22

Merged
merged 1 commit into from
Dec 11, 2023
Merged

Conversation

jcaip
Copy link
Contributor

@jcaip jcaip commented Dec 6, 2023

  • adds sparsity folder to torchao
  • add in wanda sparsifier

I decided to call the folder sparsity because all of the other constructs are called sparsity, it's only torch.ao.pruning (the namespace) that is called pruning, because zafar decided to migrate it. I'm not sure if it's worth the effort to move everything to be called pruning, and given almost everything is called sparsity it seems like the right choice. I do not feel strongly about this though and could be convinced otherwise

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Dec 6, 2023
@jcaip jcaip marked this pull request as ready for review December 11, 2023 18:18
@jcaip jcaip merged commit 1b92d57 into main Dec 11, 2023
2 checks passed
@jerryzh168
Copy link
Contributor

I had some discussions with Zafar before, and I remember pruning is the more general name since there is really just structured and unstructured pruning, (don't remember the details though, we could restart the discussion and I may be able to recall). since we are developing something new, should we just use that?

@jcaip
Copy link
Contributor Author

jcaip commented Apr 8, 2024

cc @supriyar @cpuhrsch @jerryzh168

I don't think pruning is the more general name, to me they seem to be used pretty interchangeably. I think sparsity is more widely used then pruning in literature from what I can tell. IMO it doesn't make a difference what name we pick ... that being said if either of you feel differently, I'd be happy to hear thoughts.

@cpuhrsch
Copy link
Contributor

I think this roughly the distinction we had landed on on why pruning is different from sparsity. You could prune, for example, entire MHA heads and just delete them. Sparsity is about storage formats and kernels for efficiently compressing repeat zeros. You can use sparsity to speed up pruned Tensors (sometimes). Sometimes pruning can have advantage even without sparsity.

@supriyar supriyar deleted the jcaip/sparsity branch May 9, 2024 16:35
dbyoung18 pushed a commit to dbyoung18/ao that referenced this pull request Jul 31, 2024
[sparse] add sparsity, add wanda sparsifier to ao
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants