Suffix arrays power deduplication, contamination testing, and training data attribution over the corpora used to train large language models, and must be rebuilt for every new corpus or tokenizer. However, constructing them at scale is slow. infini-gram's indexing pipeline takes about two days to process 1.4 trillion tokens on its authors' 128-core CPU server. GPU-accelerated constructors are an order of magnitude faster, but their working sets must fit in GPU memory. Partitioning the corpus only moves this limit to host memory. Sorting the suffixes of one partition needs the ranks of suffixes in other partitions, which existing designs keep in a corpus-wide rank table that must stay in memory. We present Cascade, a GPU-accelerated out-of-core suffix-array constructor. Its partitions each own a fixed, contiguous range of the final suffix array, so the GPU sorts them independently and never merges them. Cascade then replaces the rank table with streamed rank exchange. Ranks are sent directly to the partitions that need them, and an invariant makes partition-local ranks sufficient for every comparison. With no rank table, intermediate data spills across GPU memory, host memory, and SSD as the corpus grows, and host memory only needs to hold the text. On seven corpora of 8-238 billion tokens, Cascade builds suffix arrays on a single GPU server 3.0-8.2x faster end to end than infini-gram's pipeline, and its construction is 6.3-11.4x faster than libsais's. It indexes the 198-billion-token C4 corpus and the 238-billion-token Pile in 23 and 37 minutes end to end, both of which exceed libsais's host-memory capacity on the same server. A batched query engine over the index reproduces infini-gram's counts at median speedups of 10.8-32.6x, with the index in GPU memory, host memory, or on SSD.


翻译:暂无翻译

0
下载
关闭预览

相关内容

专知会员服务
30+阅读 · 2021年5月21日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
61+阅读 · 2019年10月17日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
用 LDA 和 LSA 两种方法来降维和做 Topic 建模
AI研习社
13+阅读 · 2018年8月24日
手把手教 | 深度学习库PyTorch(附代码)
数据派THU
27+阅读 · 2018年3月15日
Github 项目推荐 | 用 Pytorch 实现的 Capsule Network
AI研习社
22+阅读 · 2018年3月7日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2008年12月31日
Arxiv
0+阅读 · 10月21日
VIP会员
最新内容
《面向国防领域的大语言模型基准测试与适配》
专知会员服务
2+阅读 · 25分钟前
世界模型入门:从序贯决策到通用智能体
专知会员服务
12+阅读 · 10月24日
军事域更好使用人工智能的实用指南
专知会员服务
11+阅读 · 10月22日
《衡量语言模型中的作战规划能力》
专知会员服务
14+阅读 · 10月20日
相关VIP内容
专知会员服务
30+阅读 · 2021年5月21日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
61+阅读 · 2019年10月17日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
meta learning 17年:MAML SNAIL
CreateAMind
11+阅读 · 2019年1月2日
用 LDA 和 LSA 两种方法来降维和做 Topic 建模
AI研习社
13+阅读 · 2018年8月24日
手把手教 | 深度学习库PyTorch(附代码)
数据派THU
27+阅读 · 2018年3月15日
Github 项目推荐 | 用 Pytorch 实现的 Capsule Network
AI研习社
22+阅读 · 2018年3月7日
IJCAI | Cascade Dynamics Modeling with Attention-based RNN
KingsGarden
13+阅读 · 2017年7月16日
From Softmax to Sparsemax-ICML16(1)
KingsGarden
74+阅读 · 2016年11月26日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
12+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员