training-operator icon indicating copy to clipboard operation
training-operator copied to clipboard

Support MLX on Kubernetes with Kubeflow

Open andreyvelich opened this issue 1 year ago • 4 comments

MLX is a new ML framework specifically designed to run on Apple silicon: https://github.com/ml-explore/mlx

It has some differences compare to PyTorch with mps backend: https://github.com/ml-explore/mlx/issues/12#issuecomment-1843956313

It would be nice to integrate MLX in Kubeflow ecosystem for distributed capabilities, and provide a way to run MLX models on Kubernetes.

For example, we can leverage Kubeflow Training Operator for MLX Model Training and Fine-Tuning, and Kubeflow Katib for HyperParameter optimization. Since Kind cluster supports ARM arch, we should explore if we can use M-series GPUs for MLX model training with Kind in the future.

In addition to that, I saw examples how folks run Kubernetes on multi-VMs with MacOS machines and kubeadm. That might be useful when a single machine can't handle very large ML model.

102832242

cc @kubeflow/wg-training-leads @awni

andreyvelich avatar Apr 10 '24 00:04 andreyvelich

In addition to that, I saw examples how folks run Kubernetes on multi-VMs with MacOS machines and kubeadm. That might be useful when a single machine can't handle very large ML model.

Interesting. Does MLX support multi-node training?

gaocegege avatar Apr 10 '24 04:04 gaocegege

Not yet. We are working on it. Probably makes sense to follow up on this once we have some basic support there.

awni avatar Apr 10 '24 04:04 awni

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 09 '24 05:07 github-actions[bot]

Once we implemented the Kubeflow Training V2 APIs we can make MLX work with MPI using mpirun command 🎉

It looks like distributed communication with MLX uses MPI: https://ml-explore.github.io/mlx/build/html/usage/distributed.html#getting-started

andreyvelich avatar Jul 09 '24 12:07 andreyvelich

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Oct 07 '24 20:10 github-actions[bot]

/remove-lifecycle stale

andreyvelich avatar Oct 08 '24 18:10 andreyvelich