compressed-tensors 0.12.1__py3-none-any.whl → 0.12.2__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.
- compressed_tensors/quantization/utils/helpers.py +1 -1
- compressed_tensors/transform/apply.py +1 -1
- compressed_tensors/utils/__init__.py +0 -1
- compressed_tensors/version.py +2 -2
- {compressed_tensors-0.12.1.dist-info → compressed_tensors-0.12.2.dist-info}/METADATA +1 -1
- {compressed_tensors-0.12.1.dist-info → compressed_tensors-0.12.2.dist-info}/RECORD +9 -10
- compressed_tensors/utils/permute.py +0 -33
- {compressed_tensors-0.12.1.dist-info → compressed_tensors-0.12.2.dist-info}/WHEEL +0 -0
- {compressed_tensors-0.12.1.dist-info → compressed_tensors-0.12.2.dist-info}/licenses/LICENSE +0 -0
- {compressed_tensors-0.12.1.dist-info → compressed_tensors-0.12.2.dist-info}/top_level.txt +0 -0
|
@@ -165,7 +165,7 @@ def compute_dynamic_scales_and_zp(
|
|
|
165
165
|
|
|
166
166
|
keep_dims = True
|
|
167
167
|
if args.strategy == QuantizationStrategy.TOKEN:
|
|
168
|
-
dim = {
|
|
168
|
+
dim = {0, 1}
|
|
169
169
|
reduce_dims = tuple(idx for idx in range(value.ndim) if idx not in dim)
|
|
170
170
|
elif args.strategy == QuantizationStrategy.TENSOR:
|
|
171
171
|
reduce_dims = None
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
from typing import Dict
|
|
16
16
|
|
|
17
17
|
import torch
|
|
18
|
-
from accelerate.utils import has_offloaded_params
|
|
19
18
|
from compressed_tensors import TRANSFORM_CONFIG_NAME
|
|
20
19
|
from compressed_tensors.transform import TransformConfig, TransformFactory
|
|
20
|
+
from compressed_tensors.utils.offload import has_offloaded_params
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
__all__ = ["apply_transform_config"]
|
compressed_tensors/version.py
CHANGED
|
@@ -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=
|
|
4
|
+
compressed_tensors/version.py,sha256=zZwBOgFsGuwXoMQE3ufj9-wsWZuT7V5jwWvKP04rOSE,513
|
|
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
|
|
@@ -39,11 +39,11 @@ compressed_tensors/quantization/lifecycle/forward.py,sha256=MAw049L4a9ha4P5D4MjO
|
|
|
39
39
|
compressed_tensors/quantization/lifecycle/helpers.py,sha256=C0mhy2vJ0fCjVeN4kFNhw8Eq1wkteBGHiZ36RVLThRY,944
|
|
40
40
|
compressed_tensors/quantization/lifecycle/initialize.py,sha256=1vCHN1LLSIoh6IgGAyE-Jan64HvuiChwdGhslbYkXhk,9832
|
|
41
41
|
compressed_tensors/quantization/utils/__init__.py,sha256=VdtEmP0bvuND_IGQnyqUPc5lnFp-1_yD7StKSX4x80w,656
|
|
42
|
-
compressed_tensors/quantization/utils/helpers.py,sha256=
|
|
42
|
+
compressed_tensors/quantization/utils/helpers.py,sha256=fyAjq0YbrZG6_UbEU7n6Z1i-Bg4PLA-mQiu7mHS9fs0,16420
|
|
43
43
|
compressed_tensors/registry/__init__.py,sha256=FwLSNYqfIrb5JD_6OK_MT4_svvKTN_nEhpgQlQvGbjI,658
|
|
44
44
|
compressed_tensors/registry/registry.py,sha256=cWnlwZ66lgG0w9OAUEAgq5XVxqsgFm1o8ZYdNhkNvJY,11957
|
|
45
45
|
compressed_tensors/transform/__init__.py,sha256=v2wfl4CMfA6KbD7Hxx_MbRev63y_6QLDlccZq-WTtdw,907
|
|
46
|
-
compressed_tensors/transform/apply.py,sha256=
|
|
46
|
+
compressed_tensors/transform/apply.py,sha256=pnNans9hW78Mb1-P2IY46LV5V6o2LvDbA3txKnEFUkE,3000
|
|
47
47
|
compressed_tensors/transform/transform_args.py,sha256=rVgReFp7wMXcYugkfd325e2tTFh8pGV3FnYTGCEv5jY,3429
|
|
48
48
|
compressed_tensors/transform/transform_config.py,sha256=3YdtGcau3qkcapX9GMUiLuhQHFQZKFYT3eLgJGj1L6s,1204
|
|
49
49
|
compressed_tensors/transform/transform_scheme.py,sha256=YR7Ri5hXWYQ8MSgMcpYg_BMyZtvXVPShz6iUf4giI8g,2475
|
|
@@ -56,18 +56,17 @@ compressed_tensors/transform/utils/__init__.py,sha256=fH6rjBYAxuwrTzBTlTjTgCYNyh
|
|
|
56
56
|
compressed_tensors/transform/utils/hadamard.py,sha256=9JMJPtlYI2HwJ2Y2I6uyVCBhKju8yXuQ9DhK4ZpEpvY,5753
|
|
57
57
|
compressed_tensors/transform/utils/hadamards.safetensors,sha256=mFd1GzNodGG-ifA1IoH-0nHYzfraCOvrq_dX2zFI1B4,1436901
|
|
58
58
|
compressed_tensors/transform/utils/matrix.py,sha256=3sPatOCzcLRE8ROLCGTKHr2c51DubJOFgmuNCgYdJP4,6164
|
|
59
|
-
compressed_tensors/utils/__init__.py,sha256=
|
|
59
|
+
compressed_tensors/utils/__init__.py,sha256=eXvtlJEUiV4XPcfsxVrOwL7DyY8r-L0XG_Rr5qmZrmU,850
|
|
60
60
|
compressed_tensors/utils/helpers.py,sha256=DDvjVwjK7uD6PH0jBP6Wn_MRqKkPFRbMyI6QRCzpzc0,12592
|
|
61
61
|
compressed_tensors/utils/internal.py,sha256=7SSWgDoNFRnlfadwkoFhLW-T2jOc7Po_WzWv5h32Sa8,982
|
|
62
62
|
compressed_tensors/utils/match.py,sha256=h8jYZS6XRgNplzu3c3SPXKcY-sVPa5niChTCLfUVHGE,11256
|
|
63
63
|
compressed_tensors/utils/offload.py,sha256=eXqLzl8kUkVDlNtcO5sn_4QoDcbAaxbCAS3tyZ-aGr8,23538
|
|
64
64
|
compressed_tensors/utils/permutations_24.py,sha256=kx6fsfDHebx94zsSzhXGyCyuC9sVyah6BUUir_StT28,2530
|
|
65
|
-
compressed_tensors/utils/permute.py,sha256=wB8LCvQxmI7xnm67S8pbHzM5CDFgG8t4D8emaXPnv0M,1212
|
|
66
65
|
compressed_tensors/utils/safetensors_load.py,sha256=Vql34aCTDHwmTZXJHzCyBISJo7iA7EQ78LdTlMjdpZo,12023
|
|
67
66
|
compressed_tensors/utils/semi_structured_conversions.py,sha256=XKNffPum54kPASgqKzgKvyeqWPAkair2XEQXjkp7ho8,13489
|
|
68
67
|
compressed_tensors/utils/type.py,sha256=bNwoo_FWlvLuDpYAGGzZJITRg0JA_Ngk9LGPo-kvjeU,2554
|
|
69
|
-
compressed_tensors-0.12.
|
|
70
|
-
compressed_tensors-0.12.
|
|
71
|
-
compressed_tensors-0.12.
|
|
72
|
-
compressed_tensors-0.12.
|
|
73
|
-
compressed_tensors-0.12.
|
|
68
|
+
compressed_tensors-0.12.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
69
|
+
compressed_tensors-0.12.2.dist-info/METADATA,sha256=3RfdKY_N1p4jMxQf6KlohI6ITB5vop9PKKKrtB5qowc,7018
|
|
70
|
+
compressed_tensors-0.12.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
71
|
+
compressed_tensors-0.12.2.dist-info/top_level.txt,sha256=w2i-GyPs2s1UwVxvutSvN_lM22SXC2hQFBmoMcPnV7Y,19
|
|
72
|
+
compressed_tensors-0.12.2.dist-info/RECORD,,
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing,
|
|
10
|
-
# software distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
import torch
|
|
16
|
-
from compressed_tensors.utils.helpers import deprecated
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
__all__ = ["safe_permute"]
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
@deprecated("Tensor.index_select")
|
|
23
|
-
def safe_permute(value: torch.Tensor, perm: torch.Tensor, dim: int = 0) -> torch.Tensor:
|
|
24
|
-
"""
|
|
25
|
-
Perform out-of-place permutation without using torch.Tensor.index_put_,
|
|
26
|
-
whose implementation is missing for datatypes such as `torch.float8_e4m3fn`
|
|
27
|
-
|
|
28
|
-
:param value: tensor to permute
|
|
29
|
-
:param perm: permutation map
|
|
30
|
-
:param dim: dimension along which to apply permutation
|
|
31
|
-
:return: permuted value
|
|
32
|
-
"""
|
|
33
|
-
return value.index_select(dim, perm)
|
|
File without changes
|
{compressed_tensors-0.12.1.dist-info → compressed_tensors-0.12.2.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|