MCPcopy Index your code
hub / github.com/ml-explore/mlx-examples

github.com/ml-explore/mlx-examples @main sqlite

repository ↗ · DeepWiki ↗
1,508 symbols 4,172 edges 141 files 236 documented · 16%
README

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

Video Models

  • Text-to-video and image-to-video generation with Wan2.1.

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},
}

Core symbols most depended-on inside this repo

items
called by 105
segment_anything/segment_anything/utils/amg.py
update
called by 38
whisper/mlx_whisper/decoding.py
quantize
called by 32
encodec/encodec.py
pad
called by 30
flux/flux/tokenizers.py
from_pretrained
called by 14
llava/llava.py
print_zero
called by 13
flux/generate_interactive.py
from_pretrained
called by 12
clip/model.py
rank
called by 12
whisper/mlx_whisper/decoding.py

Shape

Method 849
Function 338
Class 308
Route 13

Languages

Python100%

Modules by API surface

musicgen/encodec.py51 symbols
encodec/encodec.py51 symbols
whisper/mlx_whisper/decoding.py46 symbols
t5/t5.py41 symbols
musicgen/t5.py41 symbols
clip/model.py38 symbols
whisper/mlx_whisper/torch_whisper.py33 symbols
llms/speculative_decoding/model.py33 symbols
flux/flux/layers.py30 symbols
llms/gguf_llm/models.py28 symbols
flux/flux/autoencoder.py27 symbols
segment_anything/segment_anything/utils/amg.py26 symbols

Dependencies from manifests, versioned

datasets3.6.0 · 1×
einops0.8.2 · 1×
huggingface-hub0.32.2 · 1×
mlx0.18.1 · 1×
mlx-data0.1.0 · 1×
mlx-lm0.24.1 · 1×
numpy1.26.2 · 1×
protobuf3.20.2 · 1×
requests2.31.0 · 1×
scipy1.11.4 · 1×
torch2.7.0 · 1×
transformers4.52.3 · 1×

For agents

$ claude mcp add mlx-examples \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact