hummingbird  by microsoft

Compiler for trained ML models into tensor computation

Created 5 years ago
3,495 stars

Top 13.8% on SourcePulse

GitHubView on GitHub
Project Summary

Hummingbird compiles traditional machine learning models (scikit-learn, LightGBM, XGBoost) into tensor computations, enabling faster inference through neural network framework optimizations and hardware acceleration. It targets ML engineers and researchers seeking to unify their ML model serving infrastructure without re-engineering existing models.

How It Works

Hummingbird reconfigures model operators into tensor computations, primarily using matrix multiplications (GEMM) for decision tree traversal. This approach allows for vectorized and GPU-accelerated execution by transforming algorithmic steps into regular tensor operations, abstracting away the underlying hardware specifics.

Quick Start & Requirements

  • Install: python -m pip install hummingbird-ml or python -m pip install hummingbird-ml[extra] for LightGBM/XGBoost.
  • Requirements: Python 3.9-3.11, PyTorch >= 1.6.0. TVM backend requires Python 3.10. GPU acceleration requires PyTorch with CUDA support.
  • Documentation: API Documentation, Blog Post

Highlighted Details

  • Converts models to PyTorch, TorchScript, ONNX, and TVM.
  • Provides a uniform inference API consistent with scikit-learn.
  • Enables serving converted models via TorchServe.
  • Supports scikit-learn Decision Trees, Random Forests, LightGBM, and XGBoost classifiers/regressors.

Maintenance & Community

  • Key contributors include Supun Nakandala, Matteo Interlandi, and Karla Saur.
  • Roadmap and contribution guides are available.

Licensing & Compatibility

  • License: MIT License.
  • Compatible with commercial and closed-source applications.

Limitations & Caveats

The TVM backend is restricted to Python 3.10. Support for additional backends and model types is planned for future releases.

Health Check
Last Commit

3 months ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
9 stars in the last 30 days

Explore Similar Projects

Starred by Amanpreet Singh Amanpreet Singh(Cofounder of Contextual AI) and Ross Taylor Ross Taylor(Cofounder of General Reasoning; Cocreator of Papers with Code).

torchshard by kaiyuyue

0%
301
PyTorch engine for tensor slicing into parallel shards
Created 4 years ago
Updated 4 months ago
Starred by Aravind Srinivas Aravind Srinivas(Cofounder of Perplexity), Li Jiang Li Jiang(Coauthor of AutoGen; Engineer at Microsoft), and
6 more.

numpy-ml by ddbourgin

0.0%
16k
ML algorithms implemented in NumPy
Created 6 years ago
Updated 2 years ago
Feedback? Help us improve.