Skip to content

Commit eb47c93

Browse files
authored
update README example with correct import of sparsify_ (#741)
* sparsify -> sparsify_ * Update README.md
1 parent 9a56e80 commit eb47c93

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ And a quick crash course on inference quantization to help parse the above table
4949

5050
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.
5151
```python
52-
from torchao.sparsity import sparsify, semi_sparse_weight()
52+
from torchao.sparsity import sparsify_, semi_sparse_weight
5353

5454
m = sparsify_(m, semi_sparse_weight())
5555
```
5656
Sparsity can also be composed with int8 dynamic quantization for further speedups:
5757

5858
```python
59-
from torchao.sparsity import sparsify, int8_dynamic_activation_int8_semi_sparse_weight
59+
from torchao.sparsity import sparsify_, int8_dynamic_activation_int8_semi_sparse_weight
6060

6161
m = sparsify_(m, int8_dynamic_activation_int8_semi_sparse_weight())
6262
```

0 commit comments

Comments
 (0)