mlx icon indicating copy to clipboard operation
mlx copied to clipboard

[Docs] Simple examples of using mlx.distributed

Open awni opened this issue 11 months ago • 1 comments

It would be nice to have 2-3 really simple standalone examples of using MLX distributed:

  • Data parallel training with a simple model
  • Tensor parallel inference with a simple model

Maybe some others.

awni avatar Dec 18 '25 20:12 awni

i’m going to start with a runnable data parallel training script under examples/python. the docs added in #2973 explain the pieces, but the examples directory still has no script users can launch. i’ll base it on linear_regression.py, shard the synthetic data by rank, average gradients with nn.average_gradients, and test it locally with mlx.launch -n 2. i’ll keep tensor parallel inference out of this pr.

tylergibbs1 avatar Jul 24 '26 04:07 tylergibbs1