A pure Go library for making predictions with Gradient Boosting Regression Trees models from LightGBM, XGBoost, and scikit-learn.
Leaves is a pure Go implementation of the prediction component for Gradient Boosting Regression Trees (GBRT) models. It allows developers to load and run models trained in frameworks like LightGBM, XGBoost, and scikit-learn directly within Go applications, eliminating the need for C bindings or external dependencies. The library focuses on efficient, high-performance inference for serving machine learning models in production Go environments.
Go developers and engineers who need to integrate pre-trained GBRT models into Go-based services, applications, or pipelines for real-time predictions, such as in microservices, APIs, or data processing systems.
Leaves provides a native Go solution with performance rivaling original C APIs, reduces deployment complexity by removing external dependencies, and offers a clean, idiomatic Go API for seamless model inference integration.
pure Go implementation of prediction part for GBRT (Gradient Boosting Regression Trees) models from popular frameworks
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Eliminates C dependencies, simplifying deployment in Go environments and reducing cross-language overhead, as highlighted in the philosophy.
Supports models from LightGBM, XGBoost, and scikit-learn, enabling flexible integration without being locked into a single ecosystem, per the features list.
Benchmarks show speed comparable to native C APIs, with multi-threading for throughput, achieving ~14ms for LightGBM models on 4 threads.
Includes special optimizations for categorical features, such as one-hot decision rules, improving inference efficiency for LightGBM models.
Only supports sigmoid and softmax transformations for LightGBM and XGBoost, missing other activation functions that might be required for custom models.
Admits slight prediction divergences from original frameworks due to floating-point conversions, which could affect reproducibility in sensitive applications.
Restricted to pickle protocol 0 and lacks transformation functions, making it unreliable for production use with scikit-learn beyond basic GradientBoostingClassifier.
The API is subject to change before version 1.0, as noted in the README, risking breaking changes for early adopters.