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 observed · 2026-08-28
Health v2 · maintenance only
23/100
- Activity 0
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 2790
- days_rel: n/a
- days_push: 760
- n_releases_24m: 0
Adoption not part of the score
2998 stars · 264 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
m2cgen is a lightweight Python library that transpiles trained statistical machine learning models into native code in languages such as Python, C, Java, Go, JavaScript, Rust, and more. It enables zero-dependency model inference by generating standalone scoring code from scikit-learn, XGBoost, LightGBM, StatsModels, and lightning models.
Use cases
- deploy ML models in languages without Python runtimes
- generate dependency-free scoring code from a trained sklearn model
- transpile an XGBoost model to Java or C for embedded inference
- export a LightGBM classifier to Go or Rust source code
- run model inference in environments where installing ML libraries is impossible
- convert a trained regression model to JavaScript for browser-side prediction
When to choose
- you need to serve a trained model in a language without ML library support
- you want zero-dependency, low-latency inference without shipping heavy ML runtimes
- you target embedded or constrained environments where only native code can run
When to avoid
- you need to serve deep learning or neural network models
- you want a full model serving platform with APIs and monitoring
- your model uses estimators not in the supported list
Facets
library · maturity maintenance
machine-learning compiler developer-tools machine-learning developer-tools programming-languages python cross-platform transpilation code-generation scikit-learn xgboost lightgbm zero-dependency-inference
2 sources
- readme: https://github.com/BayesWitnesses/m2cgen · fetched 2026-08-28 · e9e7e5eb1c5d
- registry_pypi: https://pypi.org/pypi/m2cgen/json · fetched 2026-08-29 · c67fb9dff22d
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| BayesWitnesses/m2cgen | main | 23 |
For agents
markdown · JSON · MCP: product_card(name="BayesWitnesses/m2cgen")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem