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

Architectures for Embedded LLMs

Embedded LLMs push AI to the edge, running directly on devices where the data originates. This is where retail gets interesting. Point-of-sale systems, handheld inventory scanners, kiosks, and mobile apps all become capable of sophisticated language understanding without a round trip to the cloud.

The hardware constraint is real. A retail kiosk might have 8GB of RAM and a mobile chip designed for power efficiency, not AI inference. Store associates’ handheld devices have even tighter constraints. Yet, by late 2024,

models like Mistral 7B could run on such devices through aggressive optimization. The key breakthrough was quantization, reducing model precision from 16-bit floating-point numbers to 4-bit integers. GPTQ (Gradient-Based Post-Training Quantization), developed by researchers at ETH Zurich and IST Austria in 2022, made it possible to compress models to one-quarter their original size with minimal quality degradation. A 7-billion-parameter model that originally required 28GB of VRAM could run in 7GB after 4-bit quantization.

GGUF (GPT-Generated Unified Format), introduced by Georgi Gerganov in 2023 as an evolution of his earlier GGML format, became the de facto standard for running models on consumer hardware. GGUF files packaged model weights with metadata about quantization schemes, making it simple to deploy the same model across different devices. A retailer could maintain a single GGUF file and deploy it to iOS devices, Android tablets, Windows kiosks, and Linux servers, with the runtime adapting to available hardware.

Model distillation offers another path. Take a large, capable model and train a smaller model to mimic its behavior. The student model learns to reproduce the teacher’s outputs without understanding all the reasoning that went into them. This is how you get 3-billion-parameter models that perform like 30-billion-parameter models on specific tasks. For retail, distillation means creating models that excel at tasks like product recommendations, inventory queries or policy lookups, while remaining small enough to run anywhere.

Local vector stores complete the picture. Embedded LLMs are more powerful when paired with retrieval systems that can surface relevant context without a server round trip. Vector databases like SQLite with the vec0 extension, introduced in 2024, made it possible to run semantic search directly on device. A retail associate’s handheld could store embeddings for the entire product catalog, a few hundred megabytes, and do similarity searches in milliseconds. Query “waterproof hiking boots size 10” and the device instantly surfaces relevant products by semantic similarity, all without network connectivity.

The architectural pattern that emerged looks like this: a quantized LLM running locally, a vector store with embedded product or policy data, and selective synchronization when connectivity is available. When the kiosk or handheld has network access, it syncs new product data and model updates in the background. When offline, it continues functioning with slightly stale data. For retail environments with spotty WiFi or cellular connectivity, this architecture means AI features keep working regardless of network conditions.

Key Embedded LLM Use Cases
  • Offline retail kiosks: rural locations, warehouses, cruise ships — AI works without connectivity
  • Privacy-sensitive data: purchase history, return patterns, support tickets stay on-premises
  • Ultra-low latency: 50–100ms local inference vs. 500–800ms cloud round trips (users notice >100ms)
  • Multi-tenant marketplaces: one private model with strict tenant isolation, not separate API calls
  • Regulated environments: GDPR, HIPAA, CCPA, NIST 800-171 compliance mandates local processing
MLOps Governance Pipeline
Version & Deploy
  • DVC / MLflow for model artifact versioning
  • Kubernetes + TorchServe / vLLM for serving
  • Staged rollouts: canary → percentage traffic shifting
Monitor & Detect Drift
  • System metrics: latency, throughput, error rates
  • ML metrics: confidence distributions, output diversity
  • Versioned prompts with LangSmith / PromptLayer
Rollback & Iterate
  • Keep multiple model versions deployed simultaneously
  • Automated rollback triggers on metric degradation
  • Regression tests ensuring parity on key benchmarks
🌐
Source: AI Best Practices for Commerce, Section 5.4
Share

Last updated: March 12, 2026