liveBook · Manning

Model Serving

As explained in Generative AI in Action

Model serving is the provision of a trained machine-learning model as an operational service that accepts inputs and returns predictions or generated outputs.

Model serving deploys a trained machine-learning model as an operational service that accepts new data and returns predictions or generated outputs. In enterprise GenAI systems, it supports responsive, scalable applications alongside LLMOps, observability, model management, reliability, performance, security, and compliance. section 11.4 section 11.4.7

Production serving requires coordinated infrastructure and operational controls:

  • Scale resources with demand to preserve availability and cost-efficiency. section 11.4.7
  • Use caching to reduce latency and load balancing to distribute requests evenly. section 11.4.7
  • Plan for substantial skills, computing, operational, and specialized-hardware requirements, including GPUs with InfiniBand connectivity. section 11.4.7
  • Manage inference metrics, latency, quotas, rate limits, observability, and model updates as part of deployment. section 11.4 section 11.4.7

Production model transition

An enterprise assistant can route incoming requests through balanced serving capacity, reuse cached results where appropriate, monitor inference latency and behavior, and move to a new model through a blue-green deployment to minimize downtime. section 11.4 section 11.4.7

Listing 11.3 docker-cmpose file for MLflow
services:
  mlflow:
    image: ghcr.io/mlflow/mlflow:latest
    command: mlflow server --backend-store-uri /mlflow/mlruns 
    --default-artifact-root /mlflow/artifacts --host 0.0.0.0
    ports:
      - "5000:5000"
    volumes:
      - ./mlflow/mlruns:/mlflow/mlruns
      - ./mlflow/artifacts:/mlflow/artifacts

  prometheus:
    image: prom/prometheus:latest
    command: --config.file=/etc/prometheus/prometheus.yml
    ports:
      - "9090:9090"
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
      - ./prometheus/data:/prometheus/data
    depends_on:
      - mlflow

A Docker Compose setup pairs MLflow with Prometheus, illustrating a concrete foundation for managing and monitoring deployed ML services. section 11.4.7

How Generative AI in Action covers it

How deep it goes
Explains infrastructure, latency, scaling, caching, load balancing, updates, and observability without descending into model internals.
Examples
Uses MLflow and Prometheus deployment configuration, inference metric tracking, and production update scenarios as concrete examples.
What you can do after
Operate/configure serving infrastructure with scaling, caching, load balancing, observability, quotas, and controlled model updates.
How it connects
Connects model serving with LLMOps, observability, model management, scalability, caching, load balancing, and blue-green deployment.

Also explained in

Compare how 5 books explain Model Serving →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Generative AI in Action. The section links point to the parts of the book it draws on.