True 4-Bit Quantized Convolutional Neural Network Training on CPU: Achieving Full-Precision Parity
Organizations: Independent Researcher, Pune, India
Abstract
Low-precision neural network training has emerged as a promising direction for reducing computational costs and democratizing access to deep learning research. However, existing 4-bit quantization methods either rely on expensive GPU infrastructure or suffer from significant accuracy degradation. In this work, we present a practical method for training convolutional neural networks at true 4-bit precision using standard PyTorch operations on commodity CPUs. We introduce a novel tanh-based soft weight clipping technique that, combined with symmetric quantization, dynamic per-layer scaling, and straight-through estimators, achieves stable convergence and competitive accuracy. Training a VGG-style architecture with 3.25 million parameters from scratch on CIFAR-10, our method achieves 92.34% test accuracy on Google Colab's free CPU tier -- matching full-precision baseline performance (92.5%) with only a 0.16% gap. We further validate on CIFAR-100, achieving 70.94% test accuracy across 100 classes with the same architecture and training procedure, demonstrating that 4-bit training from scratch generalizes to harder classification tasks. Both experiments achieve 8x memory compression over FP32 while maintaining exactly 15 unique weight values per layer throughout training. We additionally validate hardware independence by demonstrating rapid convergence on a consumer mobile device (OnePlus 9R), achieving 83.16% accuracy in only 6 epochs. 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.
Figures & tables
| Method | Hardware | Training | Accuracy | FP32 Parity |
|---|---|---|---|---|
| IBM [ 5 ] | GPU (sim) | From scratch | High | No |
| QLoRA [ 6 ] | Single GPU | Fine-tuning | High | N/A |
| BitNet [ 7 ] | GPU cluster | From scratch | High | Yes (LLM) |
| DoReFa [ 10 ] | GPU | From scratch | 85–88% | No |
| Ours | CPU | From scratch | 92.34% | Yes |
| Method | Precision | Hardware | Accuracy | Gap |
|---|---|---|---|---|
| FP32 VGG Baseline | 32-bit | GPU | 92.5% | — |
| Ours | 4-bit | CPU | 92.34% | 0.16% |
| 8-bit QAT | 8-bit | GPU | 90–91% | 1.5–2.5% |
| DoReFa-Net | 4-bit | GPU | 85–88% | 4.5–7.5% |
| 4-bit PTQ | 4-bit | GPU | 70–78% | 14.5–22.5% |
| Metric | CIFAR-10 | CIFAR-100 |
|---|---|---|
| Best Test Accuracy | 92.34% | 70.94% |
| Best Epoch | 110 | 104 |
| Final Train Accuracy | 99.90% | 97.10% |
| FP32 Model Size | 12.40 MB | 12.58 MB |
| Int4 Model Size | 1.55 MB | 1.57 MB |
| Compression | 8.0 | 8.0 |
| Epoch Range | Min | Max | Average |
|---|---|---|---|
| 1–10 | 13 | 15 | 14.5 |
| 25–50 | 13 | 15 | 14.5 |
| 75–100 | 14 | 15 | 14.8 |
| 88–114 (peak) | 15 | 15 | 15.0 |
| Epoch | Train Acc | Test Acc | Unique Values |
|---|---|---|---|
| 1 | 51.99% | 66.84% | 14.8 |
| 3 | 74.65% | 76.65% | 14.4 |
| 6 | 81.98% | 83.16% | 14.8 |
| Dataset | FP32 Size | Int4 Size | Ratio |
|---|---|---|---|
| CIFAR-10 | 12.40 MB | 1.55 MB | 8.0 |
| CIFAR-100 | 12.58 MB | 1.57 MB | 8.0 |
| Configuration | Test Accuracy |
|---|---|
| Full Method | 92.21% |
| w/o Tanh Soft Clipping | 87.3% |
| w/o Per-Layer Scaling | 84.1% |
| w/o Gradient Clipping | 82.5% |
| Standard AdamW (no QAware mods) | 79.2% |