基于 CPU 的 true 4 位量化卷积神经网络训练:实现全精度持平
摘要
低精度神经网络训练已成为减少计算成本并 democratizing deep learning research 的有前景的方向。然而, 现有的 4 位量化方法要么依赖昂贵的 GPU 基础设施, 要么 suffer from significant accuracy degradation。本文提出一种实用方法, 用于在标准 PyTorch 操作的常规 CPU 上训练 true 4 位精度的卷积神经网络。我们引入一种新颖的基于 tanh 的软权重裁剪技术, 结合对称量化、动态 per-layer scaling 和直线估计, 实现稳定收敛和具竞争力的准确性。使用具有 325 万参数的 VGG 风格架构从头训练 CIFAR-10, 本方法在 Google Colab 的免费 CPU 级别上实现 92.34% 的测试准确率 — — 与全精度基线性能 (92.5%) 仅有 0.16% 的差距。我们进一步在 CIFAR-100 上进行验证, 在相同架构和训练程序下实现 70.94% 的 100 类测试准确率, 说明 4 位训练从头开始可推广到更具挑战性的分类任务。该方法在训练期间在每一层保持恰好 15 个唯一权重值, 实现了对 FP32 的 8 倍内存压缩。我们额外验证了硬件独立性, 通过在消费级移动设备 (OnePlus 9R) 上的快速收敛, 在仅 6 个 epoch 中实现 83.16% 的准确率。 To the best of our knowledge, no prior work has demonstrated 4-bit quantization-aware training achieving full-precision parity on standard CPU hardware without specialized kernels or post-training quantization.
引用
@article{arxiv.2603.13931,
title = {True 4-Bit Quantized Convolutional Neural Network Training on CPU: Achieving Full-Precision Parity},
author = {Shivnath Tathe},
journal= {arXiv preprint arXiv:2603.13931},
year = {2026}
}
备注
6 pages, 4 figures, 9 tables. Code available at https://github.com/shivnathtathe/vgg4bit-and-simpleresnet4bit