Technology Overview

The AI technology stack for commerce — foundational models, agentic AI, LLMs, privacy & security, investment costs, and what comes next — based on Book Part 5 of the AI Best Practices for Commerce reference.

Section 4 of 850% complete

Private & Embedded LLMs

Bringing AI inside your own infrastructure

What Is a Private LLM?

The dream of bringing AI into your own infrastructure isn’t new. What’s new is that it’s finally practical. By 2024, the combination of open-source large language models, commodity hardware capable of running them, and mature deployment tooling had transformed private AI from a research project into a production-ready option for retailers who couldn’t or wouldn’t send their data to the cloud.

Meta’s release of Llama 2 in July 2023 marked a turning point. For the first time, retailers could download a model with capabilities approaching GPT-3.5, deploy it on their own infrastructure, and customize it for their specific needs without paying per-token or worrying about their data leaving their environment. By late 2024, models like Mistral 7B and Llama 3 offered performance that rivaled commercial APIs for many retail tasks, while running on hardware that cost thousands rather than millions.

This chapter explores what it actually means to bring LLMs into your stack, from the architectural decisions that matter to the operational realities you’ll face. It’s about the middle ground between “we send everything to OpenAI” and “we’re training our own foundation model from scratch.” This is the space where most retailers will actually operate.

5.4.1 What Is a Private LLM?

A private LLM is simply a large language model that runs on infrastructure you control, where your data never leaves your security perimeter. But that simple definition hides three distinct deployment patterns, each with different tradeoffs.

Running in Your Cloud means deploying open-source models like Llama 3 or Mistral on your own AWS, Azure, or Google Cloud infrastructure. You control the compute, the data never touches a third-party API, and you can customize the model’s behavior. Amazon’s introduction of EC2 P5 instances in 2023, each equipped with eight NVIDIA H100 GPUs, made it possible to serve even 70-billion-parameter models with acceptable latency. A single P5 instance could handle inference for models up to 70B parameters using techniques like FlashAttention and continuous batching. The compute cost is yours to optimize: You can scale down during slow periods, use spot instances for batch processing, and choose exactly where your data gets processed geographically.

Running On-Premises takes it further. The model runs on servers in your data center, behind your firewall, integrated with your existing authentication and monitoring systems. This matters for retailers with significant existing infrastructure investments or strict data-residency requirements. A major retailer might already have GPU compute for demand forecasting or fraud detection. Adding LLM inference to existing hardware becomes an incremental decision rather than a new architectural commitment. The tradeoff is operational complexity. You own the entire stack: Hardware failures, capacity planning, model updates, and security patching all become your responsibility.

Air-Gapped Environments represent the extreme. The model runs on infrastructure with no internet connectivity whatsoever. Defense contractors, certain financial services firms, and medical research organizations operate in these environments. In these environments, private LLMs aren’t a choice based on cost or performance. They’re the only option. Updates happen through manual deployment processes. Model weights get transferred on encrypted drives. Every dependency gets vetted and approved. It’s slower and more expensive, but for classified or regulated data, it’s the only way to use modern AI capabilities.

Private LLM Deplyment Spectrum
Private LLM Deplyment Spectrum
Three Private LLM Deployment Patterns
Cloud-Hosted Private
  • Your own AWS/Azure/GCP tenant
  • Data never touches third-party API
  • AWS EC2 P5: 8× H100 GPUs for 70B models
  • Scale down during slow periods, spot instances for batch
On-Premises
  • Servers in your own data center, behind your firewall
  • Maximum data-residency control
  • Leverage existing GPU clusters (fraud detection, forecasting)
  • Full operational complexity: hardware, updates, patching
Air-Gapped
  • Zero internet connectivity
  • Manual weight transfer on encrypted drives
  • Required for classified or regulated environments
  • Defense, healthcare research, certain financial services
🌐
Source: AI Best Practices for Commerce, Section 5.4
Share

Last updated: March 12, 2026