You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,14 +49,14 @@ And a quick crash course on inference quantization to help parse the above table
49
49
50
50
Sparsifying your model is also a 1 liner that should work on any model with an `nn.Linear`. We find that sparsity works best on compute bound models like SAM, specifically the MLP layers.
51
51
```python
52
-
from torchao.sparsity importsparsify, semi_sparse_weight()
52
+
from torchao.sparsity importsparsify_, semi_sparse_weight
53
53
54
54
m = sparsify_(m, semi_sparse_weight())
55
55
```
56
56
Sparsity can also be composed with int8 dynamic quantization for further speedups:
57
57
58
58
```python
59
-
from torchao.sparsity importsparsify, int8_dynamic_activation_int8_semi_sparse_weight
59
+
from torchao.sparsity importsparsify_, int8_dynamic_activation_int8_semi_sparse_weight
60
60
61
61
m = sparsify_(m, int8_dynamic_activation_int8_semi_sparse_weight())
0 commit comments