Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
test/ | H | 25-Apr-2025 | - | 549 | 421 | |
third-party/FFHT/ | H | 25-Apr-2025 | - | 50,443 | 50,228 | |
README.md | H A D | 25-Apr-2025 | 751 | 17 | 14 | |
TARGETS | H A D | 25-Apr-2025 | 93 | 6 | 3 | |
fast_hadamard_transform.cpp | H A D | 25-Apr-2025 | 3.5 KiB | 102 | 60 | |
fast_hadamard_transform.h | H A D | 25-Apr-2025 | 4.5 KiB | 145 | 84 | |
fast_hadamard_transform_special.h | H A D | 25-Apr-2025 | 27.2 KiB | 242 | 229 | |
special_hadamard_code_gen.py | H A D | 25-Apr-2025 | 7.6 KiB | 280 | 204 | |
targets.bzl | H A D | 25-Apr-2025 | 752 | 23 | 20 |
README.md
1# SpinQuant 2 3This is an implementation of the [Fast Hadamard 4Transform](https://en.wikipedia.org/wiki/Fast_Walsh–Hadamard_transform) 5as used in [SpinQuant](https://arxiv.org/abs/2405.16406) (for the R3 6and R4 matrices), [QuaRot](https://arxiv.org/abs/2404.00456), and 7[Quip#](https://arxiv.org/pdf/2402.04396). We follow those papers' 8method (as implemented in 9https://github.com/Dao-AILab/fast-hadamard-transform/) for extending 10the transform to non-power-of-two input sizes. CUDA is not considered 11because https://github.com/Dao-AILab/fast-hadamard-transform/ is 12already available. 13 14The intended long-term destination for this code is pytorch/ao; it is 15in ExecuTorch temporarily until we get C++ dependency from ExecuTorch 16on torchao figured out. 17