hummingbird  by microsoft

Compiler for trained ML models into tensor computation

created 5 years ago
3,454 stars

Top 14.3% 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

2 weeks ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
1
Star History
20 stars in the last 90 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Zhuohan Li Zhuohan Li(Author of vLLM), and
6 more.

torchtitan by pytorch

0.9%
4k
PyTorch platform for generative AI model training research
created 1 year ago
updated 1 day ago
Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Omar Sanseviero Omar Sanseviero(DevRel at Google DeepMind), and
5 more.

TensorRT-LLM by NVIDIA

0.6%
11k
LLM inference optimization SDK for NVIDIA GPUs
created 1 year ago
updated 22 hours ago
Feedback? Help us improve.