用压缩索引技术实现互联网级文本精确搜索,仅需44%存储空间。
Infini-gram mini: Exact n-gram Search at the Internet Scale with FM-Index
- 基于FM-index压缩编码,边索引边压缩文本数据。
- 83TB文本仅需44%存储,索引速度提升18倍,内存占用降低3.2倍。
- 可检测语言模型评测集污染,适合数据质量分析与检索系统研究者。
语言模型主要在互联网海量文本上训练,理解其数据来源日益重要。精确匹配搜索引擎可对大规模文本语料进行字符串计数与文档检索,但高存储开销限制了其在互联网规模数据上的应用。本文提出infini-gram mini,一种高效且可扩展的系统,使百亿亿字节级文本语料可被搜索。基于FM-index(Ferragina和Manzini, 2000)数据结构,该系统在同时索引和压缩文本的基础上,生成的索引仅占原始语料44%。infini-gram mini在索引速度上相比现有最佳实现提升18倍,索引与查询时内存消耗分别减少3.2倍和降至可忽略水平。我们使用单个拥有128个vCPU的CPU节点,在99天内完成83TB互联网文本的索引;若使用137个此类节点,则仅需19小时。我们展示了一个重要应用场景:大规模分析基准测试污染。发现多个核心语言模型评估基准在互联网爬取中严重污染(GSM8K最高达74.2%),若模型在污染数据上训练,可能高估其能力。我们发布了基准污染通报,共享多个核心与社区贡献基准的污染率,并提供网页界面与API接口,支持通用搜索查询。
原文摘要 · Abstract (English)
Language models are trained mainly on massive text data from the Internet, and it becomes increasingly important to understand this data source. Exact-match search engines enable searching in large text corpora - counting string appearances and retrieving the enclosing documents - yet the high storage overhead hinders their application on Internet-scale data. We present infini-gram mini, an efficient and scalable system that can make petabyte-level text corpora searchable. Based on the FM-index data structure (Ferragina and Manzini, 2000), which simultaneously indexes and compresses text, our system creates indexes with size only 44% of the corpus. Infini-gram mini greatly improves upon the best existing implementation of FM-index in terms of indexing speed (18$\times$) and memory use during both indexing (3.2$\times$ reduction) and querying (down to a negligible amount). We index 83TB of Internet text in 99 days with a single CPU node with 128 vCPUs (or 19 hours if using 137 such nodes). We show one important use case of infini-gram mini in a large-scale analysis of benchmark contamination. We find several core LM evaluation benchmarks to be heavily contaminated in Internet crawls (up to 74.2% in GSM8K), which could lead to overestimating the capabilities of language models if trained on such data. We host a benchmark contamination bulletin to share the contamination rate of many core and community-contributed benchmarks. We also release a web interface and an API endpoint to serve general search queries on infini-gram mini indexes.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。