Introduction
Deep Neural Networks (DNNs) are increasingly deployed on resource-constrained edge devices. Mixed Precision Quantization (MPQ) is a critical technique to manage this deployment, assigning varying bit-widths to different layers to optimize the trade-off between model size and accuracy. However, determining layer sensitivity—the key to effective bit assignment—remains a significant challenge.
Existing approaches generally fall into two categories: computationally expensive differentiable searches or training-free methods that rely on "proxies." These proxies are mathematical formulas designed to estimate sensitivity without full training. Historically, these have been handcrafted by human experts through extensive trial and error, often requiring large calibration datasets and failing to generalize across different architectures.
The TAP Framework: Automating Proxy Discovery
The Training-free Automatic Proxy (TAP) framework addresses these limitations by treating Large Language Models (LLMs) as automated scientists capable of discovering high-performing quantization proxies.
TAP utilizes an evolutionary search mechanism where an LLM (such as DeepSeek or Qwen) generates both the mathematical reasoning and executable Python code for new proxy candidates. The process is governed by three primary prompt templates: Initialization, Mutation, and Crossover.
To ensure stability and performance, TAP incorporates a Direct Preference Optimization (DPO) scheduler. This lightweight controller monitors which prompt strategies yield the most effective proxies and dynamically adjusts their selection probabilities. This "closed-loop" feedback allows the system to converge on superior formulas without the need for expensive LLM fine-tuning.
Data Efficiency and Generalization
A standout feature of TAP is its extreme data efficiency. While traditional human-designed proxies like HAWQ-V2 require thousands of calibration samples, TAP achieves state-of-the-art results using as few as 16 samples.
Furthermore, proxies discovered via TAP exhibit remarkable zero-shot generalization. A formula identified using a small dataset like CIFAR-10 on a ResNet-18 model can be successfully applied to large-scale benchmarks like ImageNet-1k and complex architectures like Vision Transformers (ViT) without further modification.
Key Results
TAP demonstrates superior performance across various benchmarks:
- Accuracy: On ResNet-18, TAP achieved a Top-1 accuracy of 72.63%, surpassing existing training-free baselines such as OMPQ (72.08%) and EMQ (72.28%).
- Efficiency: The entire search process is completed in approximately 0.42 to 0.5 GPU hours on a single NVIDIA 3090. Once a proxy is discovered, the bit-width allocation for a new model takes less than 0.1 seconds.
- Transformer Performance: TAP significantly enhances quantization for Vision Transformers, reaching 83.56% accuracy on ViT-B at an 82% compression ratio.
Conclusion
By replacing labor-intensive human heuristics with LLM-discovered formulas, TAP represents a paradigm shift in Mixed Precision Quantization. It offers a highly efficient, data-light, and automated path toward optimizing deep learning models for the edge. Future work may extend this framework to incorporate hardware-specific signals like latency and explore its application in domains beyond computer vision, such as NLP.
Summary updated