treelite-runtime
Treelite runtime
What it is and what it does
Treelite-runtime is a Python wrapper around a C++ runtime for executing decision tree forest models. It loads pre-compiled tree models serialized in Treelite's universal format and performs inference on new data. The package is designed to be lightweight and fast, relying on numpy and scipy for numerical operations.
The runtime does not train or compile models—it only executes them. Users must first export a tree model to Treelite's serialized format using the main Treelite library, then load and run predictions with this runtime package. It is primarily useful for production inference pipelines where model serving speed and portability across platforms matter.
Use it for:
- Serving tree-based models in production with low-latency inference requirements.
- Deploying models across heterogeneous platforms (Linux, macOS, Windows) using a single serialized format.
- Embedding fast tree inference in Python applications without retraining or recompiling models.
- Benchmarking or comparing inference performance of tree models across different runtime implementations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Treelite-runtime provides a Python runtime for loading and executing decision tree forest models that have been serialized in the Treelite format, enabling fast inference on tree-based models.
Yes, if you have a pre-compiled Treelite model and need fast, portable inference in Python. The package is stable, permissively licensed, and actively maintained. Install friction is moderate due to platform-specific wheels, but that is handled transparently by pip. Not useful without an existing Treelite model file.
Install
treelite-runtime on PyPI
pip
pip install treelite-runtimeuv
uv add treelite-runtimepoetry
poetry add treelite-runtimeInstalling treelite-runtime
Before you install
Medium install friction due to platform-specific wheels across macOS, Linux, and Windows. Active maintenance with last commit on 2026-08-12 and production-stable status; latest release was 2023-09-13, indicating a mature package with stable API.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions beyond attribution and liability disclaimers.
Quickstart
pip install treelite-runtime
import treelite_runtime
predictor = treelite_runtime.Predictor('model.so')
predictions = predictor.predict(data)
Requires a pre-compiled Treelite model file (.so on Linux/macOS, .dll on Windows); the runtime does not compile or train models, only executes them.
Verify before relying
- Whether the package works with current versions of numpy and scipy beyond the stated Python 3.7–3.8 classifier support.
- Performance characteristics and typical inference latency compared to other tree runtime formats.
- Whether model files from older Treelite versions remain compatible with runtime 3.9.1.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 2 — numpy, scipy |
| Maintenance | actively maintained — 1,066 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 165,158/month — #10,529 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: treelite_runtime-3.9.1-py3-none-macosx_10_15_x86_64.macosx_11_0_x86_64.macosx_12_0_x86_64.whl; treelite_runtime-3.9.1-py3-none-macosx_12_0_arm64.whl; treelite_runtime-3.9.1-py3-none-manylinux2014_x86_64.whl; treelite_runtime-3.9.1-py3-none-win_amd64.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
treeliteTreelite serializes and exchanges decision tree…
permissive · top 15,000 on PyPI
treeinterpreterDecomposes scikit-learn decision tree and…
permissive · top 15,000 on PyPI
py_treespy_trees implements behaviour trees in Python,…
permissive · top 15,000 on PyPI
tensorflow-decision-forestsTrains and deploys decision forest models…
permissive · top 15,000 on PyPI
dtreevizdtreeviz renders decision trees from…
permissive · top 15,000 on PyPI
ydfYDF trains, evaluates, and interprets decision…
permissive · top 15,000 on PyPI
quantile-forestQuantile regression forests for estimating…
permissive · top 15,000 on PyPI
onnxruntimeonnxruntime loads and executes Open Neural…
permissive · top 1,000 on PyPI
coremltoolsConverts trained machine learning models from…
permissive · top 5,000 on PyPI
sklearn2pmmlConverts fitted Scikit-Learn pipelines to PMML…
agpl · top 15,000 on PyPI