高效三值权重嵌入模型:桥接可扩展性与性能
Efficient Ternary Weight Embedding Model: Bridging Scalability and Performance
AI总结:
本文提出一种三值权重嵌入模型微调框架,通过自教知识蒸馏降低内存与计算开销,并在结合ANN搜索的实验中验证了其在保持准确性的同时显著提升推理效率。
摘要:
嵌入模型已成为自然语言处理和计算机视觉中的重要工具,能够实现高效的语义搜索、推荐、聚类等任务。然而,全精度嵌入的高内存和计算需求给资源受限环境(如实时推荐系统)中的部署带来了挑战。在本工作中,我们提出了一种新颖的微调框架,用于三值权重嵌入模型,在保持高性能的同时降低内存和计算开销。为了将三值化应用于预训练嵌入模型,我们引入了自教知识蒸馏来最终确定线性层的三值权重。通过在公开文本和视觉数据集上的大量实验,我们证明在不牺牲有效性的情况下,三值化模型在推理阶段具有低内存占用和低延迟,并且效率很高。在实际实现中,嵌入模型通常与近似最近邻(ANN)搜索集成。我们将三值嵌入与ANN搜索结合的实验在准确性和计算效率方面均取得了显著提升。代码仓库可在以下地址获取:here。
英文摘要:
Embedding models have become essential tools in both natural language processing and computer vision, enabling efficient semantic search, recommendation, clustering, and more. However, the high memory and computational demands of full-precision embeddings pose challenges for deployment in resource-constrained environments, such as real-time recommendation systems. In this work, we propose a novel finetuning framework to ternary-weight embedding models, which reduces memory and computational overhead while maintaining high performance. To apply ternarization to pre-trained embedding models, we introduce self-taught knowledge distillation to finalize the ternary-weights of the linear layers. With extensive experiments on public text and vision datasets, we demonstrated that without sacrificing effectiveness, the ternarized model consumes low memory usage and has low latency in the inference stage with great efficiency. In practical implementations, embedding models are typically integrated with Approximate Nearest Neighbor (ANN) search. Our experiments combining ternary embedding with ANN search yielded impressive improvement in both accuracy and computational efficiency. The repository is available at here.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。