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.4.tar.gz (19.3 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.4-py3-none-any.whl (24.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: onnx2mlx-0.0.4.tar.gz
  • Upload date:
  • Size: 19.3 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.4.tar.gz
Algorithm Hash digest
SHA256 671fa137f62071f938521c304d64d4c2de8c5f7482e6e04bbd0f9e1f8388bc4a
MD5 a1f1cc4841a1706bd4a6be03ca191a83
BLAKE2b-256 6c3c23176722afb53b39f13e88bf0b93fdf377234109d851c315a848d4cccb63

See more details on using hashes here.

Provenance

The following attestation bundles were made for onnx2mlx-0.0.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: onnx2mlx-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 24.1 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 bb7416aee9073c9c85da5632118d670c937e8524875e03b73ee7a1682ebc4447
MD5 3aa94361d78cd7b22a748a2f13cd18a8
BLAKE2b-256 d43fa5ffa83568507a1092b4571fbf7f2f4fe842f36b2e9c4fb1264f4cd4a846

See more details on using hashes here.

Provenance

The following attestation bundles were made for onnx2mlx-0.0.4-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