STQuant:一种用于大规模多模态模型训练中优化器量化的空间-时间自适应框架
STQuant: Spatio-Temporal Adaptive Framework for Optimizer Quantization in Large Multimodal Model Training
AI总结:
STQuant通过动态分配精度降低优化器状态内存,保持模型质量,实验显示内存减少84.4%,平均比特宽低至5.1。
摘要:
量化是减少大规模模型训练内存成本的有效方法。然而,现有方法采用固定精度策略,忽略了不同层和训练步骤中优化器状态分布显著变化的事实。此类统一设计常导致显著的精度下降。为突破固定量化,我们提出STQuant,一种分布式训练框架,通过在层、状态变量和训练步骤间动态分配精度,减少优化器状态内存,同时保持模型质量。直接在训练中应用动态量化具有两大挑战:首先,优化器状态对数值敏感,量化噪声可能破坏质量;其次,联合考虑多个状态和层导致大规模组合搜索空间。STQuant通过两种关键技术解决这些挑战:1)一个可证明近优的因子选择策略,准确识别精度适应的关键因素;2)一个动态转换决策算法,将搜索成本从指数级降低到线性复杂度。在GPT-2和ViT上的实验表明,STQuant将优化器状态内存减少84.4%,平均比特宽低至5.1,相比现有方案。此外,STQuant仅引入O(N/K)计算开销,并需要O(1)额外空间。
英文摘要:
Quantization is an effective way to reduce the memory cost of large-scale model training. However, most existing methods adopt fixed-precision policies, which ignore the fact that optimizer-state distributions vary significantly across layers and training steps. Such uniform designs often introduce noticeable accuracy degradation. To move beyond fixed quantization, we propose STQuant, a distributed training framework that reduces the memory footprint of optimizer states via dynamic precision allocation across layers, state variables, and training steps, while maintaining model quality. Naively applying dynamic quantization during training is challenging for two reasons. First, optimizer states are numerically sensitive, and quantization noise can destabilize quality. Second, jointly considering multiple states and layers induces a large combinatorial search space. STQuant addresses these challenges with two key techniques: 1) a provably near-optimal factor selection strategy that accurately identifies the most influential factors for precision adaptation. 2) a dynamic transition decision algorithm that reduces the search cost from exponential to linear complexity. Experiments on GPT-2 and ViT show that STQuant reduces optimizer-state memory by 84.4%, achieving an average bit-width of as low as 5.1 bits, compared with existing solutions. Moreover, STQuant incurs only O(N/K) computational overhead and requires O(1) extra space.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。