用GPU加速去重,3小时处理1.2万亿词元,快7.8倍。
SEDD: Scalable and Efficient Dataset Deduplication with GPUs
- 改用流式处理替代数据搬移,降低通信开销。
- 生成签名速度比CPU快375倍,4卡节点上快158倍。
- 适合大规模语料库清洗,开源代码可复现。
数据去重是提升大语言模型数据质量的关键预处理步骤。常用方法为最小哈希局部敏感哈希(MinHash LSH)。尽管已有如NVIDIA NeMo Curator等GPU加速框架,但因物理数据重排导致高通信开销,且未充分利用GPU资源。本文提出SEDD,一种面向分布式集群的高性能GPU加速去重框架。SEDD引入计算高效、部分可复用的哈希函数,配合高度优化的GPU内核与硬件感知自动参数调优机制。通过以流式方式取代传统数据重排,显著缓解通信瓶颈。在单节点四卡环境下处理3000万文档时,SEDD性能超越基于CPU的SlimPajama工具158倍,比NVIDIA NeMo Curator快7.8倍。尤其在生成最小哈希签名阶段,相较CPU基线提速达375倍。尽管效率大幅提升,仍保持高去重精度:识别出的重复文档集与标准MinHash算法的Jaccard相似度超过0.95。大规模实验中,1.2万亿词元的去重仅需8节点32张V100 GPU集群运行3小时。相关代码已公开于GitHub。
原文摘要 · Abstract (English)
Dataset deduplication is widely recognized as a crucial preprocessing step that enhances data quality and improves the performance of large language models. A commonly used method for this process is the MinHash Locality-Sensitive Hashing (LSH) algorithm. Recently, GPU-accelerated frameworks such as NVIDIA NeMo Curator have been introduced to handle large-scale corpora; however, they remain suboptimal due to high communication overhead from physical data shuffling and underutilization of GPU resources. In this paper, we propose SEDD, a high-performance GPU-accelerated deduplication framework optimized for distributed cluster environments. SEDD introduces a computationally efficient, partially reusable hash function, alongside highly optimized GPU kernels and a hardware-aware automatic parameter selection mechanism. By replacing traditional data shuffling with a streaming-based approach, SEDD significantly mitigates communication bottlenecks. Our framework outperforms the CPU-based deduplication tool in SlimPajama by up to 158$\times$ and the GPU-based tool in NVIDIA NeMo Curator by up to 7.8$\times$ when processing 30 million documents on a node with four GPUs. Notably, SEDD dramatically accelerates the previously time-consuming MinHash signature generation phase, achieving speedups of up to 375$\times$ over the CPU baseline. Despite these gains in efficiency, SEDD maintains high deduplication fidelity, with duplicate document sets achieving Jaccard similarities of over 0.95 compared to those identified by the standard MinHash algorithm. In large-scale experiments, the deduplication of 1.2 trillion tokens is completed in just 3 hours on an 8-node 32-GPU V100 cluster. The related code is publicly available on GitHub (https://github.com/mcrl/SEDD).
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。