compressed-tensors 0.10.3a20250710__py3-none-any.whl → 0.10.3a20250715__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -747,12 +747,16 @@ class ModelCompressor:
747
747
 
748
748
  def map_module_to_scheme(model: Module) -> Dict[str, QuantizationScheme]:
749
749
  """
750
- Returns a dictionary which maps quantized module names to their quantization schemes
750
+ Returns a dictionary which maps quantized module names to their quantization
751
+ schemes. Only includes modules with weight quantization
751
752
  """
752
753
  return {
753
754
  fix_fsdp_module_name(name): module.quantization_scheme
754
755
  for name, module in model.named_modules()
755
- if is_module_quantized(module)
756
+ if (
757
+ hasattr(module, "quantization_scheme") and
758
+ module.quantization_scheme.weights is not None
759
+ )
756
760
  }
757
761
 
758
762
 
@@ -99,7 +99,7 @@ class TransformFactory(RegistryMixin, ABC):
99
99
  :param args: defines how the transform will be applied to the target module
100
100
  """
101
101
  # create transform as submodule
102
- transform_name = f"{self.name}_{args.location.value}"
102
+ transform_name = f"{self.name}_{args.location}"
103
103
  transform = self.create_transform(module, args)
104
104
  register_offload_module(module, transform_name, transform)
105
105
 
@@ -46,7 +46,7 @@ class TransformLocation(str, Enum):
46
46
  Q_ATTN = "q_attn"
47
47
 
48
48
 
49
- class TransformArgs(BaseModel):
49
+ class TransformArgs(BaseModel, use_enum_values=True):
50
50
  """
51
51
  Arguments which define *how* and where a transform should be applied to a model
52
52
 
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.10.3.a20250710'
20
+ __version__ = version = '0.10.3.a20250715'
21
21
  __version_tuple__ = version_tuple = (0, 10, 3)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compressed-tensors
3
- Version: 0.10.3a20250710
3
+ Version: 0.10.3a20250715
4
4
  Summary: Library for utilization of compressed safetensors of neural network models
5
5
  Home-page: https://github.com/neuralmagic/compressed-tensors
6
6
  Author: Neuralmagic, Inc.
@@ -1,11 +1,11 @@
1
1
  compressed_tensors/__init__.py,sha256=UtKmifNeBCSE2TZSAfduVNNzHY-3V7bLjZ7n7RuXLOE,812
2
2
  compressed_tensors/base.py,sha256=73HYH7HY7O2roC89yG_piPFnZwrBfn_i7HmKl90SKc0,875
3
- compressed_tensors/version.py,sha256=gqWN6LSE0C4r0hiPn2KpmE4YPwpZnktZcE8p9BTZksQ,523
3
+ compressed_tensors/version.py,sha256=4fhlyf_Dxsw-6e50R1K8Mn8AWFNP0TiRJ8S21Gge6UA,523
4
4
  compressed_tensors/compressors/__init__.py,sha256=smSygTSfcfuujRrAXDc6uZm4L_ccV1tWZewqVnOb4lM,825
5
5
  compressed_tensors/compressors/base.py,sha256=nvWsv4xEw1Tkxkxth6TmHplDYXfBeP22xWxOsZERyDY,7204
6
6
  compressed_tensors/compressors/helpers.py,sha256=OK6qxX9j3bHwF9JfIYSGMgBJe2PWjlTA3byXKCJaTIQ,5431
7
7
  compressed_tensors/compressors/model_compressors/__init__.py,sha256=5RGGPFu4YqEt_aOdFSQYFYFDjcZFJN0CsMqRtDZz3Js,666
8
- compressed_tensors/compressors/model_compressors/model_compressor.py,sha256=Zl33ceJu_KH_Vx2B5EK-bvE7W5OklOL0hb-QqdOVSsE,32906
8
+ compressed_tensors/compressors/model_compressors/model_compressor.py,sha256=MIMgjLK0VJu4bF_CwyvSftFrC5tvIIMfRt6XB0yLjOE,33056
9
9
  compressed_tensors/compressors/quantized_compressors/__init__.py,sha256=KvaFBL_Q84LxRGJOV035M8OBoCkAx8kOkfphswgkKWk,745
10
10
  compressed_tensors/compressors/quantized_compressors/base.py,sha256=YGUMzbxekj_36ChgQnVZN6T8uDjXtGG1zfMIBGBLWco,10354
11
11
  compressed_tensors/compressors/quantized_compressors/naive_quantized.py,sha256=0ANDcuD8aXPqTYNPY6GnX9iS6eXJw6P0TzNV_rYS2l8,5369
@@ -41,11 +41,11 @@ compressed_tensors/registry/__init__.py,sha256=FwLSNYqfIrb5JD_6OK_MT4_svvKTN_nEh
41
41
  compressed_tensors/registry/registry.py,sha256=0s15BxdGgzBv8RL4kUJCYcuDOFUh_KZYvNvLEeRqWTc,11956
42
42
  compressed_tensors/transform/__init__.py,sha256=v2wfl4CMfA6KbD7Hxx_MbRev63y_6QLDlccZq-WTtdw,907
43
43
  compressed_tensors/transform/apply.py,sha256=Cnc7Q8d8FzpLGtXixvdPzqApfjAXpfShxvVl_7nNJ4E,1259
44
- compressed_tensors/transform/transform_args.py,sha256=8-Ab5_dFfdObfwVCgrWrEWcoVRzXmMBSDSUxjftI-Ss,3177
44
+ compressed_tensors/transform/transform_args.py,sha256=jJY-Qt996w45LWQ10AHd7tUtNrnV9mjD9M5D4SZ5B3E,3199
45
45
  compressed_tensors/transform/transform_config.py,sha256=A3RuLNDqBNEByQNeu40Kg7sItwE6kWgnX18Umg1uONI,2128
46
46
  compressed_tensors/transform/transform_scheme.py,sha256=JAFQoCiNLg04diXG5KsynRGcLIB0Y0tC5s8U7HoDM7c,1692
47
47
  compressed_tensors/transform/factory/__init__.py,sha256=fH6rjBYAxuwrTzBTlTjTgCYNyh6TCvCqajCz4Im4YrA,617
48
- compressed_tensors/transform/factory/base.py,sha256=fgG97-HqqxekWkVAXF3dCm7E_1h9d-Bplhu0y-QdoqQ,6050
48
+ compressed_tensors/transform/factory/base.py,sha256=D5s6dOn01Yy_Z2v8YmYIYfzJie2BYV6uxBJKP_9jTCQ,6044
49
49
  compressed_tensors/transform/factory/hadamard.py,sha256=oLdDUu1p82lgD7li-sHMSvXZxz1SDjLeYf-EfXqNzvk,3918
50
50
  compressed_tensors/transform/factory/matrix_multiply.py,sha256=KYiQRGFSU33TpPWkGTKwNADTmYoU0E3hjQypOMclHbg,3689
51
51
  compressed_tensors/transform/factory/random_hadamard.py,sha256=nUhTlFa4ikSpcl4Umme71pnjMPgwYoGlwjKlU27UHZ4,1634
@@ -61,8 +61,8 @@ compressed_tensors/utils/permutations_24.py,sha256=kx6fsfDHebx94zsSzhXGyCyuC9sVy
61
61
  compressed_tensors/utils/permute.py,sha256=V6tJLKo3Syccj-viv4F7ZKZgJeCB-hl-dK8RKI_kBwI,2355
62
62
  compressed_tensors/utils/safetensors_load.py,sha256=DMfZBuUbA6qp_BG_zIWT3ckiEE33K9ob34s-OgzReO4,12057
63
63
  compressed_tensors/utils/semi_structured_conversions.py,sha256=XKNffPum54kPASgqKzgKvyeqWPAkair2XEQXjkp7ho8,13489
64
- compressed_tensors-0.10.3a20250710.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
65
- compressed_tensors-0.10.3a20250710.dist-info/METADATA,sha256=TodSeLplEMKQAyDzDHZDT7DPvFFEK5-qUokJdpw2yCg,7031
66
- compressed_tensors-0.10.3a20250710.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
67
- compressed_tensors-0.10.3a20250710.dist-info/top_level.txt,sha256=w2i-GyPs2s1UwVxvutSvN_lM22SXC2hQFBmoMcPnV7Y,19
68
- compressed_tensors-0.10.3a20250710.dist-info/RECORD,,
64
+ compressed_tensors-0.10.3a20250715.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
65
+ compressed_tensors-0.10.3a20250715.dist-info/METADATA,sha256=Pb3ZHNAmiFtJHKdWbAA7m2KvmSttY8EV2huSI71ZBGM,7031
66
+ compressed_tensors-0.10.3a20250715.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
67
+ compressed_tensors-0.10.3a20250715.dist-info/top_level.txt,sha256=w2i-GyPs2s1UwVxvutSvN_lM22SXC2hQFBmoMcPnV7Y,19
68
+ compressed_tensors-0.10.3a20250715.dist-info/RECORD,,