BayesWitnesses/m2cgen
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
Supports scikit-learn, XGBoost, LightGBM, and StatsModels through a unified Python API that analyzes model internals and generates functionally equivalent code without runtime dependencies. Uses an AST-based code generation approach that preserves numerical precision and classification semantics (decision functions vs. probabilities) across target languages. Includes CLI tooling for batch transpilation of pickled models and handles edge cases like ensemble recursion limits and multi-class decision strategies.
2,964 stars and 15,885 monthly downloads. Used by 1 other package. No commits in the last 6 months. Available on PyPI.
Stars
2,964
Forks
257
Language
Python
License
MIT
Category
Last pushed
Aug 03, 2024
Monthly downloads
15,885
Commits (30d)
0
Dependencies
1
Reverse dependents
1
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/ai-coding/BayesWitnesses/m2cgen"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.