mlx-examples  by ml-explore

Examples using the MLX framework

Created 1 year ago
7,850 stars

Top 6.6% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides a collection of standalone examples demonstrating the capabilities of the MLX framework, targeting developers and researchers interested in efficient machine learning on Apple Silicon. It showcases various model architectures and tasks, enabling users to quickly implement and experiment with cutting-edge AI models.

How It Works

The examples leverage the MLX framework, which is designed for efficient computation on Apple's unified memory architecture. This approach allows for seamless data transfer between CPU and GPU, reducing overhead and improving performance for machine learning workloads. The examples cover a broad spectrum of tasks, including text generation, image classification, speech recognition, and multimodal applications, utilizing popular architectures like LLaMA, Mistral, BERT, and Stable Diffusion.

Quick Start & Requirements

  • Install MLX via pip: pip install mlx
  • Requires macOS 13.0+ and Apple Silicon (M1/M2/M3).
  • Examples can be run directly from the repository after cloning.
  • Official MLX documentation: https://github.com/ml-explore/mlx

Highlighted Details

  • Comprehensive examples for large language models (LLaMA, Mistral, Mixtral) including parameter-efficient fine-tuning (LoRA, QLoRA).
  • Includes implementations for image generation (Stable Diffusion, SDXL), classification (ResNets), and audio tasks (Whisper, EnCodec, MusicGen).
  • Demonstrates multimodal capabilities with CLIP and LLaVA, as well as graph neural networks (GCN).
  • Supports direct use of converted checkpoints from the MLX Community on Hugging Face.

Maintenance & Community

The MLX project was initially developed by Awni Hannun, Jagrit Digani, Angelos Katharopoulos, and Ronan Collobert. The repository encourages community contributions and provides a citation for academic use.

Licensing & Compatibility

The repository does not explicitly state a license. However, the MLX framework itself is typically distributed under a permissive license, allowing for commercial use and integration into closed-source projects.

Limitations & Caveats

The examples are specifically designed for Apple Silicon hardware and macOS, limiting their use on other platforms. Some advanced examples or larger models may require significant memory resources.

Health Check
Last Commit

2 weeks ago

Responsiveness

1 day

Pull Requests (30d)
5
Issues (30d)
2
Star History
117 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Wing Lian Wing Lian(Founder of Axolotl AI), and
10 more.

open_flamingo by mlfoundations

0.1%
4k
Open-source framework for training large multimodal models
Created 2 years ago
Updated 1 year ago
Starred by Thomas Wolf Thomas Wolf(Cofounder of Hugging Face), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
5 more.

ultravox by fixie-ai

0.2%
4k
Multimodal LLM for real-time voice interactions
Created 1 year ago
Updated 2 weeks ago
Feedback? Help us improve.