Skip to content

Commit dfdbd3f

Browse files
committed
fix dynamic weights keys
Signed-off-by: Kyle Sayers <[email protected]>
1 parent ed8f5dc commit dfdbd3f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/compressed_tensors/transform/factory/hadamard.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from typing import Optional
15+
from typing import List, Optional
1616

1717
import torch
1818
from compressed_tensors.transform import TransformArgs, TransformScheme
@@ -84,6 +84,8 @@ def _create_permutation(self, weight: Parameter) -> Parameter:
8484

8585

8686
class HadamardTransform(TransformBase):
87+
_dynamic_tied_weights_keys: List[str] = ["weight", "perm"]
88+
8789
def __init__(
8890
self,
8991
weight: Parameter,

tests/test_transform/factory/test_serialization.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ def test_serialization(type, randomize, model_apply, tmp_path, offload=False):
4444

4545

4646
@pytest.mark.skip(reason="Requires changes in upstream transformers")
47-
# https://github.com/huggingface/transformers/pull/39280
48-
# https://github.com/huggingface/transformers/pull/39263
4947
@requires_gpu
5048
@requires_accelerate()
5149
@pytest.mark.parametrize("type", ("hadamard", "random-hadamard"))

0 commit comments

Comments
 (0)