Java library and command-line application for converting LightGBM models to PMML
Clone or download
Failed to load latest commit information.
src Added algorithm name Aug 21, 2018
LICENSE.txt Import Jan 10, 2017
NOTICE.txt Import Jan 10, 2017 Updated documentation Aug 21, 2018
pom.xml [maven-release-plugin] prepare for next development iteration Aug 21, 2018


Java library and command-line application for converting LightGBM models to PMML.


  • LightGBM 2.0.0 or newer.
  • Java 1.8 or newer.


Enter the project root directory and build using Apache Maven:

mvn clean install

The build produces an executable uber-JAR file target/jpmml-lightgbm-executable-1.2-SNAPSHOT.jar.


A typical workflow can be summarized as follows:

  1. Use LightGBM to train a model.
  2. Save the model to a text file in a local filesystem.
  3. Use the JPMML-LightGBM command-line converter application to turn this text file to a PMML file.

The LightGBM side of operations

Using the lightgbm package to train a regression model for the example Boston housing dataset:

from sklearn.datasets import load_boston

boston = load_boston()

from lightgbm import LGBMRegressor

lgbm = LGBMRegressor(objective = "regression"),, feature_name = boston.feature_names)


The JPMML-LightGBM side of operations

Converting the text file lightgbm.txt to a PMML file lightgbm.pmml:

java -jar target/jpmml-lightgbm-executable-1.2-SNAPSHOT.jar --lgbm-input lightgbm.txt --pmml-output lightgbm.pmml

Getting help:

java -jar target/jpmml-lightgbm-executable-1.2-SNAPSHOT.jar --help


JPMML-LightGBM is dual-licensed under the GNU Affero General Public License (AGPL) version 3.0, and a commercial license.

Additional information

JPMML-LightGBM is developed and maintained by Openscoring Ltd, Estonia.

Interested in using JPMML software in your application? Please contact