File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
src/compressed_tensors/transform/utils Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -69,12 +69,9 @@ def random_hadamard_matrix(
69
69
gen : Optional [torch .Generator ] = None ,
70
70
) -> torch .Tensor :
71
71
"""
72
- Produces a randomly generated Hadamard matrix.
73
- See https://cornell-relaxml.github.io/quip-sharp/ ,
74
- Section "Randomized Hadamard Transformation"
75
-
76
- Improves upon deterministic_hadamard_matrix
77
- in that this supports non powers of 2 and random seeds
72
+ Produces a randomly generated Hadamard matrix. Differs from
73
+ `deterministic_hadamard_matrix` in that this function supports non powers of 2
74
+ and randomization using a seeded generator
78
75
79
76
Adapated from https://github.com/facebookresearch/SpinQuant/blob/main/utils/hadamard_utils.py # noqa: E501
80
77
Known matrices were retrieved from N. J. A. Sloane's Library of Hadamard Matrices http://www.neilsloane.com/hadamard/ # noqa: E501
You can’t perform that action at this time.
0 commit comments