Hummingbird is a Microsoft-maintained library that converts trained traditional ML models (scikit-learn, LightGBM, XGBoost, PyTorch, ONNX) into tensor computations (PyTorch, TorchScript, ONNX, TVM). It enables GPU acceleration and scaling for legacy models with minimal code changes. Current version 0.4.12, release cadence is irregular (~quarterly). Requires Python >=3.8.
pip install hummingbird-mlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Convert a scikit-learn RandomForest to PyTorch backend and run inference.
Ensure the model is fitted (trained) before passing to `convert`.
Test predictions for consistency; consider using `backend='onnx'` for cross-platform stability.
Use `convert` without `extra_config`; customizations may be passed via model's `__init__`.
Upgrade to Python 3.8 or higher.
Run `pip install hummingbird-ml` and use `from hummingbird.ml import convert`.
Call `.fit(X, y)` on the model before passing to `convert()`.
Check official docs for supported model-backend pairs. Common: scikit-learn -> pytorch or onnx.
Remove `extra_config`; use alternative configuration if needed.