Skip to content

Deploying Machine Learning Models

Batch scoring, real-time APIs, streaming and on-device inference: choosing how predictions reach users, and deploying safely.

Editorial team 2 min read

A model only creates value when its predictions reach people or systems. How you deploy depends on how predictions are used.

Deployment Patterns

  • Batch scoring: run the model on a schedule and store predictions in a table — nightly churn scores, weekly demand forecasts. Simple and robust.
  • Real-time API: a service returns predictions on request, within milliseconds to seconds — fraud checks during payment, recommendations on page load.
  • Streaming: score events as they flow through a stream.
  • Embedded / on-device: run in a mobile app, browser or edge device for low latency, offline use or privacy.

Packaging

Package the model with its preprocessing and exact dependencies — often in a container — so production behaves like training. Formats such as ONNX help run models across frameworks.

Safe Rollout

  • Shadow mode: the new model runs alongside the old one without affecting decisions, so outputs can be compared.
  • Canary release: send a small share of traffic to the new model first.
  • A/B tests to measure business impact.
  • Rollback to the previous version in one step.

Operational Concerns

Latency, throughput, scaling, cost per prediction, input validation, logging for debugging and audits, and security.

Fallbacks

Decide what happens when the model is unavailable or uncertain: default rules, cached predictions or human review.

Choose the Simplest Pattern

If predictions can be computed in advance, batch scoring avoids much of the complexity of real-time serving.

More in MLOps & deployment

All MLOps & deployment guides →
MLOps & deployment Guide · 2 min

What Is MLOps?

The practices that take machine learning from notebook to reliable production: versioning, automation, deployment and monitoring.

MLOps & deployment 2 min read 10 Dec 2025

MLOps & deployment Guide · 2 min

Monitoring Machine Learning Models in Production

What to monitor after deployment — data, predictions, outcomes and operations — and how to respond when things change.

MLOps & deployment 2 min read 8 Dec 2025

MLOps & deployment Guide · 2 min

Model Registries and Versioning

Why every production model needs a version, metadata and lineage, and how a model registry manages promotion and rollback.

MLOps & deployment 2 min read 7 Dec 2025

MLOps & deployment Guide · 2 min

CI/CD for Machine Learning

Continuous integration and delivery adapted to ML: testing code, data and models automatically before deployment.

MLOps & deployment 2 min read 6 Dec 2025