Skip to main content
QUICK REVIEW

[论文解读] Chat AI: A Seamless Slurm-Native Solution for HPC-Based Services

Ali Doosthosseini, Jonathan Decker|arXiv (Cornell University)|Jun 27, 2024
Distributed and Parallel Computing SystemsComputer Science被引用 5
一句话总结

本文提出了一种 Slurm 原生的网络服务架构,通过将网页界面与 SSH 限制的 HPC 代理、API 网关和调度器紧密集成,在 HPC 集群上实现私有、实时的 LLM 推理,使 LLM 与常规 Slurm 工作负载并行运行。

ABSTRACT

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}

研究动机与目标

  • 推动在本地部署大型语言模型以保护数据隐私并避免使用第三方服务。
  • 设计一个与 Slurm 无缝集成的服务架构,使实时 LLM 推理能够与批处理工作负载并行运行。
  • 通过纵深防御机制和企业级访问控制确保安全性和数据隐私。

提出的方法

  • 在云虚拟机上集成一个网络服务,并以可扩展的 HPC 后端通过 Slurm 托管 LLM。
  • 使用 API 网关(Kong)和单点登录(SSO,OAuth2/OpenID)进行身份验证和路由。
  • 实现带 SSH ForceCommand 的 HPC 代理,以安全地连接到 HPC 登录节点。
  • 开发一个调度器,通过查询 Slurm(squeue)并提交作业(sbatch)以根据需求维持服务实例。
  • 使用 vLLM 运行 LLM,以实现高效的 GPU 加速推理,并提供与 OpenAI 兼容的 API。
  • 可选地通过 External Proxy 暴露外部模型,并通过 Grafana/Prometheus 进行监控。
Figure 1: Architecture of Chat AI. This diagram displays the main components of the service, consisting of an ESX web server that communicates to the login/service node, and the compute nodes of the HPC KISSKI platform.
Figure 1: Architecture of Chat AI. This diagram displays the main components of the service, consisting of an ESX web server that communicates to the login/service node, and the compute nodes of the HPC KISSKI platform.

实验结果

研究问题

  • RQ1如何将基于 Slurm 的 HPC 资源重新用于在传统批处理工作负载的同时提供实时 LLM 推理?
  • RQ2需要哪些安全措施来防止对 web 面向的服务影响 HPC 集群安全?
  • RQ3Slurm 原生 LLM 服务架构的性能(延迟/吞吐量)和可扩展性如何?
  • RQ4在类似 GDPR 的制度下,所提出的架构对隐私和数据保护有何影响?
  • RQ5在学术/研究环境中的部署和用户采用有哪些实际考虑?

主要发现

  • 该架构实现了在现有 HPC 基础设施上托管的私有 LLM 服务的生产部署。
  • 通过 SSH ForceCommand 和多层纵深防御来增强安全性,降低集群被入侵的风险。
  • 性能评估显示了延迟和吞吐量的度量(原文摘录中未提供具体细节),并证明了对实时请求的服务能力。
  • 调度器通过监控 Slurm 并根据请求量动态扩展来维持服务实例。
  • 讨论了用户采用考虑因素和隐私影响,强调与 GDPR 一致性以及私有推理的好处。
Figure 2: Chat AI App. This shows the Chat AI web interface written with React and Vite with the chat history on the left, the prompt window on the top right and a drop down for model selection at the bottom right.
Figure 2: Chat AI App. This shows the Chat AI web interface written with React and Vite with the chat history on the left, the prompt window on the top right and a drop down for model selection at the bottom right.

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。