treelite
Treelite: Universal model exchange format for decision tree forests
Decision gist · record as of 2026-08-14
Yes, if you need to serialize tree models for C++ integration or cross-platform exchange. The package is actively maintained, has no known vulnerabilities, and carries a permissive license. Install friction is moderate due to compiled wheels, but pre-built binaries exist for common platforms. Not necessary if your workflow stays within a single Python framework.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; compiled wheels available for common platforms but may require compilation on unsupported architectures.
- Medium install friction due to compiled wheels for multiple platforms (macOS, Linux, Windows).
- Active maintenance with a recent release (161 days ago) and steady repository activity.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—suitable for most projects.
last release 2026-03-06 (161 days) · last repo commit 2026-08-12 · 828 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 674,951 downloads/mo, #5,386 on PyPI
Alternatives
Verify before relying
pip install treelite
import treelite
# Load or create a tree model and serialize it
model = treelite.Model.load('model.txt')
model.export_lib('output')- Whether the package provides Python APIs for programmatic tree construction or only serialization/loading of externally-trained models.
- Performance characteristics and typical use patterns for large-scale model interchange.
- Compatibility with specific tree training frameworks (XGBoost, LightGBM, etc.) beyond generic forest formats.
What it is and what it does
Treelite is a model exchange and serialization library designed to store and transmit decision tree forests in a standardized format. It acts as a bridge for C++ applications and other tools to work with trained tree models without reimplementing the forest logic. The package depends on numpy, scipy, and packaging, and supports Python 3.8 through 3.10 across macOS, Linux, and Windows.
The library is intended for scenarios where you need to persist tree models to disk, share them across systems, or integrate them into C++ pipelines. It provides a universal format that decouples model storage from the training framework, making it useful in production environments where model portability and interoperability matter.
Use it for
- Serialize trained tree ensemble models from Python for deployment in C++ production systems.
- Exchange decision tree forests between different machine learning frameworks or applications.
- Store trained tree models in a portable format for long-term archival or version control.
- Integrate pre-trained tree models into C++ services without re-training or format conversion.
- Enable cross-platform model sharing in teams using heterogeneous development environments.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need to serialize tree models for C++ integration or cross-platform exchange.
The package is actively maintained, has no known vulnerabilities, and carries a permissive license. Install friction is moderate due to compiled wheels, but pre-built binaries exist for common platforms. Not necessary if your workflow stays within a single Python framework.
Install
treelite on PyPI
Before you install
Medium install friction due to compiled wheels for multiple platforms (macOS, Linux, Windows). Active maintenance with a recent release (161 days ago) and steady repository activity.
Requires Python 3.8 or later; compiled wheels available for common platforms but may require compilation on unsupported architectures.
License in practice
Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—suitable for most projects.
Quickstart
pip install treelite
import treelite
# Load or create a tree model and serialize it
model = treelite.Model.load('model.txt')
model.export_lib('output')
Verify before relying
- Whether the package provides Python APIs for programmatic tree construction or only serialization/loading of externally-trained models.
- Performance characteristics and typical use patterns for large-scale model interchange.
- Compatibility with specific tree training frameworks (XGBoost, LightGBM, etc.) beyond generic forest formats.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 3 packagesnumpypackagingscipy |
| Maintenance | Actively maintained 161 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 674,951 / month, #5,386 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: treelite-4.7.0-py3-none-macosx_10_15_x86_64.macosx_11_0_x86_64.macosx_12_0_x86_64.whl; treelite-4.7.0-py3-none-macosx_12_0_arm64.whl; treelite-4.7.0-py3-none-manylinux2014_aarch64.whl; treelite-4.7.0-py3-none-manylinux2014_x86_64.whl; treelite-4.7.0-py3-none-win_amd64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “decision tree model serialization”
- treeliteTreelite serializes and exchanges decision tree forest models in a…
- treelite-runtimeTreelite-runtime provides a Python runtime for loading and executing…
- dtreevizdtreeviz renders decision trees from scikit-learn, XGBoost, LightGBM,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also interchange · treelite-runtime · ydf · tensorflow-decision-forests · dtreeviz · treeinterpreter · py_trees · coremltools · sklearn2pmml · skope-rules