Lune

AAAI2026顶会

Intermediate N-Gramming: Deterministic and Fast N-Grams for Large N and Large Datasets

Ryan R. Curtin, Fred Lu, Edward Raff, Priyanka Ranade

摘要

The number of n-gram features grows exponentially in n, making it computationally demanding to compute the most frequent n-grams even for n as small as 3. Motivated by our production machine learning system built on n-gram features, we ask: is it possible to accurately, deterministically, and quickly recover the top-k most frequent n-grams? We devise a multi-pass algorithm called Intergrams that constructs candidate n-grams from the preceding (n -1)-grams. By designing this algorithm with hardware in mind, our approach yields more than an order of magnitude speedup (up to 33×!) over the next known fastest algorithm, even when similar optimization are applied to the other algorithm. Using the empirical power-law distribution over n-grams, we also provide theory to inform the efficacy of our multi-pass approach. Our code is available at https://github.com/rcurtin/Intergrams .

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper1

  1. High-Dimensional Distributed Sparse Classification with Scalable Communication-Efficient Global UpdatesFred Lu, Ryan R. Curtin, Edward Raff, Francis Ferraro 等KDD 2024 · 2 次引用

相关 Paper

  1. Superposed Decoding: Multiple Generations from a Single Autoregressive Inference PassEthan Shen, Alan Fan, Sarah M. Pratt, Jae Sung Park 等NeurIPS 2024 · 6 次引用
  2. FR-Spec: Accelerating Large-Vocabulary Language Models via Frequency-Ranked Speculative SamplingWeilin Zhao, Tengyu Pan, Xu Han, Yudi Zhang 等ACL 2025 · 14 次引用
  3. Scaling Embedding Layers in Language ModelsDa Yu, Edith Cohen, Badih Ghazi, Yangsibo Huang 等NeurIPS 2025 · 21 次引用
  4. An Efficient Streaming Algorithm for Approximating Graphlet DistributionsMarco Bressan, T.-H. Hubert Chan, Qipeng Kuang, Mauro SozioSIGMOD 2026
  5. Efficient Training of Language Models with Compact and Consistent Next Token DistributionsAshutosh Sathe, Sunita SarawagiACL Findings 2024
黄昏的海面,两侧是细线勾勒的悬崖