You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(rotation): persist rotation config and apply online Hadamard for inference and calibration (#2980)
* fix(rotation): persist rotation config and apply online Hadamard for inference
Cherry-pick/adapt from GPT-QModel-Ultra#66:
- Persist in and round-trip via .
- Fuse exact Hadamard into weights during rotation.
- Add JIT Hadamard extension in (vendored
from Dao-AILab/fast-hadamard-transform, BSD-3-Clause) plus .
- Attach // to QuantLinear modules at
and after . Restrict rotation to /.
- Call in and .
- Disable when is enabled.
- Add and README/MANIFEST attribution/license.
* fix(rotation): wire online Hadamard into loader, base, qlinear, config, version, and attributions
* fix(rotation): apply online Hadamard during GPTQ calibration for mlp.down_proj
- Extract apply_online_hadamard so HookedLinear and BaseQuantLinear share the same transform.
- rotate_mlp_output now sets online_full_had/had_K/K on the nn.Linear before it becomes HookedLinear.
- HookedLinear.from_linear copies rotation state and forward applies H to the activation used for GPTQ calibration.
- Add unit test verifying HookedLinear cancellation and hook input transform.
* GAR: Intel, main-author: T Gafni, A Karnieli, Y Hanani, [Paper](https://openaccess.thecvf.com/content/CVPR2025W/eLVM/html/Gafni_Dual_Precision_Quantization_for_Efficient_and_Accurate_Deep_Neural_Networks_CVPRW_2025_paper.html)
* Fast Hadamard Transform: [Dao-AILab/fast-hadamard-transform](https://github.com/Dao-AILab/fast-hadamard-transform), by Tri Dao, vendored into `gptqmodel_ext/hadamard/` under the BSD-3-Clause license. A copy of the license is included in `gptqmodel_ext/hadamard/LICENSE`.
* FOEM: Zheng, Xingyu and Qin, Haotong and Li, Yuye and Chu, Haoran and Wang, Jiakai and Guo, Jinyang and Magno, Michele and Liu, Xianglong [Paper](https://ojs.aaai.org/index.php/AAAI/article/view/40123)
0 commit comments