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.5.tar.gz (21.1 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.5-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: onnx2mlx-0.0.5.tar.gz
  • Upload date:
  • Size: 21.1 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.5.tar.gz
Algorithm Hash digest
SHA256 2f9eb0370490ea68d142fdc6f55332b59a0052ab0012c5c842b8eb2ca682210c
MD5 1fa2883688850137a00702ba36cace6c
BLAKE2b-256 94a9b5c6feafc15d86808a2db05458a83e568f177efceab205ec5241d8459ec5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: onnx2mlx-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 26.4 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5a6fb7a1f5dfa65b13bb17846fceb0d3f9f506b75e8d9ed820cd123f4575e2ce
MD5 cfbc39094f32d258c942a4d075e2f08c
BLAKE2b-256 ed34926a7dc3b6c5dcedc87f60b3e2c840021a4de6f275594ade2703bd9bb75e

See more details on using hashes here.

Provenance

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