arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.04539cs.IRcs.CL
收藏

将大语言模型蒸馏为BERT用于网页搜索排序的最佳实践

Best Practices for Distilling Large Language Models into BERT for Web Search Ranking

Tencent(腾讯)

Dezhi Ye, Junwei Hu, Jiabin Fan, Bowen Tian, Jie Liu, Haijin Liang, Jin Ma

AI总结:

本研究提出将大语言模型的排序能力通过持续预训练、排序损失微调及混合点式和边际MSE损失蒸馏至BERT,以低成本实现高效网页搜索排序,并已在商业引擎中部署验证。

摘要:

近期研究强调了大型语言模型(LLM)作为零样本相关性排序器的巨大潜力。这些方法主要利用提示学习,通过生成潜在文档的排序列表来评估查询与文档之间的相关性。尽管前景广阔,但LLM带来的高昂成本对其在商业搜索系统中的直接实施构成了重大挑战。为克服这一障碍并充分利用LLM在文本排序方面的能力,我们探索了将LLM的排序专业知识迁移到类似BERT的更紧凑模型的技术,使用排序损失以实现资源消耗较少的模型的部署。具体而言,我们通过持续预训练来增强LLM的训练,将查询作为输入,将点击的标题和摘要作为输出。随后,我们使用排序损失对LLM进行监督微调,将最终标记指定为整个句子的代表。鉴于自回归语言模型的固有特性,只有最终标记</s>能够封装所有前面的标记。此外,我们引入了一种混合的点式和边际MSE损失,将排序知识从LLM迁移到类似BERT的较小模型。该方法为资源受限严格的环境创造了一种可行的解决方案。离线和在线评估均证实了我们方法的有效性,我们的模型已于2024年2月成功集成到商业网络搜索引擎中。

英文摘要:

Recent studies have highlighted the significant potential of Large Language Models (LLMs) as zero-shot relevance rankers. These methods predominantly utilize prompt learning to assess the relevance between queries and documents by generating a ranked list of potential documents. Despite their promise, the substantial costs associated with LLMs pose a significant challenge for their direct implementation in commercial search systems. To overcome this barrier and fully exploit the capabilities of LLMs for text ranking, we explore techniques to transfer the ranking expertise of LLMs to a more compact model similar to BERT, using a ranking loss to enable the deployment of less resource-intensive models. Specifically, we enhance the training of LLMs through Continued Pre-Training, taking the query as input and the clicked title and summary as output. We then proceed with supervised fine-tuning of the LLM using a rank loss, assigning the final token as a representative of the entire sentence. Given the inherent characteristics of autoregressive language models, only the final token </s> can encapsulate all preceding tokens. Additionally, we introduce a hybrid point-wise and margin MSE loss to transfer the ranking knowledge from LLMs to smaller models like BERT. This method creates a viable solution for environments with strict resource constraints. Both offline and online evaluations have confirmed the efficacy of our approach, and our model has been successfully integrated into a commercial web search engine as of February 2024.

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

↑