arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2606.26439cs.IRcs.DCcs.PF
收藏

TileMaxSim: 面向IO感知的GPU MaxSim评分,采用维度分块和融合乘积量化

TileMaxSim: Roofline Regimes and Compression Limits for Fused GPU MaxSim Scoring

MIT-IBM Watson AI Lab(MIT-IBM 沃森人工智能实验室)

Ashutosh Sharma

AI总结:

针对多向量检索模型MaxSim评分在GPU上的带宽瓶颈,提出TileMaxSim,通过多查询SRAM分块、维度分块和融合乘积量化,实现高达80.2%的峰值HBM带宽,比循环评分快220倍。

摘要:

多向量检索模型如ColBERT通过细粒度的token级MaxSim评分实现了最先进的准确性,但现有的GPU实现未能充分利用大多数硬件性能。我们对现代GPU上的MaxSim进行了屋顶线分析,发现了一个严重的带宽缺口:朴素实现仅达到峰值HBM带宽的5-18%,因为它们物化了Nq x Nd相似度矩阵,浪费了内存流量在一次性消费和丢弃的数据上。我们提出了TileMaxSim,一系列IO感知的Triton内核,通过以下方式缩小这一差距:(1) 多查询SRAM分块,通过共享内存流式传输文档嵌入,同时在寄存器中累积每个查询token的最大值,每个嵌入从HBM恰好读取一次;(2) 维度分块,将嵌入维度划分为128宽的块,使得能够对溢出共享内存的d > 128嵌入进行评分;(3) 通过共享内存查找表进行融合乘积量化评分,将HBM I/O减少高达约31倍。在NVIDIA H100 GPU上,TileMaxSim达到峰值HBM带宽的80.2%,每秒评分8200万文档(在真实MS MARCO段落上为7160万/秒),比基于循环的评分快220倍,比融合PyTorch快6.5倍,比this http URL快6.6-8.5倍,比同一节点上WARP的CPU引擎的评分吞吐量高469倍。TileMaxSim保留了精确的检索质量:在MS MARCO和三个BEIR基准测试中,排名与参考MaxSim匹配。作为ColBERTv2/PLAID中的即插即用替代品,它将10万候选文档的评分延迟从268毫秒降低到1.2毫秒(端到端延迟降低98%)。我们进一步展示了从10万到50万文档的恒定吞吐量、数据并行多GPU分片、维度64-768的鲁棒性以及FP16/BF16/FP32支持。同时期的工作独立开发了一个IO感知的融合MaxSim内核;我们在d > 128的维度分块和融合乘积量化评分方面有所不同。

英文摘要:

MaxSim scoring dominates the cost of multi-vector retrieval. Several groups built fused GPU kernels for it independently during 2026, and all report one measure of success: the fraction of peak memory bandwidth reached. That measure assumes the operator is limited by the bytes it moves. We show the assumption fails in two ways, and that two other quantities decide performance: which side of the roofline ridge a shape falls on, and how many dependent gathers the scoring path performs. We first locate the boundary. Fused arithmetic intensity is Nq*Nd /(Nq + Nd) FLOP per byte, against an H100 dense-FP16 ridge of 295.4. The operator is therefore memory-bound at ColBERT shapes and compute-bound at ColPali-scale query lengths. Published analyses report one side each and do not reconcile them. We measure the crossover at three document lengths, and a closed form predicts it inside the measured bracket each time. Past the crossover, percent of peak bandwidth falls to 4% while percent of peak FLOPs rises above 40%. The reported measure is therefore defined on only one side of a boundary that real workloads cross. We also validate the underlying traffic model against DRAM counters, to 0.003%. We then show that moving fewer bytes does not make the kernel faster. Fusing product-quantized asymmetric distance computation into the kernel moves 15.9x fewer bytes than exact FP16 on tensor cores and runs 3.0x slower. Counters rule out the usual causes: it reaches 1.23% of peak DRAM throughput at 98.2% occupancy. The limit is 6.5*10^9 dependent gathers, a count that does not fall when the codes get smaller. A hand-written CUDA version with a staged table recovers 4.7x and remains slower than exact scoring. Finally, we give the first head-to-head comparison of three fused MaxSim kernels, over 28 shapes, with every result checked against an exhaustive FP32 reference.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑