Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
M

mlx-examples

> 编程语言
Open source

Examples in the MLX framework

8.9K stars0 likes0 views
WebsiteGitHub

About

Examples in the MLX framework

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

  • Transformer language model training.
  • Minimal examples of large scale text generation with LLaMA, Mistral, and more in the LLMs directory.
  • A mixture-of-experts (MoE) language model with Mixtral 8x7B.
  • Parameter efficient fine-tuning with LoRA or QLoRA.
  • Text-to-text multi-task Transformers with T5.
  • Bidirectional language understanding with BERT.

Image Models

  • Generating images
    • FLUX
    • Stable Diffusion or SDXL
  • Image classification using ResNets on CIFAR-10.
  • Convolutional variational autoencoder (CVAE) on MNIST.

Video Models

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

Audio Models

  • Speech recognition with OpenAI's Whisper.
  • Audio compression and generation with Meta's EnCodec.
  • Music generation with Meta's MusicGen.

Multimodal models

  • Joint text and image embeddings with CLIP.
  • Text generation from image and text inputs with LLaVA.
  • Image segmentation with Segment Anything (SAM).

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

Issues· 183 open

View all issuesOpen on GitHub
  • #155

    Contribute Hugging Face models to the MLX Community

    Updated Sep 10, 2026
  • #1451

    segment_anything: fuse attention with mx.fast.scaled_dot_product_attention

    Updated Sep 7, 2026
  • #1449

    Community project: Depth-Anything-V2 running via a from-scratch PyTorch-API shim (torch-mlx)

    Updated Sep 7, 2026
  • #1445

    Proposal: neural surface-code decoder (QEC) example?

    Updated Aug 26, 2026
  • #1443

    Suggestion: add a Stable Fast 3D (SF3D) example — native MLX single-image-to-3D-mesh

    Updated Aug 22, 2026
  • #1441

    [whisper] `mlx_whisper` CLI overwrites output file when multiple audio inputs are provided

    Updated Aug 18, 2026
  • #1440

    whisper: numerical parity tests fail with MLX 0.32.0 on Apple Silicon

    Updated Aug 18, 2026
  • #1421

    whisper/convert.py outputs `model.safetensors` but `mlx_whisper.load_models` expects `weights.safetensors`

    Updated Aug 18, 2026
  • #1436

    mlx_lm.fuse can not work

    Updated Aug 6, 2026
  • #1434

    Stable Diffusion: Transformer2D's GroupNorm uses MLX's default eps (1e-5) where diffusers uses 1e-6

    Updated Jul 31, 2026

> Tags

Pythonmlx

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言