compressed-tensors 0.12.3a20251007__py3-none-any.whl → 0.12.3a20251008__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.
@@ -259,6 +259,7 @@ class QuantizationArgs(BaseModel, use_enum_values=True):
259
259
  # extract user-passed values from dictionary
260
260
  strategy = model.strategy
261
261
  group_size = model.group_size
262
+ block_structure = model.block_structure
262
263
  actorder = model.actorder
263
264
  dynamic = model.dynamic
264
265
  observer = model.observer
@@ -277,7 +278,7 @@ class QuantizationArgs(BaseModel, use_enum_values=True):
277
278
  "strategy='group' and group_size = -1 for 'channel'"
278
279
  )
279
280
 
280
- # validate strategy and group
281
+ # validate group strategy
281
282
  if strategy == QuantizationStrategy.GROUP:
282
283
  if group_size is None or group_size <= 0:
283
284
  raise ValueError(
@@ -292,6 +293,14 @@ class QuantizationArgs(BaseModel, use_enum_values=True):
292
293
  ):
293
294
  raise ValueError("group_size requires strategy to be set to 'group'")
294
295
 
296
+ # validate block strategy
297
+ has_block_strategy = strategy == QuantizationStrategy.BLOCK
298
+ has_block_structure = block_structure is not None
299
+ if has_block_strategy and not has_block_structure:
300
+ raise ValueError(f"Block strategy requires block structure\n{model}")
301
+ if has_block_structure and not has_block_strategy:
302
+ raise ValueError(f"Block structure requires block strategy\n{model}")
303
+
295
304
  # validate activation ordering and strategy
296
305
  if actorder is not None and strategy != QuantizationStrategy.GROUP:
297
306
  raise ValueError(
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.12.3.a20251007'
20
+ __version__ = version = '0.12.3.a20251008'
21
21
  __version_tuple__ = version_tuple = (0, 12, 3)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compressed-tensors
3
- Version: 0.12.3a20251007
3
+ Version: 0.12.3a20251008
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,7 +1,7 @@
1
1
  compressed_tensors/__init__.py,sha256=SRqNYFVvxAaLa4SImhoiIBKfoOSj7EUdx0CxXjGC2PA,884
2
2
  compressed_tensors/base.py,sha256=-gxWvDF4LCkyeDP8YlGzvBBKxo4Dk9h4NINPD61drFU,921
3
3
  compressed_tensors/logger.py,sha256=sTm1Od1cV0aDxBm3YN-PPvsOATxY_2tBV62TQE4HiPw,4032
4
- compressed_tensors/version.py,sha256=wUAf4k-SKBfmo_lva-t_YeLxw6mVgmYfFIXdh6YQLP4,523
4
+ compressed_tensors/version.py,sha256=_il8gmSl9gH7iYuhwiaqtDtTWGrILZboW5GnnNo-IxY,523
5
5
  compressed_tensors/compressors/__init__.py,sha256=smSygTSfcfuujRrAXDc6uZm4L_ccV1tWZewqVnOb4lM,825
6
6
  compressed_tensors/compressors/base.py,sha256=nvWsv4xEw1Tkxkxth6TmHplDYXfBeP22xWxOsZERyDY,7204
7
7
  compressed_tensors/compressors/helpers.py,sha256=OK6qxX9j3bHwF9JfIYSGMgBJe2PWjlTA3byXKCJaTIQ,5431
@@ -28,7 +28,7 @@ compressed_tensors/config/sparse_bitmask.py,sha256=pZUboRNZTu6NajGOQEFExoPknak5y
28
28
  compressed_tensors/linear/__init__.py,sha256=fH6rjBYAxuwrTzBTlTjTgCYNyh6TCvCqajCz4Im4YrA,617
29
29
  compressed_tensors/linear/compressed_linear.py,sha256=1yo9RyjA0aQ--iuIknFfcSorJn43Mn4CoV-q4JlTJ_o,4052
30
30
  compressed_tensors/quantization/__init__.py,sha256=ifNRE2rJNILOWKA3jkPBGwXEXXvaKkn4lRMcxaVlkW0,790
31
- compressed_tensors/quantization/quant_args.py,sha256=5AxYKqCSlg7CDgz2N8G4ZRVIiSUKvIm-SCQa-Bq_SF0,12916
31
+ compressed_tensors/quantization/quant_args.py,sha256=prkBGBg8TbDK0QdMuFwZdiY8M831w_scD0Y4rEGN40I,13403
32
32
  compressed_tensors/quantization/quant_config.py,sha256=Y_OgLId65ajdfupXuOrKSAArrvKicMeA8DHdzRt3J6o,10687
33
33
  compressed_tensors/quantization/quant_metadata.py,sha256=yudYWXRYYSqgRhoUA-RIu2LI14NFchOyPUUuz7bPqJE,1950
34
34
  compressed_tensors/quantization/quant_scheme.py,sha256=EG86Bq5c8q1O4fJL_o3s7gOu1S5SrcLjfNYOPDn414A,9673
@@ -65,8 +65,8 @@ compressed_tensors/utils/permutations_24.py,sha256=kx6fsfDHebx94zsSzhXGyCyuC9sVy
65
65
  compressed_tensors/utils/safetensors_load.py,sha256=Vql34aCTDHwmTZXJHzCyBISJo7iA7EQ78LdTlMjdpZo,12023
66
66
  compressed_tensors/utils/semi_structured_conversions.py,sha256=XKNffPum54kPASgqKzgKvyeqWPAkair2XEQXjkp7ho8,13489
67
67
  compressed_tensors/utils/type.py,sha256=bNwoo_FWlvLuDpYAGGzZJITRg0JA_Ngk9LGPo-kvjeU,2554
68
- compressed_tensors-0.12.3a20251007.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
69
- compressed_tensors-0.12.3a20251007.dist-info/METADATA,sha256=8uUWt8bF7sZhbMQd2Llj4PDLC7I4ALKJE_eFNa8DBWI,7027
70
- compressed_tensors-0.12.3a20251007.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
71
- compressed_tensors-0.12.3a20251007.dist-info/top_level.txt,sha256=w2i-GyPs2s1UwVxvutSvN_lM22SXC2hQFBmoMcPnV7Y,19
72
- compressed_tensors-0.12.3a20251007.dist-info/RECORD,,
68
+ compressed_tensors-0.12.3a20251008.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
69
+ compressed_tensors-0.12.3a20251008.dist-info/METADATA,sha256=lZoGp9KeOZZp6Ms-Sf2PjBgJGQ78DUGc4wcti7K9E-I,7027
70
+ compressed_tensors-0.12.3a20251008.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
71
+ compressed_tensors-0.12.3a20251008.dist-info/top_level.txt,sha256=w2i-GyPs2s1UwVxvutSvN_lM22SXC2hQFBmoMcPnV7Y,19
72
+ compressed_tensors-0.12.3a20251008.dist-info/RECORD,,