File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/compressed_tensors/config Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
from enum import Enum
16
- from typing import Optional
16
+ from typing import List , Optional
17
17
18
18
from compressed_tensors .registry import RegistryMixin
19
19
from pydantic import BaseModel
@@ -37,11 +37,16 @@ class SparsityCompressionConfig(RegistryMixin, BaseModel):
37
37
Base data class for storing sparsity compression parameters
38
38
39
39
:param format: name of compression format
40
+ :param targets: List of layer names or layer types that aren't sparse and should
41
+ be ignored during compression. By default, assume all layers are targeted
42
+ :param ignore: List of layer names (unique) to ignore from targets. Defaults to None
40
43
:param global_sparsity: average sparsity of the entire model
41
44
:param sparsity_structure: structure of the sparsity, such as
42
45
"unstructured", "2:4", "8:16" etc
43
46
"""
44
47
45
48
format : str
49
+ targets : Optional [List [str ]] = None
50
+ ignore : Optional [List [str ]] = None
46
51
global_sparsity : Optional [float ] = 0.0
47
52
sparsity_structure : Optional [str ] = "unstructured"
You can’t perform that action at this time.
0 commit comments