通过算法系统协同设计,让大模型训练中过滤无用标记实现真正提速。
Unlocking Full Efficiency of Token Filtering in Large Language Model Training
- 在注意力反向传播中过滤无意义标记,大幅提升计算稀疏性。
- 训练时减少49.9%反向传播时间,整体训练快34.7%,过滤50%标记仍保性能。
- 无需修改框架,仅加一行代码即可加速已有过滤训练系统。
Token filtering 通过训练中剔除无意义标记来提升大语言模型效率。现有方法未能实现实际加速,主要因稀疏度不足且不兼容主流机器学习库的非标准稀疏模式。本文提出 Centrifuge,通过算法与系统协同设计,释放 token filtering 的全部潜力。算法层面,通过在注意力反向核中过滤无意义标记激活值,增强反向计算稀疏性;系统层面,自动将稀疏 GEMM 转换为降维密集 GEMM,利用标准 ML 库高效执行。在 1.1B 至 40B 规模模型上评估显示,当过滤 50% 标记时,反向传播时间减少最多达 49.9%,端到端训练时间减少最多 34.7%。实用性评估表明,相比标准训练,模型性能最高提升 26.6%,同时保留过滤带来的效用优势。Centrifuge 可无缝集成至现有训练框架,使已使用 token filtering 的系统仅需添加一行代码即可提速。
原文摘要 · Abstract (English)
Token filtering has been proposed to enhance the utility of large language models (LLMs) by eliminating inconsequential tokens during training. While usingfewer tokens is expected to reduce computational workloads, existing methods have not yet achieved a real-world efficiency boost. This is primarily due to two factors: (1) existing work has inadequate sparsity for speedup, and (2) token filtering operates within a sparsity range that is non-standard in existing machine learning (ML) libraries and thus cannot be efficiently supported. This paper presents Centrifuge, a system that leverages algorithm and system co-design to unleash the full efficiency of token filtering in LLM training. At the algorithm level, Centrifuge filters activations of inconsequential tokens in the attention backward kernel to amplify the sparsity in backward computation. At the system level, Centrifuge proposes an automatic workflow that transforms sparse GEMM into dimension-reduced dense GEMM for optimized efficiency using standard ML libraries. Evaluations on models with various scales--from 1.1B to 40B--demonstrate that Centrifuge reduces backpropagation time by up to 49.9\% and end-to-end training time by up to 34.7\% when filtering 50\% of tokens. Utility assessments indicate that Centrifuge preserves the utility benefits of token filtering and significantly enhances model performance by up to 26.6\% compared to standard training. Centrifuge is designed for seamless integration into existing LLM training frameworks, enabling systems already utilizing token filtering to accelerate training with just one line of code.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。