From fc788a51b61368f78246e5c450f0ea77d263eb2b Mon Sep 17 00:00:00 2001 From: shiyu1994 Date: Tue, 9 Jul 2024 10:24:54 +0800 Subject: [PATCH] [doc] fix documentation for quantized training (#6528) fix documentation for quantized training --- docs/Parameters.rst | 8 +++++--- include/LightGBM/config.h | 7 ++++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/Parameters.rst b/docs/Parameters.rst index 40551cfd5858..bd74bba463d1 100644 --- a/docs/Parameters.rst +++ b/docs/Parameters.rst @@ -680,7 +680,7 @@ Learning Control Parameters - gradient quantization can accelerate training, with little accuracy drop in most cases - - **Note**: can be used only with ``device_type = cpu`` + - **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda`` - *New in version 4.0.0* @@ -690,7 +690,7 @@ Learning Control Parameters - with more bins, the quantized training will be closer to full precision training - - **Note**: can be used only with ``device_type = cpu`` + - **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda`` - *New in 4.0.0* @@ -700,7 +700,7 @@ Learning Control Parameters - renewing is very helpful for good quantized training accuracy for ranking objectives - - **Note**: can be used only with ``device_type = cpu`` + - **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda`` - *New in 4.0.0* @@ -708,6 +708,8 @@ Learning Control Parameters - whether to use stochastic rounding in gradient quantization + - **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda`` + - *New in 4.0.0* IO Parameters diff --git a/include/LightGBM/config.h b/include/LightGBM/config.h index a2a352669460..ed3dd1226e1a 100644 --- a/include/LightGBM/config.h +++ b/include/LightGBM/config.h @@ -619,23 +619,24 @@ struct Config { // desc = enabling this will discretize (quantize) the gradients and hessians into bins of ``num_grad_quant_bins`` // desc = with quantized training, most arithmetics in the training process will be integer operations // desc = gradient quantization can accelerate training, with little accuracy drop in most cases - // desc = **Note**: can be used only with ``device_type = cpu`` + // desc = **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda`` // desc = *New in version 4.0.0* bool use_quantized_grad = false; // desc = number of bins to quantization gradients and hessians // desc = with more bins, the quantized training will be closer to full precision training - // desc = **Note**: can be used only with ``device_type = cpu`` + // desc = **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda`` // desc = *New in 4.0.0* int num_grad_quant_bins = 4; // desc = whether to renew the leaf values with original gradients when quantized training // desc = renewing is very helpful for good quantized training accuracy for ranking objectives - // desc = **Note**: can be used only with ``device_type = cpu`` + // desc = **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda`` // desc = *New in 4.0.0* bool quant_train_renew_leaf = false; // desc = whether to use stochastic rounding in gradient quantization + // desc = **Note**: can be used only with ``device_type = cpu`` and ``device_type=cuda`` // desc = *New in 4.0.0* bool stochastic_rounding = true;