#165 · Primary category: MLOps & Evaluation

m2cgen

c csharp dartlang go haskell java javascript lightgbm lightning machine-learning php python r ruby rust scikit-learn statistical-learning statsmodels xgboost

Transform ML models into a native code (Java, C, Python, Go, JavaScript, Visual Basic, C#, R, PowerShell, PHP, Dart, Haskell, Ruby, F#, Rust) with zero dependencies

Project last updated:08/03/24

GitHub Stars

3.0K

Forks

264

Contributors

14

License

MIT

Why we included this project

When a trained model has to run somewhere a Python interpreter cannot, m2cgen turns a fitted scikit-learn, XGBoost, or LightGBM estimator into plain source code instead of a runtime dependency. The output is a self-contained function in C, Java, JavaScript, Go, Rust, PHP, or one of the other supported languages, with nothing extra to install or ship. That makes it a workable answer for edge devices, embedded systems, and browser-based tooling where pulling in a full inference stack is impractical. It covers the usual classical model families, from linear models and SVMs to trees, random forests, and boosting, and offers both a Python API and a CLI that can consume a pickled model. Teams that want readable, dependency-free code they can audit and compile themselves should weigh it against ONNX rather than assume a runtime-based exporter is the only path.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category