How do XGBoost and LightGBM scale training across multiple machines or GPUs?

Quick Overview

Asks how XGBoost and LightGBM split gradient boosting training across several machines or GPUs. Tests understanding of where boosting can be parallelized, what workers must communicate, the distributed modes each library offers, and what limits scaling in practice.

How do XGBoost and LightGBM scale training across multiple machines or GPUs?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

How do XGBoost and LightGBM scale training across multiple machines or GPUs? Assume a tabular training set large enough that a single CPU machine trains too slowly. ```hint Where the parallelism can live Each boosting round depends on the previous one. Ask which part of building a single tree can be split across workers. ``` ```hint What crosses the network Compare the size of the raw rows with the size of the statistics a split search actually needs. ``` ```hint More than one way to split the work LightGBM lets you choose how work is divided. Think about partitioning rows compared with partitioning features, and what each one costs. ``` ### What a Strong Answer Covers - Why the parallelism sits inside each tree, and what each worker computes on its share of the data - How all workers agree on the same split, what is communicated, and roughly how large it is - The concrete mechanisms in each library: XGBoost's distributed and GPU histogram method, LightGBM's tree_learner modes - How bin boundaries stay consistent across workers - What limits scaling in practice, and why distributed results can differ slightly from a single-node run ### Follow-up Questions - When would LightGBM's voting-parallel mode beat data-parallel, and what does it give up? - How does the histogram subtraction trick cut both computation and communication? - A 16-node training job runs only 3 times faster than a single node. How would you find the bottleneck? - How would you train on a dataset that does not fit in GPU memory?

Overview: Asks how XGBoost and LightGBM split gradient boosting training across several machines or GPUs. Tests understanding of where boosting can be parallelized, what workers must communicate, the distributed modes each library offers, and what limits scaling in practice.

General logo
General
Nov 24, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

How do XGBoost and LightGBM scale training across multiple machines or GPUs? Assume a tabular training set large enough that a single CPU machine trains too slowly.

What a Strong Answer Covers Guidance

  • Why the parallelism sits inside each tree, and what each worker computes on its share of the data
  • How all workers agree on the same split, what is communicated, and roughly how large it is
  • The concrete mechanisms in each library: XGBoost's distributed and GPU histogram method, LightGBM's tree_learner modes
  • How bin boundaries stay consistent across workers
  • What limits scaling in practice, and why distributed results can differ slightly from a single-node run

Follow-up Questions Guidance

  • When would LightGBM's voting-parallel mode beat data-parallel, and what does it give up?
  • How does the histogram subtraction trick cut both computation and communication?
  • A 16-node training job runs only 3 times faster than a single node. How would you find the bottleneck?
  • How would you train on a dataset that does not fit in GPU memory?