Chapter 5. Secure Deployment of LLMs
The secure deployment of large language models represents a critical challenge that operates across multiple security layers. While previous chapters focused on privacy-preserving training techniques, even the most securely trained model can be compromised if not properly deployed. This chapter explores the essential aspects of secure deployment, structured around three fundamental protection layers:
- Infrastructure security
-
The foundational layer protecting the physical and virtual resources hosting the model
- Access control
-
The intermediary layer managing who can interact with the model and how
- Runtime security
-
The operational layer ensuring secure execution during model inference
Figure 5-1 illustrates these three security layers as concentric circles, with infrastructure security forming the outermost layer of defense, access control providing intermediate protection, and runtime security safeguarding the core model operations. Each layer builds upon the previous one, creating a comprehensive security architecture.
Figure 5-1. The three layers of LLM deployment security
This chapter focuses on the critical aspects of secure deployment, including model hosting, API design, and version management. Deploying LLMs securely requires careful consideration of multiple factors: the infrastructure that hosts the model, the interfaces through ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access