ml-explore/mlx — GitHub Repository Preview
AI & Machine Learning ★ 24.6k C++

ml-explore/mlx

by @ml-explore ·

24.6k Stars
1.6k Forks
135 Issues
C++ Language

MLX is an array framework for machine learning on Apple silicon by Apple ML Research. Features NumPy-like APIs, composable function transformations, lazy computation, dynamic graph construction, and a unified memory model for seamless CPU/GPU computation. Includes higher-level packages like mlx.nn and mlx.optimizers mirroring PyTorch conventions. Enables efficient ML development on M-series chips without manual data transfer between devices.

ml-explore
@ml-explore Project maintainer on GitHub
View Profile
View on GitHub
git clone https://github.com/ml-explore/mlx.git

Quick Start Example

python
import mlx.core as mx
import mlx.nn as nn

# NumPy-like array operations on Apple Silicon
a = mx.array([1, 2, 3, 4])
b = mx.array([5, 6, 7, 8])
result = mx.matmul(a.reshape(2,2), b.reshape(2,2))

# Automatic GPU acceleration on M-series chips
print(result)

Tags

#machine-learning#apple-silicon#numpy#gpu#python#cpp

Related Projects