The short answer
An inference server is software that loads a trained machine learning model and answers requests for its predictions. An application sends input to the server, usually over a network. The server runs the model and sends back the output.
Why a server is needed
Running a model once on a laptop is simple. Serving it to many users at the same time is harder. The model has to stay loaded in memory, accept requests, run them efficiently and return results quickly. An inference server handles these jobs, so the application does not have to.
What an inference server typically does
- Loads the model file and keeps it ready to run.
- Accepts requests, often through an HTTP or gRPC interface.
- Groups several requests into a batch so the hardware can process them together.
- Runs the model on a central processor (CPU) or a graphics processor (GPU).
- Manages more than one model, or more than one version of the same model.
Common tools
Several tools do this job. NVIDIA Triton Inference Server supports models from several frameworks. TensorFlow Serving is built for TensorFlow models, and TorchServe is built for PyTorch models. The right choice depends on the framework the model was built with, the hardware it runs on and how much traffic it receives.
Inference server or inference engine?
The names can overlap. In classic AI, an inference engine is the rule-applying part of an expert system. Some newer serving tools are also called inference engines, so the words are used in more than one way. For the rule-based meaning, see is ChatGPT an inference engine.
Inference server and the model’s calculation
An inference server runs inference repeatedly. The server is the surrounding software: it handles requests, batching and model management. Inference is the calculation the model performs on each request. For more on that calculation, see what is inference in the context of AI models.
Key points
- An inference server loads a trained model and answers prediction requests.
- It handles batching and model management, so the application does not have to.
- Common choices include NVIDIA Triton, TensorFlow Serving and TorchServe.