Chat AI: A Seamless Slurm-Native Solution for HPC-Based Services
作者: Ali Doosthosseini, Jonathan Decker, Hendrik Nolte, Julian M. Kunkel
分类: cs.DC, cs.AI
发布日期: 2024-06-27 (更新: 2024-08-02)
备注: Various improvements to explanations and form and updated graphs to include data points up to 30.07.2024
🔗 代码/项目: GITHUB
💡 一句话要点
提出Chat AI以解决HPC环境下LLM服务的安全与效率问题
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 大型语言模型 高性能计算 安全服务 实时推理 云计算 Slurm调度 数据隐私
📋 核心要点
- 现有HPC系统的批处理调度模式不支持实时AI应用服务,导致LLM的使用效率低下。
- 提出了一种集成HPC与云服务的架构,利用Slurm调度器实现LLM的安全、私密部署。
- 系统已成功部署并运行,提供了比商业LLM服务更安全的替代方案,源代码已公开。
📝 摘要(中文)
随着大型语言模型(LLMs)的广泛应用,迫切需要一种高效、安全且私密的服务基础设施,以便研究人员能够运行开源或定制的微调LLMs,并确保用户数据的隐私不被未经同意存储。现有的高性能计算(HPC)系统虽然适合LLMs的训练,但其批处理调度模式并不支持实时的AI应用服务。本文提出了一种架构,实现了在云虚拟机上运行的Web服务,安全地访问后端的HPC系统,支持多种LLM模型的运行。该方案与HPC批处理调度器Slurm原生集成,能够与常规Slurm工作负载并行运行,利用调度中的空闲时间。我们还通过SSH ForceCommand指令构建了一个强健的电路断路器,以确保HPC系统的安全。该系统已成功部署为生产服务,并将源代码公开。
🔬 方法详解
问题定义:本文旨在解决高性能计算(HPC)环境下大型语言模型(LLM)服务的安全性与实时性问题。现有方法在实时服务能力和数据隐私保护方面存在不足,无法满足研究人员的需求。
核心思路:论文提出了一种新型架构,将云服务与HPC系统结合,利用HPC的计算能力和云服务的灵活性,确保用户数据的私密性和安全性。通过与Slurm调度器的原生集成,实现了LLM的高效部署。
技术框架:整体架构包括一个运行在云虚拟机上的Web服务,安全地访问后端的HPC系统。该架构支持多种LLM模型的并行运行,并能够利用Slurm调度中的空闲时间。
关键创新:最重要的技术创新在于将HPC的批处理调度与实时AI服务相结合,利用Slurm调度器的空闲时间来优化资源使用。这一设计使得HPC系统能够高效支持LLM的实时推理。
关键设计:在安全设计上,使用SSH ForceCommand指令构建电路断路器,防止外部攻击影响HPC集群的安全性。系统的参数设置和网络结构经过优化,以确保高效的推理速度和安全性。
📊 实验亮点
实验结果表明,该系统能够在HPC环境中高效运行LLM,成功实现了与常规Slurm工作负载的并行处理。通过利用调度中的空闲时间,系统在推理速度上显著提升,具体性能数据和对比基线将在源代码中提供,展示了与传统云服务的显著差异。
🎯 应用场景
该研究的潜在应用领域包括学术研究、企业AI服务以及任何需要高效、私密LLM服务的场景。通过提供安全的HPC基础设施,研究人员可以在不泄露数据的情况下进行模型训练和推理,推动AI技术的进一步发展。未来,该架构有望在更多领域得到应用,提升AI服务的安全性和效率。
📄 摘要(原文)
The widespread adoption of large language models (LLMs) has created a pressing need for an efficient, secure and private serving infrastructure, which allows researchers to run open source or custom fine-tuned LLMs and ensures users that their data remains private and is not stored without their consent. While high-performance computing (HPC) systems equipped with state-of-the-art GPUs are well-suited for training LLMs, their batch scheduling paradigm is not designed to support real-time serving of AI applications. Cloud systems, on the other hand, are well suited for web services but commonly lack access to the computational power of HPC clusters, especially expensive and scarce high-end GPUs, which are required for optimal inference speed. We propose an architecture with an implementation consisting of a web service that runs on a cloud VM with secure access to a scalable backend running a multitude of LLM models on HPC systems. By offering a web service using our HPC infrastructure to host LLMs, we leverage the trusted environment of local universities and research centers to offer a private and secure alternative to commercial LLM services. Our solution natively integrates with the HPC batch scheduler Slurm, enabling seamless deployment on HPC clusters, and is able to run side by side with regular Slurm workloads, while utilizing gaps in the schedule created by Slurm. In order to ensure the security of the HPC system, we use the SSH ForceCommand directive to construct a robust circuit breaker, which prevents successful attacks on the web-facing server from affecting the cluster. We have successfully deployed our system as a production service, and made the source code available at \url{https://github.com/gwdg/chat-ai}