arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2408.01452cs.CYcs.AIcs.LG
收藏

在生产环境中构建领域专用护栏模型

Building a Domain-specific Guardrail Model in Production

Emergence AI;Stanford University(斯坦福大学)
Mohammad Niknazar, Paul V Haley, Latha Ramanan, Sang T. Truong, Yedendra Shrinivasan, Ayan Kumar Bhowmick, Prasenjit Dey, Ashish Jagmohan, Hema Maheshwari, Shom… 展开作者

Mohammad Niknazar, Paul V Haley, Latha Ramanan, Sang T. Truong, Yedendra Shrinivasan, Ayan Kumar Bhowmick, Prasenjit Dey, Ashish Jagmohan, Hema Maheshwari, Shom Ponoth, Robert Smith, Aditya Vempaty, Nick Haber, Sanmi Koyejo, Sharad Sundararajan

AI总结:

本文以K-12教育平台为例,介绍了构建和部署领域专用护栏模型的完整流程,包括需求制定、训练与基准测试,以及从硬件到推理层的全栈优化,其模型在教育和安全基准上优于同类及更大规模的模型。

摘要:

生成式人工智能有望实现一系列备受期待的能力,并革新各类消费者和企业垂直领域的工作流程。然而,将模型投入生产远不止生成输出那么简单。它涉及确保模型可靠、安全、性能良好,并且遵守特定领域的运营政策。护栏作为模型的必要组成部分,其发展源于对模型行为进行适当约束的需求,尤其是在模型处于生产环境中时。在本文中,我们以教育作为用例,鉴于该领域对内容适当性的严格要求,展示如何训练和部署生产环境中的护栏模型。具体而言,我们描述了为K-12教育平台构建生产级护栏模型的经验。我们首先制定部署到这一敏感领域的需求。然后,我们描述了领域专用护栏模型的训练和基准测试,该模型在专有的教育相关基准和与安全通用方面相关的公开基准上,优于规模相近及更大的竞争性开源和闭源指令微调模型。最后,我们详细说明了在架构上所做的选择以及为在生产环境中部署该服务所做的优化;这些优化贯穿整个技术栈,从硬件基础设施到服务层,再到语言模型推理优化。我们希望本文能对其他希望基于生成式人工智能和大语言模型创建生产级领域专用服务的从业者具有指导意义。

英文摘要:

Generative AI holds the promise of enabling a range of sought-after capabilities and revolutionizing workflows in various consumer and enterprise verticals. However, putting a model in production involves much more than just generating an output. It involves ensuring the model is reliable, safe, performant and also adheres to the policy of operation in a particular domain. Guardrails as a necessity for models has evolved around the need to enforce appropriate behavior of models, especially when they are in production. In this paper, we use education as a use case, given its stringent requirements of the appropriateness of content in the domain, to demonstrate how a guardrail model can be trained and deployed in production. Specifically, we describe our experience in building a production-grade guardrail model for a K-12 educational platform. We begin by formulating the requirements for deployment to this sensitive domain. We then describe the training and benchmarking of our domain-specific guardrail model, which outperforms competing open- and closed- instruction-tuned models of similar and larger size, on proprietary education-related benchmarks and public benchmarks related to general aspects of safety. Finally, we detail the choices we made on architecture and the optimizations for deploying this service in production; these range across the stack from the hardware infrastructure to the serving layer to language model inference optimizations. We hope this paper will be instructive to other practitioners looking to create production-grade domain-specific services based on generative AI and large language models.

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

↑