liveBook · Manning

Chapter 3: Large language model operations: Building a platform for LLMs

What you will learn in chapter 3 of LLMs in Production

The introduction explains why larger language models require scaled-up operations and infrastructure, then previews the chapter’s focus on deployment challenges, ways to reduce them, and supporting architecture.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The introduction explains why larger language models require scaled-up operations and infrastructure, then previews the chapter’s focus on deployment challenges, ways to reduce them, and supporting architecture.

Key terms: transformers, natural language processing (NLP), linguistically informed, operations, infrastructure, deployment challenges, large language model best practices, architecture

3.1 Introduction to large language model operations

Introduces LLMOps as MLOps scaled for large language models, then explains the production lifecycle and practices that MLOps covers.

Key terms: LLMOps, MLOps, scaling, machine learning life cycle, workflow orchestration, versioning, feedback loops, CI/CD, security

3.2 Operations challenges with large language models

This introduction explains why LLMOps merits a distinction from MLOps and frames the operational challenges of deploying large models.

Key terms: MLOps, LLMOps, Big Data, large models

3.2.1 Long download times

This section shows why the sheer size of LLMs makes downloading model files a production bottleneck, even when parallel downloads help.

Key terms: Bloom, download times, model size, sharded, parallel, gigabit speed fiber, bandwidth, I/O operations

3.2.2 Longer deploy times

Large LLMs take long enough to deploy that teams must rethink runtime downloads, restarts, scaling, and release workflows.

Key terms: GPU memory, GPU shortages, Bloom, download the model at run time, restart, redeploy, semi-irreversible process, bursty workloads, CI/CD, rolling updates

3.2.3 Latency

This section explains why LLM inference latency can be a production bottleneck even when a streamed chatbot response feels fast.

Key terms: inference latency, parameters, streamed, autocomplete, multiple GPUs, communication overhead, completion length, chain of thought (CoT)

3.2.4 Managing GPUs

This section explains why LLMs need GPUs and why adding them to production systems creates tooling, provisioning, and latency challenges.

Key terms: GPUs, CPUs, parallel processing, linear algebra, matrix multiplications, tensor operations, system architectures, orchestrating tooling, Kubernetes, containers

3.2.5 Peculiarities of text data

The section explains why the meaning of text is harder to encode numerically than physical measurements, and how that difficulty complicates LLM operations.

Key terms: text data, qualitative, pixels, RGB values, decibels, hertz, embeddings, encode text, machine learning models, numbers

3.2.6 Token limits create bottlenecks

This section explains why LLM input-token limits are difficult to raise and how they affect response time, hardware requirements, and users of different languages.

Key terms: token limit, context, GPU memory, attention, quadratic, inference times, timeout error rate, out-of-memory (OOM) errors, LLaMA, tokens per character

3.2.7 Hallucinations cause confusion

This section explains why plausible but false LLM outputs are difficult to spot and why production teams must prepare for them despite the lack of a reliable fix.

Key terms: hallucinations, uncertainty, rewards, inaccuracies, biases

3.2.8 Bias and ethical considerations

This section explains why LLM operations must address both dangerous answers and biases learned from large, insufficiently filtered text datasets.

Key terms: bias and ethical considerations, text data, bias, curated, filtered, regular expressions, implicit human biases

3.2.9 Security concerns

This section explains how LLMs can expose sensitive information through prompts or compromised model files, and why both risks need safeguards.

Key terms: training corpus, finetuning, sensitive data, prompt injection, jailbreak, hallucinations, API keys, environment variables, pickle, pickle injections

3.2.10 Controlling costs

This section explains why LLM costs extend beyond hardware purchases and why variable token usage makes cost engineering essential.

Key terms: infrastructure costs, GPUs, training, inference, operational costs, data, finetune, model updates, security measures, compliance

3.3 LLMOps essentials

This section introduces compression and distributed computing as responses to LLM operations challenges, then points ahead to the infrastructure and tooling that support them.

Key terms: compression, shrinking, trimming, approximating, distributed computing, single GPU’s memory

3.3.1 Compression

This section compares ways to reduce an LLM’s memory or computation costs while managing the resulting accuracy, training, and deployment tradeoffs.

Key terms: quantization, FP32, FP16, BF16, INT8, INT2, post-training static quantization, PTQ, dynamic quantization, clipping errors

3.3.2 Distributed computing

Explains how data, tensor, sequence, and pipeline parallelism distribute LLM workloads, and how combining them affects memory use, communication, and GPU utilization.

Key terms: data parallelism, DistributedDataParallel, Ray, tasks, actors, tensor parallelism, column parallelism, row parallelism, MLP, attention

3.4 Infrastructure, GPUs, and Vector Databases

This section explains why LLM infrastructure must support the machine learning life cycle and maps the DevOps, DataOps, and MLOps components that lead to production deployment.

Key terms: machine learning life cycle, infrastructure, LLMs, DevOps, DataOps, MLOps, data at rest, data in motion, vector database, monitoring system

3.4.1 Data infrastructure

This section explains the DataOps infrastructure beneath MLOps, the roles of its main components, and two additional infrastructure considerations.

Key terms: MLOps, DataOps, DevOps, data store, orchestrator, pipelines, batch inference, container registry, containers, consistency

3.4.2 Experiment trackers

Experiment trackers make LLM experiments searchable and useful to a team, provided they record model lineage and support meaningful evaluation.

Key terms: experiment trackers, tests and results, MLOps, finetuning, checkpoint, original training experiment, training data, evaluation metric tooling, evaluation metrics, ROUGE

3.4.3 Model registry

This section explains what a model registry needs to do and why LLM size makes storage capacity especially important.

Key terms: model registry, object store, shared filesystem, metadata, experiment tracker, versioning, A/B testing, shadow tests, access, promoting

3.4.4 Feature stores

This section explains how feature stores make features discoverable and consistent across training and serving, and why they can help LLMs use external context.

Key terms: feature store, single source of truth, collaboration, documentation, versioning, training-serving skew, online feature serving, point-in-time retrievals, LLMs, embeddings

3.4.5 Vector databases

The section explains how vector databases retrieve similar embeddings, how they work with feature stores, and what to consider when choosing one for an LLM application.

Key terms: vector databases, embeddings, metadata, nearest neighbors, similarity searches, cosine similarity, feature store, vector DB, embedding models, data sources

3.4.6 Monitoring system

This section explains why LLM monitoring matters, what to measure, and why changes in language make monitoring difficult.

Key terms: fail silently, data drift, monitoring system, memory and CPU utilization, latency, queries per second, status codes, error rates, missing values, unique tokens

3.4.7 GPU-enabled workstations

This section explains why LLM teams need GPU-enabled workstations and how to estimate GPU memory for inference and training.

Key terms: GPU-enabled workstations, remote workstations, on-premise, T4, V100, A100, H100, L4 Tensor Core GPU, GPU memory, FP16

3.4.8 Deployment service

The section explains how a deployment service turns an LLM model and its supporting infrastructure into a production service, from serving interfaces to operational resources and release pipelines.

Key terms: deployment service, MLOps, REST, gRPC, batch or streaming pipeline, NVIDIA Triton Inference Service, MLServer, Seldon, BentoML, KServe V2 Inference Protocol

3.5 Summary

The chapter summary connects LLM operational challenges to model compression, parallelism, and infrastructure designed for LLM workloads.

Where this is used later

Concepts explained in this chapter

← Chapter 2: Large language models: A deep dive into language modeling Chapter 4: Data engineering for large language models: Setting up for success →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.