Production ML & MLOps
Model Serving & Inference
Serving is the production path from request to prediction. It must satisfy latency, throughput, availability, versioning, security, observability, and rollback constraints — not just load a model artifact.
- Batch inference optimizes throughput
- Online inference optimizes freshness
- Streaming improves perceived responsiveness
- Versioning is non-negotiable
- Serving hardware changes the economics
- Prediction logging enables debugging
| Mode | Use when | Trade-off |
|---|---|---|
| Batch | Predictions can be precomputed | Cheap and scalable, but stale |
| Online sync | User waits for result | Fresh, but latency-sensitive |
| Async online | Result can arrive later | More resilient, more workflow complexity |
| Streaming | Partial output helps UX | Client/server complexity |
| Edge/on-device | Privacy/latency constraints | Model size and update constraints |