Metadata-Version: 2.4
Name: onnx2mlx
Version: 0.0.2
Summary: Convert ONNX models into MLX callables for inference on Apple Silicon.
Author-email: "NatML Inc." <hi@muna.ai>
License-Expression: MIT
Project-URL: Homepage, https://muna.ai
Project-URL: Documentation, https://docs.muna.ai/onnx2mlx
Project-URL: Repository, https://github.com/muna-ai/onnx2mlx
Project-URL: Issues, https://github.com/muna-ai/onnx2mlx/issues
Keywords: onnx,mlx,apple-silicon,inference,machine-learning
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mlx
Requires-Dist: numpy
Requires-Dist: onnx
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: onnxruntime; extra == "dev"
Requires-Dist: torch; extra == "dev"
Requires-Dist: torchvision; extra == "dev"
Requires-Dist: transformers; extra == "dev"
Dynamic: license-file

# onnx2mlx

![Muna logo](https://raw.githubusercontent.com/muna-ai/.github/main/banner.png)

Convert ONNX models into [MLX](https://github.com/ml-explore/mlx) callables for accelerating inference on Apple Silicon.

## Setup Instructions
Open a terminal and run the following command:
```bash
# Install onnx2mlx
$ pip install --upgrade onnx2mlx
```

## Converting from ONNX to MLX
Use the `onnx2mlx` function to create a callable that uses MLX to run the model:
```py
import mlx.core as mx
import onnx
from onnx2mlx import onnx2mlx

# Load an ONNX model
model = onnx.load("model.onnx")

# Convert to MLX
model_mlx = onnx2mlx(onnx_model)

# Run the MLX model
outputs = model_mlx(mx.array(...))
```

## Useful Links
- [Join our Slack community](https://muna.ai/slack).
- [Check out the docs](https://docs.muna.ai/onnx2mlx).
- [Read our blog](https://muna.ai/blog).
- Reach out to us at [hi@muna.ai](mailto:hi@muna.ai).
