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.3.tar.gz (19.0 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.3-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: onnx2mlx-0.0.3.tar.gz
  • Upload date:
  • Size: 19.0 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.3.tar.gz
Algorithm Hash digest
SHA256 e636e6b5952df7b2abfbfbab1338e6726742068fe6d2e6185bea3b279bd0cdd1
MD5 73e2f3c899c9feb10753d30ba18c7461
BLAKE2b-256 0e6e16964e087f3b017fa7fb1ab964472283902f2a176053dda1e89f0e0022b5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: onnx2mlx-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 23.7 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b3832162b41813ee6a0984005f856cdba7a84f66f9608f1581d4c7cedfb46ecb
MD5 38e9c70647a491266f33fa4d3cb02d66
BLAKE2b-256 8c1a5aa0bae365acfdd50f00f117ec797878fd3c453b949b83601d849621e805

See more details on using hashes here.

Provenance

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