Inference Runtimes

October 30, 2023 ยท View on GitHub

Inference runtimes allow you to define how your model should be used within MLServer. You can think of them as the backend glue between MLServer and your machine learning framework of choice.

Out of the box, MLServer comes with a set of pre-packaged runtimes which let you interact with a subset of common ML frameworks. This allows you to start serving models saved in these frameworks straight away. To avoid bringing in dependencies for frameworks that you don't need to use, these runtimes are implemented as independent (and optional) Python packages. This mechanism also allows you to rollout your own custom runtimes very easily.

To pick which runtime you want to use for your model, you just need to make sure that the right package is installed, and then point to the correct runtime class in your model-settings.json file.

Included Inference Runtimes

FrameworkPackage NameImplementation ClassExampleDocumentation
Scikit-Learnmlserver-sklearnmlserver_sklearn.SKLearnModelScikit-Learn exampleMLServer SKLearn
XGBoostmlserver-xgboostmlserver_xgboost.XGBoostModelXGBoost exampleMLServer XGBoost
Spark MLlibmlserver-mllibmlserver_mllib.MLlibModelComing SoonMLServer MLlib
LightGBMmlserver-lightgbmmlserver_lightgbm.LightGBMModelLightGBM exampleMLServer LightGBM
CatBoostmlserver-catboostmlserver_catboost.CatboostModelCatBoost exampleMLServer CatBoost
Tempotempotempo.mlserver.InferenceRuntimeTempo examplegithub.com/SeldonIO/tempo
MLflowmlserver-mlflowmlserver_mlflow.MLflowRuntimeMLflow exampleMLServer MLflow
Alibi-Detectmlserver-alibi-detectmlserver_alibi_detect.AlibiDetectRuntimeAlibi-detect exampleMLServer Alibi-Detect
:hidden:
:titlesonly:

SKLearn <./sklearn>
XGBoost <./xgboost>
MLflow <./mlflow>
Tempo <https://tempo.readthedocs.io>
Spark MLlib <./mllib>
LightGBM <./lightgbm>
Catboost <./catboost>
Alibi-Detect <./alibi-detect>
Alibi-Explain <./alibi-explain>
HuggingFace <./huggingface>
Custom <./custom>