Model deployment is the step where a trained AI model moves from a notebook or lab computer into a real product that people can use. A model might recognize images, recommend videos, detect spam, or predict tomorrow's temperature, but it is not useful until it can receive new data and return predictions reliably. Deployment matters because it connects machine learning to apps, websites, robots, sensors, and decision systems in the real world.
Key Facts
- Training creates a model from data, while deployment makes the model available for real users or other software.
- A deployed model usually follows the flow: input data -> preprocessing -> model prediction -> output result.
- Prediction can be written as y = f(x), where x is the input, f is the trained model, and y is the predicted output.
- Accuracy = correct predictions / total predictions, but deployed systems also need speed, reliability, and safety.
- Latency is the time between sending an input and receiving an output, often measured in milliseconds.
- Monitoring checks whether the model still works well after deployment as new real-world data changes over time.
Vocabulary
- Model deployment
- Model deployment is the process of putting a trained machine learning model into a system where it can make predictions on new real-world data.
- API
- An API is a set of rules that lets one program send data to another program and receive a result.
- Inference
- Inference is the process of using a trained model to make a prediction from new input data.
- Latency
- Latency is the delay between a system receiving a request and returning a response.
- Monitoring
- Monitoring is the ongoing process of checking a deployed model for accuracy, speed, errors, and changes in data.
Common Mistakes to Avoid
- Thinking training and deployment are the same, which is wrong because training builds the model and deployment makes it usable by people or software.
- Ignoring preprocessing, which is wrong because the deployed model must receive data in the same format used during training.
- Only checking accuracy, which is wrong because a deployed model also needs low latency, reliability, fairness, privacy, and security.
- Assuming a deployed model works forever, which is wrong because real-world data can change and reduce performance over time.
Practice Questions
- 1 A deployed model receives 500 requests in one minute and gives correct predictions for 460 of them. What is its accuracy as a decimal and as a percent?
- 2 An app sends an image to a model server. Preprocessing takes 80 ms, model inference takes 120 ms, and sending the result back takes 50 ms. What is the total latency?
- 3 A school lunch prediction model was trained using data from last year, but this year the menu and student schedules changed. Explain why monitoring is important after deployment and name one signal the team should track.