基于GPU的快速局部敏感散列束搜索
Fast Locality Sensitive Hashing for Beam Search on GPU
摘要:
我们提出了一种基于GPU的局部敏感哈希(LSH)算法,以加快序列模型的束搜索。我们利用赢家通吃(WTA)哈希,这是基于隐藏的维度的相对排名顺序,从而弹性的数值扰动。我们的算法设计充分考虑了CUDA支持的GPU的底层架构(算法/架构协同设计):1)并行Cuckoo哈希表用于LSH代码查找(保证O(1)查找时间); 2)候选列表在波束之间共享以最大化并行性; 3)顶部频繁字合并到候选列表中以提高性能。在4个大规模神经机器翻译模型上的实验表明,该算法在softmax模块上可以获得4倍的加速比,在GPU上可以获得2倍的整体加速比,而不会损害BLEU。
英文摘要:
We present a GPU-based Locality Sensitive Hashing (LSH) algorithm to speed up beam search for sequence models. We utilize the winner-take-all (WTA) hash, which is based on relative ranking order of hidden dimensions and thus resilient to perturbations in numerical values. Our algorithm is designed by fully considering the underling architecture of CUDA-enabled GPUs (Algorithm/Architecture Co-design): 1) A parallel Cuckoo hash table is applied for LSH code lookup (guaranteed O(1) lookup time); 2) Candidate lists are shared across beams to maximize the parallelism; 3) Top frequent words are merged into candidate lists to improve performance. Experiments on 4 large-scale neural machine translation models demonstrate that our algorithm can achieve up to 4x speedup on softmax module, and 2x overall speedup without hurting BLEU on GPU.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。