torchao.sparsity¶
Convert the weight of linear modules in the model with apply_tensor_subclass. |
|
alias of |
|
This function simulates 2:4 sparsity on all linear layers in a model. |
|
Wanda sparsifier |
|
A custom observer that computes the L2 norm of each channel and stores it in a buffer. |