Skip to main content

Convert ONNX models into MLX callables for inference on Apple Silicon.

Project description

onnx2mlx

Muna logo

Convert ONNX models into MLX callables for accelerating inference on Apple Silicon.

Setup Instructions

Open a terminal and run the following command:

# 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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

onnx2mlx-0.0.1.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

onnx2mlx-0.0.1-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file onnx2mlx-0.0.1.tar.gz.

File metadata

  • Download URL: onnx2mlx-0.0.1.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for onnx2mlx-0.0.1.tar.gz
Algorithm Hash digest
SHA256 58f777e67dc3e5e50dba0f369b3fbd794a257492fcd2031b47b1339477a2fc2c
MD5 7779960d1fdada337aa786e3023972ca
BLAKE2b-256 13d7369c9f0237a6453ffebe0bee0efa2ba39b673df14762869f9d7c42ca05b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for onnx2mlx-0.0.1.tar.gz:

Publisher: pypi.yml on muna-ai/onnx2mlx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file onnx2mlx-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: onnx2mlx-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for onnx2mlx-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1d6b5c4ee9e1189382096cf30bbd814f6aae8a072740d0bb0be2997ab07f49c3
MD5 a64bf417f9554045acebd580eafd3ae7
BLAKE2b-256 66e03091fc07c1d6091f561f44f37ea7ac159cdf654aa8b0ee7a9e629ee25f36

See more details on using hashes here.

Provenance

The following attestation bundles were made for onnx2mlx-0.0.1-py3-none-any.whl:

Publisher: pypi.yml on muna-ai/onnx2mlx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page