Skip to content
Preprint

Cascade: GPU-Accelerated Out-of-Core Suffix Array Construction for LLM Corpora

Oct 2026 · 0 citations · 57 references
Computer Science

TL;DR

Cascade is presented, a GPU-accelerated out-of-core suffix-array constructor that 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.

Abstract

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.

View source

Similar papers

Preprint Oct 2026

LLBPE: Linked-List Based GPU-Parallel BPE Tokenizer

This work develops LLBPE, a version of BPE that represents the token sequence as an array-based linked list so that each merge reduces to a constant- time pointer update.

Aditya Kovilur, V. C. Shekar, Ariful Azad · 1 citation
Sep 2026

FastPair: GPU-Optimized String Decoding

FastPair is presented, a GPU decoder that optimizes the existing dictionary decoding process by reorganizing lookups and assembling decoded substrings for contiguous output writes, reaching up to 1.6 TB/s on a B300.

J. Isaacs, Francesco Gargiulo, P. Boncz et al. · 0 citations
#machine learning Preprint Oct 2026

The COUNT: Counting N-grams Unlocks Scaling on Host Memory and Training-Free Adaptation

The scaling relationship of compute and performance for language models (LMs) has been extensively studied; more recently, models are being designed to scale memory use, as well. In particular, adding embeddings for n-grams scales memory separately from compute use, because each pass only processes individual embedding...

Ian Magnusson, Noah A. Smith, P. W. Koh · 0 citations
Preprint Oct 2026

Engineering Lightweight Burrows-Wheeler Transform Construction on the GPU via Prefix-Free Parsing

It is shown that PFP-based BWT construction can work with only sorting, scanning, and simple data-parallel procedures, which results in the GPU construction gpupfpbwt that on an NVIDIA RTX 3090, reduces the peak memory on an English text 11.9 bytes per character.

Florian Kurpicz, Maximilian Paris · 0 citations
#artificial intelligence Preprint Oct 2026

Let the Gate Decide: Per-Lookup Precision for Quantized Conditional Memory in LLMs

Conditional memory layers, such as DeepSeek's Engram, attach large hashed n-gram tables to a language model, and removing them from DeepSeek-V4.1-Flash costs 36.8 PopQA points. Low-bit quantization loses long-tail facts first, and the standard remedy, giving more bits to frequently accessed rows, backfires: refining lo...

Tian-Qi Chen, Xun-Chao Li, Li Xie et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.