Model serving loads a previously trained machine learning model and uses it to generate predictions or inferences from new input data. It follows training in the machine-learning pipeline and is the component whose results reach users directly. section 4.1 section 9.3
Shows model serving as the pipeline stage after a model has been trained. section 4.1
A small deployment can run as one local program with a model and dataset that fit on one machine. Distributed serving instead runs across a cluster, where models and data may reside in a remote distributed database or across multiple disks. The distributed design must remain scalable, reliable, and efficient as request volume and request size grow. section 4.1 section 4.0
Video entity tagging
Users upload new videos to a stateless service. A model server retrieves a trained entity-tagging model from model storage, processes each video, and returns possible themes such as visual entities. A single server handling requests first-come, first-served creates long waits as traffic rises. section 4.2
Choose a serving pattern according to the operational bottleneck:
- Use replicated services to handle a growing number of requests through horizontal scaling. section 4.9
- Use sharded services when one large request cannot fit in the memory of an individual replica; distribute its processing across multiple shards. section 4.3.1 section 4.9
- Use event-driven processing when traffic is uncertain. Draw from a shared resource pool, pre-allocate for historical peaks, autoscale at limits, and apply rate limits to control concurrent requests. section 4.4 section 4.4.2
Resource allocation is a trade-off. Fixed capacity can leave resources idle when holiday-price prediction traffic falls, yet an unexpected surge can exceed planned capacity. A shared pool lets serving borrow resources needed for a surge while other pipeline components use the same pool; separate pools may be preferable when training needs different resources, such as GPUs. section 4.4 section 4.4.2
Serving in an end-to-end image-classification workflow
After data ingestion, distributed training, and model selection, the selected model is deployed for serving; predictions are then aggregated for users. One implementation creates a KServe InferenceService for a TensorFlow model from an Argo Workflow, with trained artifacts persisted for the serving step. section 7.1.2 section 9.4.1




