Treelite compiles decision-tree ensemble models into portable C or Java with minimal dependencies, helping production systems make predictions faster and deploy models more easily. section 6.4.3
A practical Treelite workflow has four important considerations:
- Train the model normally, then save and load the model through Treelite. section 6.4.3
- Generate C code and export a compiled library with a toolchain such as GCC. section 6.4.3
- Transform predictors before inference: the preprocessing pipeline is not compiled with the model. section 6.4.3
- Convert input data to DMatrix format when using the compiled XGBoost model. section 6.4.3
XGBoost prediction speedup
Fit an XGBoost pipeline, extract its model, save it as JSON, load it with Treelite, generate C code, export a shared library, and predict with the compiled runtime.
