SGA-Sparse:为激活稀疏且低比特的大语言模型训练原生SwiGLU门控
SGA-Sparse: Training Native SwiGLU Gates for Activation-Sparse and Low-Bit LLMs
AI总结:
SGA-Sparse通过训练原生SwiGLU门控将预训练LLaMA转为激活稀疏低比特模型,在30B训练令牌后实现75-85% FFN稀疏度,同时保持接近原模型的准确率,还提出两种QAT方案优化量化性能。
摘要:
激活稀疏性可在单用户大语言模型(LLM)解码期间减少前馈网络(FFN)的权重流量,但必须尽早识别活跃通道以避免获取未使用的权重。在预训练的SwiGLU模型中,当稀疏度较高时,使用原生门控的无训练路由性能远差于使用上投影激活的路由。我们表明,在进行感知稀疏性的训练后,这种排序会发生反转。基于这一见解,我们提出SGA-Sparse,它通过直接将现有门控投影训练为top-k路由,将预训练的SwiGLU LLM转换为固定预算的激活稀疏模型。SGA-Sparse端到端更新所有模型参数,同时保留原始SwiGLU激活且不引入任何辅助路由参数。在约300亿训练令牌后,参数规模从10亿到80亿的LLaMA模型实现了每令牌75%-85%的均匀FFN通道稀疏度,同时在平均零样本准确率上与原始密集检查点的差距保持在0.2-2.7个百分点(pp)以内。由于后训练量化会降低经稀疏训练的检查点的性能,我们进一步研究了两种互补的感知量化训练(QAT)方案:持续QAT在4比特权重量化时可大幅恢复性能,而联合QAT对于更激进的亚4比特目标表现更好。为了比较激活稀疏性与密集低比特量化,我们将稀疏性带来的权重流量减少量转换为等效比特宽度。在这一统一的权重流量度量下,我们的2.5比特和1.5比特等效模型建立了新的准确率-流量帕累托前沿:2.5比特等效模型匹配密集3比特QAT的准确率,而1.5比特等效模型接近密集2比特模型,且平均比密集三值模型高出1.3个百分点。这些结果证明,原生门控训练是结合高FFN稀疏度与低比特权重的实用方法。
英文摘要:
Activation sparsity can reduce FFN weight traffic during single-user LLM decoding, but active channels must be identified early enough to avoid fetching unused weights. In pretrained SwiGLU models, training-free routing with the native gate performs substantially worse than routing with the up activation at high sparsity. We show that this ordering reverses after sparsity-aware training. Based on this insight, we introduce SGA-Sparse, which converts pretrained SwiGLU LLMs into fixed-budget activation-sparse models by training the existing gate projection directly as a top-k router. SGA-Sparse updates all model parameters end-to-end while preserving the original SwiGLU activation and introducing no auxiliary router parameters. After approximately 30B training tokens, LLaMA models from 1B to 8B achieve uniform per-token 75-85% FFN channel sparsity while remaining within 0.2-2.7 pp of their original dense checkpoints in average zero-shot accuracy. Because post-training quantization degrades sparsity-trained checkpoints, we further study two complementary quantization-aware training (QAT) recipes: continued-QAT largely recovers performance at 4-bit weight quantization, while joint-QAT performs better for the more aggressive sub-4-bit target. To compare activation sparsity with dense low-bit quantization, we translate the sparsity-induced reduction in weight traffic into an equivalent bit-width. Under this unified weight-traffic metric, our 2.5- and 1.5-bit-equivalent models establish a new accuracy-traffic Pareto frontier: the 2.5-bit-equivalent models match dense 3-bit QAT accuracy, while the 1.5-bit-equivalent models approach dense 2-bit models and outperform dense ternary models by 1.3 pp on average. These results establish native-gate training as a practical approach for combining high FFN sparsity with low-bit weights.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。