LightGBM
A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.
File Explorer
Download Latest Version (.zip)- ci-core.txt
- README.md
- requirements-latest.txt
- requirements-oldest.txt
- append-comment.sh
- build-docs.R
- build-docs.sh
- check-dynamic-dependencies.sh
- check-omp-pragmas.sh
- check-python-dists.sh
- check-workflow-status.sh
- create-nuget.py
- download-artifacts.sh
- install-opencl.ps1
- install-r-deps.R
- lint-all.sh
- lint-powershell.ps1
- lint-r-code.R
- parameter-generator.py
- README.md
- rerun-workflow.sh
- run-r-cmd-check.sh
- set-commit-status.sh
- setup.sh
- test-python-latest.sh
- test-python-oldest.sh
- test-r-package-valgrind.sh
- test-r-package-windows.ps1
- test-r-package.sh
- test-windows.ps1
- test.sh
- update-version.sh
- BUG_REPORT.md
- FEATURE_REQUEST.md
- build.yml
- cpp.yml
- cuda.yml
- lock.yml
- lychee.yml
- no_response.yml
- optional_checks.yml
- python_package.yml
- r_configure.yml
- r_package.yml
- r_valgrind.yml
- release_drafter.yml
- static_analysis.yml
- swig.yml
- CODEOWNERS
- dependabot.yml
- release-drafter.yml
- FindLibR.cmake
- FindNCCL.cmake
- IntegratedOpenCL.cmake
- Sanitizer.cmake
- Utils.cmake
- dockerfile-cli-only-distroless.gpu
- dockerfile-cli-only.gpu
- dockerfile.gpu
- README.md
- dockerfile-cli
- dockerfile-python
- dockerfile-r
- README.md
- dask-concat.svg
- dask-initial-setup.svg
- favicon.ico
- gpu-performance-comparison.png
- leaf-wise.png
- level-wise.png
- script.js
- LightGBM-logo-hex.cdr
- LightGBM-logo-hex.svg
- LightGBM_logo-hex.png
- LightGBM_logo.cdr
- LightGBM_logo_black_text.svg
- LightGBM_logo_black_text_huge.png
- LightGBM_logo_black_text_large.png
- LightGBM_logo_black_text_medium.png
- LightGBM_logo_black_text_small.png
- LightGBM_logo_black_text_tiny.png
- LightGBM_logo_grey_text.svg
- LightGBM_logo_grey_text_huge.png
- LightGBM_logo_grey_text_large.png
- LightGBM_logo_grey_text_medium.png
- LightGBM_logo_grey_text_small.png
- LightGBM_logo_grey_text_tiny.png
- LightGBM_logo_no_text.svg
- LightGBM_logo_no_text_huge.png
- LightGBM_logo_no_text_large.png
- LightGBM_logo_no_text_medium.png
- LightGBM_logo_no_text_small.png
- LightGBM_logo_no_text_tiny.png
- .lychee.toml
- Advanced-Topics.rst
- build-docs.sh
- C-API.rst
- conf.py
- Development-Guide.rst
- env.yml
- Experiments.rst
- FAQ.rst
- Features.rst
- gcc-Tips.rst
- GPU-Performance.rst
- GPU-Targets.rst
- GPU-Tutorial.rst
- GPU-Windows.rst
- index.rst
- Installation-Guide.rst
- Key-Events.md
- make.bat
- Makefile
- Parallel-Learning-Guide.rst
- Parameters-Tuning.rst
- Parameters.rst
- Python-API.rst
- Python-Intro.rst
- Quick-Start.rst
- README.rst
- binary.test
- binary.test.weight
- binary.train
- binary.train.weight
- forced_splits.json
- predict.conf
- README.md
- train.conf
- train_linear.conf
- predict.conf
- rank.test
- rank.test.query
- rank.train
- rank.train.query
- README.md
- train.conf
- multiclass.test
- multiclass.train
- predict.conf
- README.md
- train.conf
- binary.test
- binary.train
- mlist.txt
- predict.conf
- README.md
- train.conf
- binary-classification.py
- multiclass-classification.py
- prediction.py
- ranking.py
- README.md
- regression.py
- interactive_plot_example.ipynb
- advanced_example.py
- dataset_from_multi_hdf5.py
- logistic_regression.py
- plot_example.py
- README.md
- simple_example.py
- sklearn_example.py
- forced_bins.json
- forced_bins2.json
- predict.conf
- README.md
- regression.test
- regression.test.init
- regression.train
- regression.train.init
- train.conf
- predict.conf
- rank.test
- rank.test.query
- rank.train
- rank.train.query
- README.md
- train.conf
- README.md
- compute
- eigen
- fast_double_parser
- fmt
- nanoarrow
- cuda_algorithms.hpp
- cuda_column_data.hpp
- cuda_metadata.hpp
- cuda_metric.hpp
- cuda_nccl_topology.hpp
- cuda_objective_function.hpp
- cuda_random.hpp
- cuda_rocm_interop.h
- cuda_row_data.hpp
- cuda_split_info.hpp
- cuda_tree.hpp
- cuda_utils.hu
- vector_cudahost.h
- alternate_shared_mutex.hpp
- yamc_rwlock_sched.hpp
- yamc_shared_lock.hpp
- array_args.h
- binary_writer.h
- byte_buffer.h
- chunked_array.hpp
- common.h
- file_io.h
- json11.h
- log.h
- openmp_wrapper.h
- pipeline_reader.h
- random.h
- text_reader.h
- threading.h
- application.h
- arrow.h
- bin.h
- boosting.h
- c_api.h
- config.h
- dataset.h
- dataset_loader.h
- export.h
- feature_group.h
- meta.h
- metric.h
- network.h
- objective_function.h
- prediction_early_stop.h
- sample_strategy.h
- train_share_states.h
- tree.h
- tree_learner.h
- __init__.py
- basic.py
- callback.py
- compat.py
- dask.py
- engine.py
- libpath.py
- plotting.py
- py.typed
- sklearn.py
- pyproject.toml
- README.rst
- agaricus.test.rda
- agaricus.train.rda
- bank.rda
- 00Index
- basic_walkthrough.R
- boost_from_prediction.R
- categorical_features_rules.R
- cross_validation.R
- early_stopping.R
- efficient_many_training.R
- leaf_stability.R
- multiclass.R
- multiclass_custom_objective.R
- weight_param.R
- .gitkeep
- make-r-def.R
- Makevars
- Makevars.win
- logo.svg
- agaricus.test.Rd
- agaricus.train.Rd
- bank.Rd
- dim.Rd
- dimnames.lgb.Dataset.Rd
- get_field.Rd
- getLGBMThreads.Rd
- lgb.configure_fast_predict.Rd
- lgb.convert_with_rules.Rd
- lgb.cv.Rd
- lgb.Dataset.construct.Rd
- lgb.Dataset.create.valid.Rd
- lgb.Dataset.Rd
- lgb.Dataset.save.Rd
- lgb.Dataset.set.categorical.Rd
- lgb.Dataset.set.reference.Rd
- lgb.drop_serialized.Rd
- lgb.dump.Rd
- lgb.get.eval.result.Rd
- lgb.importance.Rd
- lgb.interpret.Rd
- lgb.interprete.Rd
- lgb.load.Rd
- lgb.make_serializable.Rd
- lgb.model.dt.tree.Rd
- lgb.plot.importance.Rd
- lgb.plot.interpretation.Rd
- lgb.restore_handle.Rd
- lgb.save.Rd
- lgb.slice.Dataset.Rd
- lgb.train.Rd
- lgb_predict_shared_params.Rd
- lgb_shared_dataset_params.Rd
- lgb_shared_params.Rd
- lightgbm.Rd
- predict.lgb.Booster.Rd
- print.lgb.Booster.Rd
- set_field.Rd
- setLGBMThreads.Rd
- summary.lgb.Booster.Rd
- apple-touch-icon-120x120.png
- apple-touch-icon-152x152.png
- apple-touch-icon-180x180.png
- apple-touch-icon-60x60.png
- apple-touch-icon-76x76.png
- apple-touch-icon.png
- favicon-16x16.png
- favicon-32x32.png
- favicon.ico
- _pkgdown.yml
- aliases.R
- callback.R
- lgb.Booster.R
- lgb.convert_with_rules.R
- lgb.cv.R
- lgb.DataProcessor.R
- lgb.Dataset.R
- lgb.drop_serialized.R
- lgb.importance.R
- lgb.interpret.R
- lgb.make_serializable.R
- lgb.model.dt.tree.R
- lgb.plot.importance.R
- lgb.plot.interpretation.R
- lgb.Predictor.R
- lgb.restore_handle.R
- lgb.train.R
- lightgbm.R
- metrics.R
- multithreading.R
- utils.R
- install.libs.R
- lightgbm-win.def
- lightgbm_R.cpp
- lightgbm_R.h
- Makevars.in
- Makevars.win.in
- helper.R
- test_basic.R
- test_custom_objective.R
- test_dataset.R
- test_learning_to_rank.R
- test_lgb.Booster.R
- test_lgb.convert_with_rules.R
- test_lgb.importance.R
- test_lgb.interpret.R
- test_lgb.model.dt.tree.R
- test_lgb.plot.importance.R
- test_lgb.plot.interpretation.R
- test_metrics.R
- test_multithreading.R
- test_parameters.R
- test_Predictor.R
- test_utils.R
- test_weighted_loss.R
- testthat.R
- basic_walkthrough.Rmd
- .Rbuildignore
- AUTOCONF_UBUNTU_VERSION
- cleanup
- configure
- configure.ac
- configure.win
- cran-comments.md
- DESCRIPTION
- LICENSE
- NAMESPACE
- README.md
- recreate-configure.sh
- application.cpp
- predictor.hpp
- array.hpp
- cuda_score_updater.cpp
- cuda_score_updater.cu
- cuda_score_updater.hpp
- nccl_gbdt.cpp
- nccl_gbdt.hpp
- nccl_gbdt_component.hpp
- bagging.hpp
- boosting.cpp
- dart.hpp
- gbdt.cpp
- gbdt.h
- gbdt_model_text.cpp
- gbdt_prediction.cpp
- goss.hpp
- prediction_early_stop.cpp
- rf.hpp
- sample_strategy.cpp
- score_updater.hpp
- cuda_algorithms.cu
- cuda_utils.cpp
- cuda_column_data.cpp
- cuda_column_data.cu
- cuda_metadata.cpp
- cuda_row_data.cpp
- cuda_tree.cpp
- cuda_tree.cu
- bin.cpp
- config.cpp
- config_auto.cpp
- dataset.cpp
- dataset_loader.cpp
- dense_bin.hpp
- file_io.cpp
- json11.cpp
- metadata.cpp
- multi_val_dense_bin.hpp
- multi_val_sparse_bin.hpp
- parser.cpp
- parser.hpp
- sparse_bin.hpp
- train_share_states.cpp
- tree.cpp
- cuda_binary_metric.cpp
- cuda_binary_metric.hpp
- cuda_pointwise_metric.cpp
- cuda_pointwise_metric.cu
- cuda_pointwise_metric.hpp
- cuda_regression_metric.cpp
- cuda_regression_metric.hpp
- binary_metric.hpp
- dcg_calculator.cpp
- map_metric.hpp
- metric.cpp
- multiclass_metric.hpp
- rank_metric.hpp
- regression_metric.hpp
- xentropy_metric.hpp
- linker_topo.cpp
- linkers.h
- linkers_mpi.cpp
- linkers_socket.cpp
- network.cpp
- socket_wrapper.hpp
- cuda_binary_objective.cpp
- cuda_binary_objective.cu
- cuda_binary_objective.hpp
- cuda_multiclass_objective.cpp
- cuda_multiclass_objective.cu
- cuda_multiclass_objective.hpp
- cuda_rank_objective.cpp
- cuda_rank_objective.cu
- cuda_rank_objective.hpp
- cuda_regression_objective.cpp
- cuda_regression_objective.cu
- cuda_regression_objective.hpp
- binary_objective.hpp
- multiclass_objective.hpp
- objective_function.cpp
- rank_objective.hpp
- regression_objective.hpp
- xentropy_objective.hpp
- cuda_best_split_finder.cpp
- cuda_best_split_finder.cu
- cuda_best_split_finder.hpp
- cuda_data_partition.cpp
- cuda_data_partition.cu
- cuda_data_partition.hpp
- cuda_gradient_discretizer.cu
- cuda_gradient_discretizer.hpp
- cuda_histogram_constructor.cpp
- cuda_histogram_constructor.cu
- cuda_histogram_constructor.hpp
- cuda_leaf_splits.cpp
- cuda_leaf_splits.cu
- cuda_leaf_splits.hpp
- cuda_single_gpu_tree_learner.cpp
- cuda_single_gpu_tree_learner.cu
- cuda_single_gpu_tree_learner.hpp
- histogram16.cl
- histogram256.cl
- histogram64.cl
- col_sampler.hpp
- cost_effective_gradient_boosting.hpp
- data_parallel_tree_learner.cpp
- data_partition.hpp
- feature_histogram.cpp
- feature_histogram.hpp
- feature_parallel_tree_learner.cpp
- gpu_tree_learner.cpp
- gpu_tree_learner.h
- gradient_discretizer.cpp
- gradient_discretizer.hpp
- leaf_splits.hpp
- linear_tree_learner.cpp
- linear_tree_learner.h
- monotone_constraints.hpp
- parallel_tree_learner.h
- serial_tree_learner.cpp
- serial_tree_learner.h
- split_info.hpp
- tree_learner.cpp
- voting_parallel_tree_learner.cpp
- openmp_wrapper.cpp
- c_api.cpp
- main.cpp
- ChunkedArray_API_extensions.i
- lightgbmlib.i
- pointer_manipulation.i
- StringArray.hpp
- StringArray.i
- StringArray_API_extensions.i
- test_.py
- predict.conf
- test.py
- test_array_args.cpp
- test_arrow.cpp
- test_arrow_deprecated.cpp
- test_byte_buffer.cpp
- test_chunked_array.cpp
- test_common.cpp
- test_main.cpp
- test_serialize.cpp
- test_single_row.cpp
- test_stream.cpp
- testutils.cpp
- testutils.h
- train.conf
- categorical.data
- _test_distributed.py
- conftest.py
- __init__.py
- conftest.py
- test_arrow.py
- test_basic.py
- test_callback.py
- test_consistency.py
- test_dask.py
- test_dual.py
- test_engine.py
- test_pandas.py
- test_plotting.py
- test_polars.py
- test_sklearn.py
- test_utilities.py
- utils.py
- LightGBM.sln
- LightGBM.vcxproj
- LightGBM.vcxproj.filters
- .appveyor.yml
- .editorconfig
- .git-blame-ignore-revs
- .gitattributes
- .gitignore
- .gitmodules
- .pre-commit-config.yaml
- .readthedocs.yaml
- .typos.toml
- .yamllint.yml
- biome.json
- build-cran-package.sh
- build-python.sh
- build_r.R
- CMakeLists.txt
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- LICENSE
- MAINTAINING.md
- pixi.lock
- pixi.toml
- README.md
- SECURITY.md
- VERSION.txt
π Installation Guide
git clone https://github.com/lightgbm-org/LightGBM
Downloads the entire project code from GitHub to your computer.
cd LightGBM
Moves into the project folder you just downloaded.
2. Docker
Easy Recommended- Git Needed to download the project code from GitHub.
- Docker Desktop Needed to build and run containers. Install it and keep it running in the background.
docker build -f docker/gpu/dockerfile.gpu -t lightgbm .
Builds a runnable image based on the Dockerfile.
docker run -p 8080:80 lightgbm
Runs the built image as an actual container.
3. CMake
Mediummkdir build && cd build
Creates a folder to hold the build output and moves into it.
cmake ..
Analyzes the source code and generates build configuration files (must be run inside the build folder).
make
Compiles the code based on the generated build configuration to produce an executable.
4. .NET
Mediumcd windows
This project's files live in a subfolder, so move into it first.
dotnet restore
Downloads the packages the project depends on.
dotnet run
Builds the project and runs it immediately.
5. Python
Easypip install .
Installs the package published on PyPI directly β no need to clone the source.
jupyter notebook
Launches Jupyter in your browser so you can open and run the notebook (.ipynb) files.
6. Make
Medium- Git Needed to download the project code from GitHub.
- Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
cd docs
This project's files live in a subfolder, so move into it first.
make
Compiles the code based on the generated build configuration to produce an executable.
