QSync:跨混合设备的量化最小化同步分布式训练
QSync: Quantization-Minimized Synchronous Distributed Training Across Hybrid Devices
AI总结:
本文提出 QSync 系统,通过双向混合精度敏感性预测、邻域感知成本估计和量化最小化分配,在异构训练与推理 GPU 上实现高效同步数据并行 DNN 训练。
摘要:
许多生产级深度学习集群已尝试在服务低谷期利用推理硬件进行 DNN 训练,此时大量推理 GPU 处于空闲状态。将异构训练 GPU 与推理 GPU 结合以执行 DNN 训练,即混合设备训练,由于计算能力差异和显存容量的显著不同而面临相当大的挑战。我们提出 QSync,这是一种通过策略性地利用量化算子,在混合设备上实现高效同步数据并行 DNN 训练的训练系统。QSync 根据每台设备的可用资源容量,为分布式 DNN 训练图中的算子选择量化最小化设置,从而尽量降低模型精度下降,同时保留量化带来的训练效率。我们精心设计了带有双向混合精度指标的预测器,以反映 DNN 层对定点和浮点低精度算子的敏感性;设计了带有邻域感知成本映射器的重放器,以准确估计分布式混合混合精度训练的延迟;随后设计了分配器,以最小的模型精度下降高效同步各工作节点。QSync 将 PyTorch 上的计算图桥接到优化后端,以获得量化内核性能并灵活支持多种 GPU 架构。大量实验表明,QSync 的预测器能够准确模拟分布式混合精度训练,误差小于 5%;与统一精度相比,在从头训练任务上持续取得 0.27%–1.03% 的精度提升。
英文摘要:
A number of production deep learning clusters have attempted to explore inference hardware for DNN training, at the off-peak serving hours with many inference GPUs idling. Conducting DNN training with a combination of heterogeneous training and inference GPUs, known as hybrid device training, presents considerable challenges due to disparities in compute capability and significant differences in memory capacity. We propose QSync, a training system that enables efficient synchronous data-parallel DNN training over hybrid devices by strategically exploiting quantized operators. According to each device's available resource capacity, QSync selects a quantization-minimized setting for operators in the distributed DNN training graph, minimizing model accuracy degradation but keeping the training efficiency brought by quantization. We carefully design a predictor with a bi-directional mixed-precision indicator to reflect the sensitivity of DNN layers on fixed-point and floating-point low-precision operators, a replayer with a neighborhood-aware cost mapper to accurately estimate the latency of distributed hybrid mixed-precision training, and then an allocator that efficiently synchronizes workers with minimized model accuracy degradation. QSync bridges the computational graph on PyTorch to an optimized backend for quantization kernel performance and flexible support for various GPU architectures. Extensive experiments show that QSync's predictor can accurately simulate distributed mixed-precision training with <5% error, with a consistent 0.27-1.03% accuracy improvement over the from-scratch training tasks compared to uniform precision.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。