Examples in the MLX framework
mlx
Go to file
Tingzhen 7ca05d2e51
LoRa/README.md should be --hf-path instead of --hf-repo (#1350)
Co-authored-by: du tingzhen <dutingzhen@macbookpro.myfiosgateway.com>
2025-03-16 20:02:52 -07:00
.circleci mlx-lm move notice (#1346) 2025-03-16 15:14:28 -07:00
bert - Removed unused Python imports (#683) 2024-04-16 07:50:32 -07:00
cifar Distributed support cifar (#1301) 2025-03-05 13:33:15 -08:00
clip Fix FutureWarning in torch.load by setting weights_only=True (#1295) 2025-02-22 06:08:54 -08:00
cvae Update a few examples to use compile (#420) 2024-02-08 13:00:41 -08:00
encodec MusicGen (#1020) 2024-10-11 10:16:20 -07:00
flux Change Flux default max_shift to 1.15 to match the official one (#1137) 2024-12-08 23:29:48 -08:00
gcn - Removed unused Python imports (#683) 2024-04-16 07:50:32 -07:00
llava fix llava (#1149) 2024-12-12 10:37:26 -08:00
llms mlx-lm move notice (#1346) 2025-03-16 15:14:28 -07:00
lora LoRa/README.md should be --hf-path instead of --hf-repo (#1350) 2025-03-16 20:02:52 -07:00
mnist Use stable url for MNIST (#749) 2024-05-03 17:13:05 -07:00
musicgen Update README.md (#1045) 2024-10-14 06:21:25 -07:00
normalizing_flow Update a few examples to use compile (#420) 2024-02-08 13:00:41 -08:00
segment_anything Segment Anything Model (#552) 2024-06-02 16:45:51 -07:00
speechcommands Fix data_iter in prepare_dataset from speechcommands example (#1113) 2024-12-02 23:56:07 -08:00
stable_diffusion Fix format (#1115) 2024-11-20 16:15:53 -08:00
t5 MusicGen (#1020) 2024-10-11 10:16:20 -07:00
transformer_lm use more standard window strategy (#1287) 2025-02-19 06:22:51 -08:00
whisper fix looping in whisper (#1273) 2025-02-10 13:04:35 -08:00
.gitignore More cache improvements (#1015) 2024-10-07 20:45:51 -07:00
.pre-commit-config.yaml Chore: pre-commit bump (#1253) 2025-02-06 09:06:31 -08:00
ACKNOWLEDGMENTS.md adding OLMoE architecture (#1321) 2025-03-05 13:46:06 -08:00
CODE_OF_CONDUCT.md contribution + code of conduct 2023-11-29 12:31:18 -08:00
CONTRIBUTING.md feat: add update_config functionality (#531) 2024-03-14 06:36:05 -07:00
LICENSE consistent copyright 2023-11-30 11:11:04 -08:00
README.md mlx-lm move notice (#1346) 2025-03-16 15:14:28 -07:00

MLX Examples

This repo contains a variety of standalone examples using the MLX framework.

The MNIST example is a good starting point to learn how to use MLX. Some more useful examples are listed below. Check-out MLX LM for a more fully featured Python package for LLMs with MLX.

Text Models

Image Models

Audio Models

Multimodal models

Other Models

  • Semi-supervised learning on graph-structured data with GCN.
  • Real NVP normalizing flow for density estimation and sampling.

Hugging Face

You can directly use or download converted checkpoints from the MLX Community organization on Hugging Face. We encourage you to join the community and contribute new models.

Contributing

We are grateful for all of our contributors. If you contribute to MLX Examples and wish to be acknowledged, please add your name to the list in your pull request.

Citing MLX Examples

The MLX software suite was initially developed with equal contribution by Awni Hannun, Jagrit Digani, Angelos Katharopoulos, and Ronan Collobert. If you find MLX Examples useful in your research and wish to cite it, please use the following BibTex entry:

@software{mlx2023,
  author = {Awni Hannun and Jagrit Digani and Angelos Katharopoulos and Ronan Collobert},
  title = {{MLX}: Efficient and flexible machine learning on Apple silicon},
  url = {https://github.com/ml-explore},
  version = {0.0},
  year = {2023},
}