How parallel-inference-tuner works
Most model servers run with whatever threading the library picked: all logical cores for every prediction, more workers than CPUs, or a container that thinks it has 64 cores when it has 2. The result is slower responses and more energy per prediction than the hardware needs.
parallel-inference-tuner measures your model on the machine it will run on. It times every combination of thread count and batch size, runs several worker processes together to see how they compete for the CPU, and then simulates your real request rate against your latency target. You get the settings to use, the environment variables to set, and the predicted latency and energy per request.
It works with XGBoost, LightGBM, CatBoost, scikit-learn, ONNX Runtime and PyTorch models.
Try it
pip install parallel-inference-tuner
parallel-inference-tuner model.json --data rows.csv --rate 300 --slo-ms 20
Free and open source under the MIT license. Serving models on CPUs and paying too much for it? Book a call.